java/resources/$shared/index.md +0 −941 deleted
File Deleted View Diff
1# Shared
2
3## Domain Types
4
5### All Models
6
7- `class AllModels: A class that can be one of several variants.union`
8
9 - `String`
10
11 - `enum ChatModel:`
12
13 - `GPT_5_4("gpt-5.4")`
14
15 - `GPT_5_4_MINI("gpt-5.4-mini")`
16
17 - `GPT_5_4_NANO("gpt-5.4-nano")`
18
19 - `GPT_5_4_MINI_2026_03_17("gpt-5.4-mini-2026-03-17")`
20
21 - `GPT_5_4_NANO_2026_03_17("gpt-5.4-nano-2026-03-17")`
22
23 - `GPT_5_3_CHAT_LATEST("gpt-5.3-chat-latest")`
24
25 - `GPT_5_2("gpt-5.2")`
26
27 - `GPT_5_2_2025_12_11("gpt-5.2-2025-12-11")`
28
29 - `GPT_5_2_CHAT_LATEST("gpt-5.2-chat-latest")`
30
31 - `GPT_5_2_PRO("gpt-5.2-pro")`
32
33 - `GPT_5_2_PRO_2025_12_11("gpt-5.2-pro-2025-12-11")`
34
35 - `GPT_5_1("gpt-5.1")`
36
37 - `GPT_5_1_2025_11_13("gpt-5.1-2025-11-13")`
38
39 - `GPT_5_1_CODEX("gpt-5.1-codex")`
40
41 - `GPT_5_1_MINI("gpt-5.1-mini")`
42
43 - `GPT_5_1_CHAT_LATEST("gpt-5.1-chat-latest")`
44
45 - `GPT_5("gpt-5")`
46
47 - `GPT_5_MINI("gpt-5-mini")`
48
49 - `GPT_5_NANO("gpt-5-nano")`
50
51 - `GPT_5_2025_08_07("gpt-5-2025-08-07")`
52
53 - `GPT_5_MINI_2025_08_07("gpt-5-mini-2025-08-07")`
54
55 - `GPT_5_NANO_2025_08_07("gpt-5-nano-2025-08-07")`
56
57 - `GPT_5_CHAT_LATEST("gpt-5-chat-latest")`
58
59 - `GPT_4_1("gpt-4.1")`
60
61 - `GPT_4_1_MINI("gpt-4.1-mini")`
62
63 - `GPT_4_1_NANO("gpt-4.1-nano")`
64
65 - `GPT_4_1_2025_04_14("gpt-4.1-2025-04-14")`
66
67 - `GPT_4_1_MINI_2025_04_14("gpt-4.1-mini-2025-04-14")`
68
69 - `GPT_4_1_NANO_2025_04_14("gpt-4.1-nano-2025-04-14")`
70
71 - `O4_MINI("o4-mini")`
72
73 - `O4_MINI_2025_04_16("o4-mini-2025-04-16")`
74
75 - `O3("o3")`
76
77 - `O3_2025_04_16("o3-2025-04-16")`
78
79 - `O3_MINI("o3-mini")`
80
81 - `O3_MINI_2025_01_31("o3-mini-2025-01-31")`
82
83 - `O1("o1")`
84
85 - `O1_2024_12_17("o1-2024-12-17")`
86
87 - `O1_PREVIEW("o1-preview")`
88
89 - `O1_PREVIEW_2024_09_12("o1-preview-2024-09-12")`
90
91 - `O1_MINI("o1-mini")`
92
93 - `O1_MINI_2024_09_12("o1-mini-2024-09-12")`
94
95 - `GPT_4O("gpt-4o")`
96
97 - `GPT_4O_2024_11_20("gpt-4o-2024-11-20")`
98
99 - `GPT_4O_2024_08_06("gpt-4o-2024-08-06")`
100
101 - `GPT_4O_2024_05_13("gpt-4o-2024-05-13")`
102
103 - `GPT_4O_AUDIO_PREVIEW("gpt-4o-audio-preview")`
104
105 - `GPT_4O_AUDIO_PREVIEW_2024_10_01("gpt-4o-audio-preview-2024-10-01")`
106
107 - `GPT_4O_AUDIO_PREVIEW_2024_12_17("gpt-4o-audio-preview-2024-12-17")`
108
109 - `GPT_4O_AUDIO_PREVIEW_2025_06_03("gpt-4o-audio-preview-2025-06-03")`
110
111 - `GPT_4O_MINI_AUDIO_PREVIEW("gpt-4o-mini-audio-preview")`
112
113 - `GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17("gpt-4o-mini-audio-preview-2024-12-17")`
114
115 - `GPT_4O_SEARCH_PREVIEW("gpt-4o-search-preview")`
116
117 - `GPT_4O_MINI_SEARCH_PREVIEW("gpt-4o-mini-search-preview")`
118
119 - `GPT_4O_SEARCH_PREVIEW_2025_03_11("gpt-4o-search-preview-2025-03-11")`
120
121 - `GPT_4O_MINI_SEARCH_PREVIEW_2025_03_11("gpt-4o-mini-search-preview-2025-03-11")`
122
123 - `CHATGPT_4O_LATEST("chatgpt-4o-latest")`
124
125 - `CODEX_MINI_LATEST("codex-mini-latest")`
126
127 - `GPT_4O_MINI("gpt-4o-mini")`
128
129 - `GPT_4O_MINI_2024_07_18("gpt-4o-mini-2024-07-18")`
130
131 - `GPT_4_TURBO("gpt-4-turbo")`
132
133 - `GPT_4_TURBO_2024_04_09("gpt-4-turbo-2024-04-09")`
134
135 - `GPT_4_0125_PREVIEW("gpt-4-0125-preview")`
136
137 - `GPT_4_TURBO_PREVIEW("gpt-4-turbo-preview")`
138
139 - `GPT_4_1106_PREVIEW("gpt-4-1106-preview")`
140
141 - `GPT_4_VISION_PREVIEW("gpt-4-vision-preview")`
142
143 - `GPT_4("gpt-4")`
144
145 - `GPT_4_0314("gpt-4-0314")`
146
147 - `GPT_4_0613("gpt-4-0613")`
148
149 - `GPT_4_32K("gpt-4-32k")`
150
151 - `GPT_4_32K_0314("gpt-4-32k-0314")`
152
153 - `GPT_4_32K_0613("gpt-4-32k-0613")`
154
155 - `GPT_3_5_TURBO("gpt-3.5-turbo")`
156
157 - `GPT_3_5_TURBO_16K("gpt-3.5-turbo-16k")`
158
159 - `GPT_3_5_TURBO_0301("gpt-3.5-turbo-0301")`
160
161 - `GPT_3_5_TURBO_0613("gpt-3.5-turbo-0613")`
162
163 - `GPT_3_5_TURBO_1106("gpt-3.5-turbo-1106")`
164
165 - `GPT_3_5_TURBO_0125("gpt-3.5-turbo-0125")`
166
167 - `GPT_3_5_TURBO_16K_0613("gpt-3.5-turbo-16k-0613")`
168
169 - `ResponsesOnlyModel`
170
171 - `O1_PRO("o1-pro")`
172
173 - `O1_PRO_2025_03_19("o1-pro-2025-03-19")`
174
175 - `O3_PRO("o3-pro")`
176
177 - `O3_PRO_2025_06_10("o3-pro-2025-06-10")`
178
179 - `O3_DEEP_RESEARCH("o3-deep-research")`
180
181 - `O3_DEEP_RESEARCH_2025_06_26("o3-deep-research-2025-06-26")`
182
183 - `O4_MINI_DEEP_RESEARCH("o4-mini-deep-research")`
184
185 - `O4_MINI_DEEP_RESEARCH_2025_06_26("o4-mini-deep-research-2025-06-26")`
186
187 - `COMPUTER_USE_PREVIEW("computer-use-preview")`
188
189 - `COMPUTER_USE_PREVIEW_2025_03_11("computer-use-preview-2025-03-11")`
190
191 - `GPT_5_CODEX("gpt-5-codex")`
192
193 - `GPT_5_PRO("gpt-5-pro")`
194
195 - `GPT_5_PRO_2025_10_06("gpt-5-pro-2025-10-06")`
196
197 - `GPT_5_1_CODEX_MAX("gpt-5.1-codex-max")`
198
199### Chat Model
200
201- `enum ChatModel:`
202
203 - `GPT_5_4("gpt-5.4")`
204
205 - `GPT_5_4_MINI("gpt-5.4-mini")`
206
207 - `GPT_5_4_NANO("gpt-5.4-nano")`
208
209 - `GPT_5_4_MINI_2026_03_17("gpt-5.4-mini-2026-03-17")`
210
211 - `GPT_5_4_NANO_2026_03_17("gpt-5.4-nano-2026-03-17")`
212
213 - `GPT_5_3_CHAT_LATEST("gpt-5.3-chat-latest")`
214
215 - `GPT_5_2("gpt-5.2")`
216
217 - `GPT_5_2_2025_12_11("gpt-5.2-2025-12-11")`
218
219 - `GPT_5_2_CHAT_LATEST("gpt-5.2-chat-latest")`
220
221 - `GPT_5_2_PRO("gpt-5.2-pro")`
222
223 - `GPT_5_2_PRO_2025_12_11("gpt-5.2-pro-2025-12-11")`
224
225 - `GPT_5_1("gpt-5.1")`
226
227 - `GPT_5_1_2025_11_13("gpt-5.1-2025-11-13")`
228
229 - `GPT_5_1_CODEX("gpt-5.1-codex")`
230
231 - `GPT_5_1_MINI("gpt-5.1-mini")`
232
233 - `GPT_5_1_CHAT_LATEST("gpt-5.1-chat-latest")`
234
235 - `GPT_5("gpt-5")`
236
237 - `GPT_5_MINI("gpt-5-mini")`
238
239 - `GPT_5_NANO("gpt-5-nano")`
240
241 - `GPT_5_2025_08_07("gpt-5-2025-08-07")`
242
243 - `GPT_5_MINI_2025_08_07("gpt-5-mini-2025-08-07")`
244
245 - `GPT_5_NANO_2025_08_07("gpt-5-nano-2025-08-07")`
246
247 - `GPT_5_CHAT_LATEST("gpt-5-chat-latest")`
248
249 - `GPT_4_1("gpt-4.1")`
250
251 - `GPT_4_1_MINI("gpt-4.1-mini")`
252
253 - `GPT_4_1_NANO("gpt-4.1-nano")`
254
255 - `GPT_4_1_2025_04_14("gpt-4.1-2025-04-14")`
256
257 - `GPT_4_1_MINI_2025_04_14("gpt-4.1-mini-2025-04-14")`
258
259 - `GPT_4_1_NANO_2025_04_14("gpt-4.1-nano-2025-04-14")`
260
261 - `O4_MINI("o4-mini")`
262
263 - `O4_MINI_2025_04_16("o4-mini-2025-04-16")`
264
265 - `O3("o3")`
266
267 - `O3_2025_04_16("o3-2025-04-16")`
268
269 - `O3_MINI("o3-mini")`
270
271 - `O3_MINI_2025_01_31("o3-mini-2025-01-31")`
272
273 - `O1("o1")`
274
275 - `O1_2024_12_17("o1-2024-12-17")`
276
277 - `O1_PREVIEW("o1-preview")`
278
279 - `O1_PREVIEW_2024_09_12("o1-preview-2024-09-12")`
280
281 - `O1_MINI("o1-mini")`
282
283 - `O1_MINI_2024_09_12("o1-mini-2024-09-12")`
284
285 - `GPT_4O("gpt-4o")`
286
287 - `GPT_4O_2024_11_20("gpt-4o-2024-11-20")`
288
289 - `GPT_4O_2024_08_06("gpt-4o-2024-08-06")`
290
291 - `GPT_4O_2024_05_13("gpt-4o-2024-05-13")`
292
293 - `GPT_4O_AUDIO_PREVIEW("gpt-4o-audio-preview")`
294
295 - `GPT_4O_AUDIO_PREVIEW_2024_10_01("gpt-4o-audio-preview-2024-10-01")`
296
297 - `GPT_4O_AUDIO_PREVIEW_2024_12_17("gpt-4o-audio-preview-2024-12-17")`
298
299 - `GPT_4O_AUDIO_PREVIEW_2025_06_03("gpt-4o-audio-preview-2025-06-03")`
300
301 - `GPT_4O_MINI_AUDIO_PREVIEW("gpt-4o-mini-audio-preview")`
302
303 - `GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17("gpt-4o-mini-audio-preview-2024-12-17")`
304
305 - `GPT_4O_SEARCH_PREVIEW("gpt-4o-search-preview")`
306
307 - `GPT_4O_MINI_SEARCH_PREVIEW("gpt-4o-mini-search-preview")`
308
309 - `GPT_4O_SEARCH_PREVIEW_2025_03_11("gpt-4o-search-preview-2025-03-11")`
310
311 - `GPT_4O_MINI_SEARCH_PREVIEW_2025_03_11("gpt-4o-mini-search-preview-2025-03-11")`
312
313 - `CHATGPT_4O_LATEST("chatgpt-4o-latest")`
314
315 - `CODEX_MINI_LATEST("codex-mini-latest")`
316
317 - `GPT_4O_MINI("gpt-4o-mini")`
318
319 - `GPT_4O_MINI_2024_07_18("gpt-4o-mini-2024-07-18")`
320
321 - `GPT_4_TURBO("gpt-4-turbo")`
322
323 - `GPT_4_TURBO_2024_04_09("gpt-4-turbo-2024-04-09")`
324
325 - `GPT_4_0125_PREVIEW("gpt-4-0125-preview")`
326
327 - `GPT_4_TURBO_PREVIEW("gpt-4-turbo-preview")`
328
329 - `GPT_4_1106_PREVIEW("gpt-4-1106-preview")`
330
331 - `GPT_4_VISION_PREVIEW("gpt-4-vision-preview")`
332
333 - `GPT_4("gpt-4")`
334
335 - `GPT_4_0314("gpt-4-0314")`
336
337 - `GPT_4_0613("gpt-4-0613")`
338
339 - `GPT_4_32K("gpt-4-32k")`
340
341 - `GPT_4_32K_0314("gpt-4-32k-0314")`
342
343 - `GPT_4_32K_0613("gpt-4-32k-0613")`
344
345 - `GPT_3_5_TURBO("gpt-3.5-turbo")`
346
347 - `GPT_3_5_TURBO_16K("gpt-3.5-turbo-16k")`
348
349 - `GPT_3_5_TURBO_0301("gpt-3.5-turbo-0301")`
350
351 - `GPT_3_5_TURBO_0613("gpt-3.5-turbo-0613")`
352
353 - `GPT_3_5_TURBO_1106("gpt-3.5-turbo-1106")`
354
355 - `GPT_3_5_TURBO_0125("gpt-3.5-turbo-0125")`
356
357 - `GPT_3_5_TURBO_16K_0613("gpt-3.5-turbo-16k-0613")`
358
359### Comparison Filter
360
361- `class ComparisonFilter:`
362
363 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
364
365 - `String key`
366
367 The key to compare against the value.
368
369 - `Type type`
370
371 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
372
373 - `eq`: equals
374 - `ne`: not equal
375 - `gt`: greater than
376 - `gte`: greater than or equal
377 - `lt`: less than
378 - `lte`: less than or equal
379 - `in`: in
380 - `nin`: not in
381
382 - `EQ("eq")`
383
384 - `NE("ne")`
385
386 - `GT("gt")`
387
388 - `GTE("gte")`
389
390 - `LT("lt")`
391
392 - `LTE("lte")`
393
394 - `IN("in")`
395
396 - `NIN("nin")`
397
398 - `Value value`
399
400 The value to compare against the attribute key; supports string, number, or boolean types.
401
402 - `String`
403
404 - `double`
405
406 - `boolean`
407
408 - `List<ComparisonFilterValueItem>`
409
410 - `String`
411
412 - `double`
413
414### Compound Filter
415
416- `class CompoundFilter:`
417
418 Combine multiple filters using `and` or `or`.
419
420 - `List<Filter> filters`
421
422 Array of filters to combine. Items can be `ComparisonFilter` or `CompoundFilter`.
423
424 - `class ComparisonFilter:`
425
426 A filter used to compare a specified attribute key to a given value using a defined comparison operation.
427
428 - `String key`
429
430 The key to compare against the value.
431
432 - `Type type`
433
434 Specifies the comparison operator: `eq`, `ne`, `gt`, `gte`, `lt`, `lte`, `in`, `nin`.
435
436 - `eq`: equals
437 - `ne`: not equal
438 - `gt`: greater than
439 - `gte`: greater than or equal
440 - `lt`: less than
441 - `lte`: less than or equal
442 - `in`: in
443 - `nin`: not in
444
445 - `EQ("eq")`
446
447 - `NE("ne")`
448
449 - `GT("gt")`
450
451 - `GTE("gte")`
452
453 - `LT("lt")`
454
455 - `LTE("lte")`
456
457 - `IN("in")`
458
459 - `NIN("nin")`
460
461 - `Value value`
462
463 The value to compare against the attribute key; supports string, number, or boolean types.
464
465 - `String`
466
467 - `double`
468
469 - `boolean`
470
471 - `List<ComparisonFilterValueItem>`
472
473 - `String`
474
475 - `double`
476
477 - `JsonValue`
478
479 - `Type type`
480
481 Type of operation: `and` or `or`.
482
483 - `AND("and")`
484
485 - `OR("or")`
486
487### Custom Tool Input Format
488
489- `class CustomToolInputFormat: A class that can be one of several variants.union`
490
491 The input format for the custom tool. Default is unconstrained text.
492
493 - `JsonValue;`
494
495 - `JsonValue; type "text"constant`
496
497 Unconstrained text format. Always `text`.
498
499 - `TEXT("text")`
500
501 - `Grammar`
502
503 - `String definition`
504
505 The grammar definition.
506
507 - `Syntax syntax`
508
509 The syntax of the grammar definition. One of `lark` or `regex`.
510
511 - `LARK("lark")`
512
513 - `REGEX("regex")`
514
515 - `JsonValue; type "grammar"constant`
516
517 Grammar format. Always `grammar`.
518
519 - `GRAMMAR("grammar")`
520
521### Error Object
522
523- `class ErrorObject:`
524
525 - `Optional<String> code`
526
527 - `String message`
528
529 - `Optional<String> param`
530
531 - `String type`
532
533### Function Definition
534
535- `class FunctionDefinition:`
536
537 - `String name`
538
539 The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
540
541 - `Optional<String> description`
542
543 A description of what the function does, used by the model to choose when and how to call the function.
544
545 - `Optional<FunctionParameters> parameters`
546
547 The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
548
549 Omitting `parameters` defines a function with an empty parameter list.
550
551 - `Optional<Boolean> strict`
552
553 Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://platform.openai.com/docs/guides/function-calling).
554
555### Function Parameters
556
557- `class FunctionParameters:`
558
559 The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
560
561 Omitting `parameters` defines a function with an empty parameter list.
562
563### Reasoning
564
565- `class Reasoning:`
566
567 **gpt-5 and o-series models only**
568
569 Configuration options for
570 [reasoning models](https://platform.openai.com/docs/guides/reasoning).
571
572 - `Optional<ReasoningEffort> effort`
573
574 Constrains effort on reasoning for
575 [reasoning models](https://platform.openai.com/docs/guides/reasoning).
576 Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing
577 reasoning effort can result in faster responses and fewer tokens used
578 on reasoning in a response.
579
580 - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
581 - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
582 - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
583 - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
584
585 - `NONE("none")`
586
587 - `MINIMAL("minimal")`
588
589 - `LOW("low")`
590
591 - `MEDIUM("medium")`
592
593 - `HIGH("high")`
594
595 - `XHIGH("xhigh")`
596
597 - `Optional<GenerateSummary> generateSummary`
598
599 **Deprecated:** use `summary` instead.
600
601 A summary of the reasoning performed by the model. This can be
602 useful for debugging and understanding the model's reasoning process.
603 One of `auto`, `concise`, or `detailed`.
604
605 - `AUTO("auto")`
606
607 - `CONCISE("concise")`
608
609 - `DETAILED("detailed")`
610
611 - `Optional<Summary> summary`
612
613 A summary of the reasoning performed by the model. This can be
614 useful for debugging and understanding the model's reasoning process.
615 One of `auto`, `concise`, or `detailed`.
616
617 `concise` is supported for `computer-use-preview` models and all reasoning models after `gpt-5`.
618
619 - `AUTO("auto")`
620
621 - `CONCISE("concise")`
622
623 - `DETAILED("detailed")`
624
625### Reasoning Effort
626
627- `enum ReasoningEffort:`
628
629 Constrains effort on reasoning for
630 [reasoning models](https://platform.openai.com/docs/guides/reasoning).
631 Currently supported values are `none`, `minimal`, `low`, `medium`, `high`, and `xhigh`. Reducing
632 reasoning effort can result in faster responses and fewer tokens used
633 on reasoning in a response.
634
635 - `gpt-5.1` defaults to `none`, which does not perform reasoning. The supported reasoning values for `gpt-5.1` are `none`, `low`, `medium`, and `high`. Tool calls are supported for all reasoning values in gpt-5.1.
636 - All models before `gpt-5.1` default to `medium` reasoning effort, and do not support `none`.
637 - The `gpt-5-pro` model defaults to (and only supports) `high` reasoning effort.
638 - `xhigh` is supported for all models after `gpt-5.1-codex-max`.
639
640 - `NONE("none")`
641
642 - `MINIMAL("minimal")`
643
644 - `LOW("low")`
645
646 - `MEDIUM("medium")`
647
648 - `HIGH("high")`
649
650 - `XHIGH("xhigh")`
651
652### Response Format JSON Object
653
654- `class ResponseFormatJsonObject:`
655
656 JSON object response format. An older method of generating JSON responses.
657 Using `json_schema` is recommended for models that support it. Note that the
658 model will not generate JSON without a system or user message instructing it
659 to do so.
660
661 - `JsonValue; type "json_object"constant`
662
663 The type of response format being defined. Always `json_object`.
664
665 - `JSON_OBJECT("json_object")`
666
667### Response Format JSON Schema
668
669- `class ResponseFormatJsonSchema:`
670
671 JSON Schema response format. Used to generate structured JSON responses.
672 Learn more about [Structured Outputs](https://platform.openai.com/docs/guides/structured-outputs).
673
674 - `JsonSchema jsonSchema`
675
676 Structured Outputs configuration options, including a JSON Schema.
677
678 - `String name`
679
680 The name of the response format. Must be a-z, A-Z, 0-9, or contain
681 underscores and dashes, with a maximum length of 64.
682
683 - `Optional<String> description`
684
685 A description of what the response format is for, used by the model to
686 determine how to respond in the format.
687
688 - `Optional<Schema> schema`
689
690 The schema for the response format, described as a JSON Schema object.
691 Learn how to build JSON schemas [here](https://json-schema.org/).
692
693 - `Optional<Boolean> strict`
694
695 Whether to enable strict schema adherence when generating the output.
696 If set to true, the model will always follow the exact schema defined
697 in the `schema` field. Only a subset of JSON Schema is supported when
698 `strict` is `true`. To learn more, read the [Structured Outputs
699 guide](https://platform.openai.com/docs/guides/structured-outputs).
700
701 - `JsonValue; type "json_schema"constant`
702
703 The type of response format being defined. Always `json_schema`.
704
705 - `JSON_SCHEMA("json_schema")`
706
707### Response Format Text
708
709- `class ResponseFormatText:`
710
711 Default response format. Used to generate text responses.
712
713 - `JsonValue; type "text"constant`
714
715 The type of response format being defined. Always `text`.
716
717 - `TEXT("text")`
718
719### Response Format Text Grammar
720
721- `class ResponseFormatTextGrammar:`
722
723 A custom grammar for the model to follow when generating text.
724 Learn more in the [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars).
725
726 - `String grammar`
727
728 The custom grammar for the model to follow.
729
730 - `JsonValue; type "grammar"constant`
731
732 The type of response format being defined. Always `grammar`.
733
734 - `GRAMMAR("grammar")`
735
736### Response Format Text Python
737
738- `class ResponseFormatTextPython:`
739
740 Configure the model to generate valid Python code. See the
741 [custom grammars guide](https://platform.openai.com/docs/guides/custom-grammars) for more details.
742
743 - `JsonValue; type "python"constant`
744
745 The type of response format being defined. Always `python`.
746
747 - `PYTHON("python")`
748
749### Responses Model
750
751- `class ResponsesModel: A class that can be one of several variants.union`
752
753 - `String`
754
755 - `enum ChatModel:`
756
757 - `GPT_5_4("gpt-5.4")`
758
759 - `GPT_5_4_MINI("gpt-5.4-mini")`
760
761 - `GPT_5_4_NANO("gpt-5.4-nano")`
762
763 - `GPT_5_4_MINI_2026_03_17("gpt-5.4-mini-2026-03-17")`
764
765 - `GPT_5_4_NANO_2026_03_17("gpt-5.4-nano-2026-03-17")`
766
767 - `GPT_5_3_CHAT_LATEST("gpt-5.3-chat-latest")`
768
769 - `GPT_5_2("gpt-5.2")`
770
771 - `GPT_5_2_2025_12_11("gpt-5.2-2025-12-11")`
772
773 - `GPT_5_2_CHAT_LATEST("gpt-5.2-chat-latest")`
774
775 - `GPT_5_2_PRO("gpt-5.2-pro")`
776
777 - `GPT_5_2_PRO_2025_12_11("gpt-5.2-pro-2025-12-11")`
778
779 - `GPT_5_1("gpt-5.1")`
780
781 - `GPT_5_1_2025_11_13("gpt-5.1-2025-11-13")`
782
783 - `GPT_5_1_CODEX("gpt-5.1-codex")`
784
785 - `GPT_5_1_MINI("gpt-5.1-mini")`
786
787 - `GPT_5_1_CHAT_LATEST("gpt-5.1-chat-latest")`
788
789 - `GPT_5("gpt-5")`
790
791 - `GPT_5_MINI("gpt-5-mini")`
792
793 - `GPT_5_NANO("gpt-5-nano")`
794
795 - `GPT_5_2025_08_07("gpt-5-2025-08-07")`
796
797 - `GPT_5_MINI_2025_08_07("gpt-5-mini-2025-08-07")`
798
799 - `GPT_5_NANO_2025_08_07("gpt-5-nano-2025-08-07")`
800
801 - `GPT_5_CHAT_LATEST("gpt-5-chat-latest")`
802
803 - `GPT_4_1("gpt-4.1")`
804
805 - `GPT_4_1_MINI("gpt-4.1-mini")`
806
807 - `GPT_4_1_NANO("gpt-4.1-nano")`
808
809 - `GPT_4_1_2025_04_14("gpt-4.1-2025-04-14")`
810
811 - `GPT_4_1_MINI_2025_04_14("gpt-4.1-mini-2025-04-14")`
812
813 - `GPT_4_1_NANO_2025_04_14("gpt-4.1-nano-2025-04-14")`
814
815 - `O4_MINI("o4-mini")`
816
817 - `O4_MINI_2025_04_16("o4-mini-2025-04-16")`
818
819 - `O3("o3")`
820
821 - `O3_2025_04_16("o3-2025-04-16")`
822
823 - `O3_MINI("o3-mini")`
824
825 - `O3_MINI_2025_01_31("o3-mini-2025-01-31")`
826
827 - `O1("o1")`
828
829 - `O1_2024_12_17("o1-2024-12-17")`
830
831 - `O1_PREVIEW("o1-preview")`
832
833 - `O1_PREVIEW_2024_09_12("o1-preview-2024-09-12")`
834
835 - `O1_MINI("o1-mini")`
836
837 - `O1_MINI_2024_09_12("o1-mini-2024-09-12")`
838
839 - `GPT_4O("gpt-4o")`
840
841 - `GPT_4O_2024_11_20("gpt-4o-2024-11-20")`
842
843 - `GPT_4O_2024_08_06("gpt-4o-2024-08-06")`
844
845 - `GPT_4O_2024_05_13("gpt-4o-2024-05-13")`
846
847 - `GPT_4O_AUDIO_PREVIEW("gpt-4o-audio-preview")`
848
849 - `GPT_4O_AUDIO_PREVIEW_2024_10_01("gpt-4o-audio-preview-2024-10-01")`
850
851 - `GPT_4O_AUDIO_PREVIEW_2024_12_17("gpt-4o-audio-preview-2024-12-17")`
852
853 - `GPT_4O_AUDIO_PREVIEW_2025_06_03("gpt-4o-audio-preview-2025-06-03")`
854
855 - `GPT_4O_MINI_AUDIO_PREVIEW("gpt-4o-mini-audio-preview")`
856
857 - `GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17("gpt-4o-mini-audio-preview-2024-12-17")`
858
859 - `GPT_4O_SEARCH_PREVIEW("gpt-4o-search-preview")`
860
861 - `GPT_4O_MINI_SEARCH_PREVIEW("gpt-4o-mini-search-preview")`
862
863 - `GPT_4O_SEARCH_PREVIEW_2025_03_11("gpt-4o-search-preview-2025-03-11")`
864
865 - `GPT_4O_MINI_SEARCH_PREVIEW_2025_03_11("gpt-4o-mini-search-preview-2025-03-11")`
866
867 - `CHATGPT_4O_LATEST("chatgpt-4o-latest")`
868
869 - `CODEX_MINI_LATEST("codex-mini-latest")`
870
871 - `GPT_4O_MINI("gpt-4o-mini")`
872
873 - `GPT_4O_MINI_2024_07_18("gpt-4o-mini-2024-07-18")`
874
875 - `GPT_4_TURBO("gpt-4-turbo")`
876
877 - `GPT_4_TURBO_2024_04_09("gpt-4-turbo-2024-04-09")`
878
879 - `GPT_4_0125_PREVIEW("gpt-4-0125-preview")`
880
881 - `GPT_4_TURBO_PREVIEW("gpt-4-turbo-preview")`
882
883 - `GPT_4_1106_PREVIEW("gpt-4-1106-preview")`
884
885 - `GPT_4_VISION_PREVIEW("gpt-4-vision-preview")`
886
887 - `GPT_4("gpt-4")`
888
889 - `GPT_4_0314("gpt-4-0314")`
890
891 - `GPT_4_0613("gpt-4-0613")`
892
893 - `GPT_4_32K("gpt-4-32k")`
894
895 - `GPT_4_32K_0314("gpt-4-32k-0314")`
896
897 - `GPT_4_32K_0613("gpt-4-32k-0613")`
898
899 - `GPT_3_5_TURBO("gpt-3.5-turbo")`
900
901 - `GPT_3_5_TURBO_16K("gpt-3.5-turbo-16k")`
902
903 - `GPT_3_5_TURBO_0301("gpt-3.5-turbo-0301")`
904
905 - `GPT_3_5_TURBO_0613("gpt-3.5-turbo-0613")`
906
907 - `GPT_3_5_TURBO_1106("gpt-3.5-turbo-1106")`
908
909 - `GPT_3_5_TURBO_0125("gpt-3.5-turbo-0125")`
910
911 - `GPT_3_5_TURBO_16K_0613("gpt-3.5-turbo-16k-0613")`
912
913 - `ResponsesOnlyModel`
914
915 - `O1_PRO("o1-pro")`
916
917 - `O1_PRO_2025_03_19("o1-pro-2025-03-19")`
918
919 - `O3_PRO("o3-pro")`
920
921 - `O3_PRO_2025_06_10("o3-pro-2025-06-10")`
922
923 - `O3_DEEP_RESEARCH("o3-deep-research")`
924
925 - `O3_DEEP_RESEARCH_2025_06_26("o3-deep-research-2025-06-26")`
926
927 - `O4_MINI_DEEP_RESEARCH("o4-mini-deep-research")`
928
929 - `O4_MINI_DEEP_RESEARCH_2025_06_26("o4-mini-deep-research-2025-06-26")`
930
931 - `COMPUTER_USE_PREVIEW("computer-use-preview")`
932
933 - `COMPUTER_USE_PREVIEW_2025_03_11("computer-use-preview-2025-03-11")`
934
935 - `GPT_5_CODEX("gpt-5-codex")`
936
937 - `GPT_5_PRO("gpt-5-pro")`
938
939 - `GPT_5_PRO_2025_10_06("gpt-5-pro-2025-10-06")`
940
941 - `GPT_5_1_CODEX_MAX("gpt-5.1-codex-max")`