Skip to content

Shared

ModelsExpand Collapse
class AllModels: A class that can be one of several variants.union
String
enum ChatModel:
GPT_5_2("gpt-5.2")
GPT_5_2_2025_12_11("gpt-5.2-2025-12-11")
GPT_5_2_CHAT_LATEST("gpt-5.2-chat-latest")
GPT_5_2_PRO("gpt-5.2-pro")
GPT_5_2_PRO_2025_12_11("gpt-5.2-pro-2025-12-11")
GPT_5_1("gpt-5.1")
GPT_5_1_2025_11_13("gpt-5.1-2025-11-13")
GPT_5_1_CODEX("gpt-5.1-codex")
GPT_5_1_MINI("gpt-5.1-mini")
GPT_5_1_CHAT_LATEST("gpt-5.1-chat-latest")
GPT_5("gpt-5")
GPT_5_MINI("gpt-5-mini")
GPT_5_NANO("gpt-5-nano")
GPT_5_2025_08_07("gpt-5-2025-08-07")
GPT_5_MINI_2025_08_07("gpt-5-mini-2025-08-07")
GPT_5_NANO_2025_08_07("gpt-5-nano-2025-08-07")
GPT_5_CHAT_LATEST("gpt-5-chat-latest")
GPT_4_1("gpt-4.1")
GPT_4_1_MINI("gpt-4.1-mini")
GPT_4_1_NANO("gpt-4.1-nano")
GPT_4_1_2025_04_14("gpt-4.1-2025-04-14")
GPT_4_1_MINI_2025_04_14("gpt-4.1-mini-2025-04-14")
GPT_4_1_NANO_2025_04_14("gpt-4.1-nano-2025-04-14")
O4_MINI("o4-mini")
O4_MINI_2025_04_16("o4-mini-2025-04-16")
O3("o3")
O3_2025_04_16("o3-2025-04-16")
O3_MINI("o3-mini")
O3_MINI_2025_01_31("o3-mini-2025-01-31")
O1("o1")
O1_2024_12_17("o1-2024-12-17")
O1_PREVIEW("o1-preview")
O1_PREVIEW_2024_09_12("o1-preview-2024-09-12")
O1_MINI("o1-mini")
O1_MINI_2024_09_12("o1-mini-2024-09-12")
GPT_4O("gpt-4o")
GPT_4O_2024_11_20("gpt-4o-2024-11-20")
GPT_4O_2024_08_06("gpt-4o-2024-08-06")
GPT_4O_2024_05_13("gpt-4o-2024-05-13")
GPT_4O_AUDIO_PREVIEW("gpt-4o-audio-preview")
GPT_4O_AUDIO_PREVIEW_2024_10_01("gpt-4o-audio-preview-2024-10-01")
GPT_4O_AUDIO_PREVIEW_2024_12_17("gpt-4o-audio-preview-2024-12-17")
GPT_4O_AUDIO_PREVIEW_2025_06_03("gpt-4o-audio-preview-2025-06-03")
GPT_4O_MINI_AUDIO_PREVIEW("gpt-4o-mini-audio-preview")
GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17("gpt-4o-mini-audio-preview-2024-12-17")
GPT_4O_SEARCH_PREVIEW("gpt-4o-search-preview")
GPT_4O_MINI_SEARCH_PREVIEW("gpt-4o-mini-search-preview")
GPT_4O_SEARCH_PREVIEW_2025_03_11("gpt-4o-search-preview-2025-03-11")
GPT_4O_MINI_SEARCH_PREVIEW_2025_03_11("gpt-4o-mini-search-preview-2025-03-11")
CHATGPT_4O_LATEST("chatgpt-4o-latest")
CODEX_MINI_LATEST("codex-mini-latest")
GPT_4O_MINI("gpt-4o-mini")
GPT_4O_MINI_2024_07_18("gpt-4o-mini-2024-07-18")
GPT_4_TURBO("gpt-4-turbo")
GPT_4_TURBO_2024_04_09("gpt-4-turbo-2024-04-09")
GPT_4_0125_PREVIEW("gpt-4-0125-preview")
GPT_4_TURBO_PREVIEW("gpt-4-turbo-preview")
GPT_4_1106_PREVIEW("gpt-4-1106-preview")
GPT_4_VISION_PREVIEW("gpt-4-vision-preview")
GPT_4("gpt-4")
GPT_4_0314("gpt-4-0314")
GPT_4_0613("gpt-4-0613")
GPT_4_32K("gpt-4-32k")
GPT_4_32K_0314("gpt-4-32k-0314")
GPT_4_32K_0613("gpt-4-32k-0613")
GPT_3_5_TURBO("gpt-3.5-turbo")
GPT_3_5_TURBO_16K("gpt-3.5-turbo-16k")
GPT_3_5_TURBO_0301("gpt-3.5-turbo-0301")
GPT_3_5_TURBO_0613("gpt-3.5-turbo-0613")
GPT_3_5_TURBO_1106("gpt-3.5-turbo-1106")
GPT_3_5_TURBO_0125("gpt-3.5-turbo-0125")
GPT_3_5_TURBO_16K_0613("gpt-3.5-turbo-16k-0613")
ResponsesOnlyModel
Accepts one of the following:
O1_PRO("o1-pro")
O1_PRO_2025_03_19("o1-pro-2025-03-19")
O3_PRO("o3-pro")
O3_PRO_2025_06_10("o3-pro-2025-06-10")
O3_DEEP_RESEARCH("o3-deep-research")
O3_DEEP_RESEARCH_2025_06_26("o3-deep-research-2025-06-26")
O4_MINI_DEEP_RESEARCH("o4-mini-deep-research")
O4_MINI_DEEP_RESEARCH_2025_06_26("o4-mini-deep-research-2025-06-26")
COMPUTER_USE_PREVIEW("computer-use-preview")
COMPUTER_USE_PREVIEW_2025_03_11("computer-use-preview-2025-03-11")
GPT_5_CODEX("gpt-5-codex")
GPT_5_PRO("gpt-5-pro")
GPT_5_PRO_2025_10_06("gpt-5-pro-2025-10-06")
GPT_5_1_CODEX_MAX("gpt-5.1-codex-max")
enum ChatModel:
GPT_5_2("gpt-5.2")
GPT_5_2_2025_12_11("gpt-5.2-2025-12-11")
GPT_5_2_CHAT_LATEST("gpt-5.2-chat-latest")
GPT_5_2_PRO("gpt-5.2-pro")
GPT_5_2_PRO_2025_12_11("gpt-5.2-pro-2025-12-11")
GPT_5_1("gpt-5.1")
GPT_5_1_2025_11_13("gpt-5.1-2025-11-13")
GPT_5_1_CODEX("gpt-5.1-codex")
GPT_5_1_MINI("gpt-5.1-mini")
GPT_5_1_CHAT_LATEST("gpt-5.1-chat-latest")
GPT_5("gpt-5")
GPT_5_MINI("gpt-5-mini")
GPT_5_NANO("gpt-5-nano")
GPT_5_2025_08_07("gpt-5-2025-08-07")
GPT_5_MINI_2025_08_07("gpt-5-mini-2025-08-07")
GPT_5_NANO_2025_08_07("gpt-5-nano-2025-08-07")
GPT_5_CHAT_LATEST("gpt-5-chat-latest")
GPT_4_1("gpt-4.1")
GPT_4_1_MINI("gpt-4.1-mini")
GPT_4_1_NANO("gpt-4.1-nano")
GPT_4_1_2025_04_14("gpt-4.1-2025-04-14")
GPT_4_1_MINI_2025_04_14("gpt-4.1-mini-2025-04-14")
GPT_4_1_NANO_2025_04_14("gpt-4.1-nano-2025-04-14")
O4_MINI("o4-mini")
O4_MINI_2025_04_16("o4-mini-2025-04-16")
O3("o3")
O3_2025_04_16("o3-2025-04-16")
O3_MINI("o3-mini")
O3_MINI_2025_01_31("o3-mini-2025-01-31")
O1("o1")
O1_2024_12_17("o1-2024-12-17")
O1_PREVIEW("o1-preview")
O1_PREVIEW_2024_09_12("o1-preview-2024-09-12")
O1_MINI("o1-mini")
O1_MINI_2024_09_12("o1-mini-2024-09-12")
GPT_4O("gpt-4o")
GPT_4O_2024_11_20("gpt-4o-2024-11-20")
GPT_4O_2024_08_06("gpt-4o-2024-08-06")
GPT_4O_2024_05_13("gpt-4o-2024-05-13")
GPT_4O_AUDIO_PREVIEW("gpt-4o-audio-preview")
GPT_4O_AUDIO_PREVIEW_2024_10_01("gpt-4o-audio-preview-2024-10-01")
GPT_4O_AUDIO_PREVIEW_2024_12_17("gpt-4o-audio-preview-2024-12-17")
GPT_4O_AUDIO_PREVIEW_2025_06_03("gpt-4o-audio-preview-2025-06-03")
GPT_4O_MINI_AUDIO_PREVIEW("gpt-4o-mini-audio-preview")
GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17("gpt-4o-mini-audio-preview-2024-12-17")
GPT_4O_SEARCH_PREVIEW("gpt-4o-search-preview")
GPT_4O_MINI_SEARCH_PREVIEW("gpt-4o-mini-search-preview")
GPT_4O_SEARCH_PREVIEW_2025_03_11("gpt-4o-search-preview-2025-03-11")
GPT_4O_MINI_SEARCH_PREVIEW_2025_03_11("gpt-4o-mini-search-preview-2025-03-11")
CHATGPT_4O_LATEST("chatgpt-4o-latest")
CODEX_MINI_LATEST("codex-mini-latest")
GPT_4O_MINI("gpt-4o-mini")
GPT_4O_MINI_2024_07_18("gpt-4o-mini-2024-07-18")
GPT_4_TURBO("gpt-4-turbo")
GPT_4_TURBO_2024_04_09("gpt-4-turbo-2024-04-09")
GPT_4_0125_PREVIEW("gpt-4-0125-preview")
GPT_4_TURBO_PREVIEW("gpt-4-turbo-preview")
GPT_4_1106_PREVIEW("gpt-4-1106-preview")
GPT_4_VISION_PREVIEW("gpt-4-vision-preview")
GPT_4("gpt-4")
GPT_4_0314("gpt-4-0314")
GPT_4_0613("gpt-4-0613")
GPT_4_32K("gpt-4-32k")
GPT_4_32K_0314("gpt-4-32k-0314")
GPT_4_32K_0613("gpt-4-32k-0613")
GPT_3_5_TURBO("gpt-3.5-turbo")
GPT_3_5_TURBO_16K("gpt-3.5-turbo-16k")
GPT_3_5_TURBO_0301("gpt-3.5-turbo-0301")
GPT_3_5_TURBO_0613("gpt-3.5-turbo-0613")
GPT_3_5_TURBO_1106("gpt-3.5-turbo-1106")
GPT_3_5_TURBO_0125("gpt-3.5-turbo-0125")
GPT_3_5_TURBO_16K_0613("gpt-3.5-turbo-16k-0613")
class ComparisonFilter:

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

String key

The key to compare against the value.

Type type

Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.

  • eq: equals
  • ne: not equal
  • gt: greater than
  • gte: greater than or equal
  • lt: less than
  • lte: less than or equal
  • in: in
  • nin: not in
Accepts one of the following:
EQ("eq")
NE("ne")
GT("gt")
GTE("gte")
LT("lt")
LTE("lte")
Value value

The value to compare against the attribute key; supports string, number, or boolean types.

Accepts one of the following:
String
double
boolean
List<ComparisonFilterValueItem>
Accepts one of the following:
String
double
class CompoundFilter:

Combine multiple filters using and or or.

List<Filter> filters

Array of filters to combine. Items can be ComparisonFilter or CompoundFilter.

Accepts one of the following:
class ComparisonFilter:

A filter used to compare a specified attribute key to a given value using a defined comparison operation.

String key

The key to compare against the value.

Type type

Specifies the comparison operator: eq, ne, gt, gte, lt, lte, in, nin.

  • eq: equals
  • ne: not equal
  • gt: greater than
  • gte: greater than or equal
  • lt: less than
  • lte: less than or equal
  • in: in
  • nin: not in
Accepts one of the following:
EQ("eq")
NE("ne")
GT("gt")
GTE("gte")
LT("lt")
LTE("lte")
Value value

The value to compare against the attribute key; supports string, number, or boolean types.

Accepts one of the following:
String
double
boolean
List<ComparisonFilterValueItem>
Accepts one of the following:
String
double
JsonValue
Type type

Type of operation: and or or.

Accepts one of the following:
AND("and")
OR("or")
class CustomToolInputFormat: A class that can be one of several variants.union

The input format for the custom tool. Default is unconstrained text.

JsonValue;
JsonValue; type "text"constant"text"constant

Unconstrained text format. Always text.

Grammar
String definition

The grammar definition.

Syntax syntax

The syntax of the grammar definition. One of lark or regex.

Accepts one of the following:
LARK("lark")
REGEX("regex")
JsonValue; type "grammar"constant"grammar"constant

Grammar format. Always grammar.

class ErrorObject:
Optional<String> code
String message
Optional<String> param
String type
class FunctionDefinition:
String name

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.

Optional<String> description

A description of what the function does, used by the model to choose when and how to call the function.

Optional<FunctionParameters> parameters

The parameters the functions accepts, described as a JSON Schema object. See the guide for examples, and the JSON Schema reference for documentation about the format.

Omitting parameters defines a function with an empty parameter list.

Optional<Boolean> strict

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.

class FunctionParameters:

The parameters the functions accepts, described as a JSON Schema object. See the guide for examples, and the JSON Schema reference for documentation about the format.

Omitting parameters defines a function with an empty parameter list.

class Reasoning:

gpt-5 and o-series models only

Configuration options for reasoning models.

Optional<ReasoningEffort> effort

Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, and xhigh. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.

  • 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.
  • All models before gpt-5.1 default to medium reasoning effort, and do not support none.
  • The gpt-5-pro model defaults to (and only supports) high reasoning effort.
  • xhigh is supported for all models after gpt-5.1-codex-max.
DeprecatedOptional<GenerateSummary> generateSummary

Deprecated: use summary instead.

A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.

Accepts one of the following:
AUTO("auto")
CONCISE("concise")
DETAILED("detailed")
Optional<Summary> summary

A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. One of auto, concise, or detailed.

concise is supported for computer-use-preview models and all reasoning models after gpt-5.

Accepts one of the following:
AUTO("auto")
CONCISE("concise")
DETAILED("detailed")
enum ReasoningEffort:

Constrains effort on reasoning for reasoning models. Currently supported values are none, minimal, low, medium, high, and xhigh. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response.

  • 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.
  • All models before gpt-5.1 default to medium reasoning effort, and do not support none.
  • The gpt-5-pro model defaults to (and only supports) high reasoning effort.
  • xhigh is supported for all models after gpt-5.1-codex-max.
NONE("none")
MINIMAL("minimal")
LOW("low")
MEDIUM("medium")
HIGH("high")
XHIGH("xhigh")
class ResponseFormatJsonObject:

JSON object response format. An older method of generating JSON responses. Using json_schema is recommended for models that support it. Note that the model will not generate JSON without a system or user message instructing it to do so.

JsonValue; type "json_object"constant"json_object"constant

The type of response format being defined. Always json_object.

class ResponseFormatJsonSchema:

JSON Schema response format. Used to generate structured JSON responses. Learn more about Structured Outputs.

JsonSchema jsonSchema

Structured Outputs configuration options, including a JSON Schema.

String name

The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.

Optional<String> description

A description of what the response format is for, used by the model to determine how to respond in the format.

Optional<Schema> schema

The schema for the response format, described as a JSON Schema object. Learn how to build JSON schemas here.

Optional<Boolean> strict

Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the schema field. Only a subset of JSON Schema is supported when strict is true. To learn more, read the Structured Outputs guide.

JsonValue; type "json_schema"constant"json_schema"constant

The type of response format being defined. Always json_schema.

class ResponseFormatText:

Default response format. Used to generate text responses.

JsonValue; type "text"constant"text"constant

The type of response format being defined. Always text.

class ResponseFormatTextGrammar:

A custom grammar for the model to follow when generating text. Learn more in the custom grammars guide.

String grammar

The custom grammar for the model to follow.

JsonValue; type "grammar"constant"grammar"constant

The type of response format being defined. Always grammar.

class ResponseFormatTextPython:

Configure the model to generate valid Python code. See the custom grammars guide for more details.

JsonValue; type "python"constant"python"constant

The type of response format being defined. Always python.

class ResponsesModel: A class that can be one of several variants.union
String
enum ChatModel:
GPT_5_2("gpt-5.2")
GPT_5_2_2025_12_11("gpt-5.2-2025-12-11")
GPT_5_2_CHAT_LATEST("gpt-5.2-chat-latest")
GPT_5_2_PRO("gpt-5.2-pro")
GPT_5_2_PRO_2025_12_11("gpt-5.2-pro-2025-12-11")
GPT_5_1("gpt-5.1")
GPT_5_1_2025_11_13("gpt-5.1-2025-11-13")
GPT_5_1_CODEX("gpt-5.1-codex")
GPT_5_1_MINI("gpt-5.1-mini")
GPT_5_1_CHAT_LATEST("gpt-5.1-chat-latest")
GPT_5("gpt-5")
GPT_5_MINI("gpt-5-mini")
GPT_5_NANO("gpt-5-nano")
GPT_5_2025_08_07("gpt-5-2025-08-07")
GPT_5_MINI_2025_08_07("gpt-5-mini-2025-08-07")
GPT_5_NANO_2025_08_07("gpt-5-nano-2025-08-07")
GPT_5_CHAT_LATEST("gpt-5-chat-latest")
GPT_4_1("gpt-4.1")
GPT_4_1_MINI("gpt-4.1-mini")
GPT_4_1_NANO("gpt-4.1-nano")
GPT_4_1_2025_04_14("gpt-4.1-2025-04-14")
GPT_4_1_MINI_2025_04_14("gpt-4.1-mini-2025-04-14")
GPT_4_1_NANO_2025_04_14("gpt-4.1-nano-2025-04-14")
O4_MINI("o4-mini")
O4_MINI_2025_04_16("o4-mini-2025-04-16")
O3("o3")
O3_2025_04_16("o3-2025-04-16")
O3_MINI("o3-mini")
O3_MINI_2025_01_31("o3-mini-2025-01-31")
O1("o1")
O1_2024_12_17("o1-2024-12-17")
O1_PREVIEW("o1-preview")
O1_PREVIEW_2024_09_12("o1-preview-2024-09-12")
O1_MINI("o1-mini")
O1_MINI_2024_09_12("o1-mini-2024-09-12")
GPT_4O("gpt-4o")
GPT_4O_2024_11_20("gpt-4o-2024-11-20")
GPT_4O_2024_08_06("gpt-4o-2024-08-06")
GPT_4O_2024_05_13("gpt-4o-2024-05-13")
GPT_4O_AUDIO_PREVIEW("gpt-4o-audio-preview")
GPT_4O_AUDIO_PREVIEW_2024_10_01("gpt-4o-audio-preview-2024-10-01")
GPT_4O_AUDIO_PREVIEW_2024_12_17("gpt-4o-audio-preview-2024-12-17")
GPT_4O_AUDIO_PREVIEW_2025_06_03("gpt-4o-audio-preview-2025-06-03")
GPT_4O_MINI_AUDIO_PREVIEW("gpt-4o-mini-audio-preview")
GPT_4O_MINI_AUDIO_PREVIEW_2024_12_17("gpt-4o-mini-audio-preview-2024-12-17")
GPT_4O_SEARCH_PREVIEW("gpt-4o-search-preview")
GPT_4O_MINI_SEARCH_PREVIEW("gpt-4o-mini-search-preview")
GPT_4O_SEARCH_PREVIEW_2025_03_11("gpt-4o-search-preview-2025-03-11")
GPT_4O_MINI_SEARCH_PREVIEW_2025_03_11("gpt-4o-mini-search-preview-2025-03-11")
CHATGPT_4O_LATEST("chatgpt-4o-latest")
CODEX_MINI_LATEST("codex-mini-latest")
GPT_4O_MINI("gpt-4o-mini")
GPT_4O_MINI_2024_07_18("gpt-4o-mini-2024-07-18")
GPT_4_TURBO("gpt-4-turbo")
GPT_4_TURBO_2024_04_09("gpt-4-turbo-2024-04-09")
GPT_4_0125_PREVIEW("gpt-4-0125-preview")
GPT_4_TURBO_PREVIEW("gpt-4-turbo-preview")
GPT_4_1106_PREVIEW("gpt-4-1106-preview")
GPT_4_VISION_PREVIEW("gpt-4-vision-preview")
GPT_4("gpt-4")
GPT_4_0314("gpt-4-0314")
GPT_4_0613("gpt-4-0613")
GPT_4_32K("gpt-4-32k")
GPT_4_32K_0314("gpt-4-32k-0314")
GPT_4_32K_0613("gpt-4-32k-0613")
GPT_3_5_TURBO("gpt-3.5-turbo")
GPT_3_5_TURBO_16K("gpt-3.5-turbo-16k")
GPT_3_5_TURBO_0301("gpt-3.5-turbo-0301")
GPT_3_5_TURBO_0613("gpt-3.5-turbo-0613")
GPT_3_5_TURBO_1106("gpt-3.5-turbo-1106")
GPT_3_5_TURBO_0125("gpt-3.5-turbo-0125")
GPT_3_5_TURBO_16K_0613("gpt-3.5-turbo-16k-0613")
ResponsesOnlyModel
Accepts one of the following:
O1_PRO("o1-pro")
O1_PRO_2025_03_19("o1-pro-2025-03-19")
O3_PRO("o3-pro")
O3_PRO_2025_06_10("o3-pro-2025-06-10")
O3_DEEP_RESEARCH("o3-deep-research")
O3_DEEP_RESEARCH_2025_06_26("o3-deep-research-2025-06-26")
O4_MINI_DEEP_RESEARCH("o4-mini-deep-research")
O4_MINI_DEEP_RESEARCH_2025_06_26("o4-mini-deep-research-2025-06-26")
COMPUTER_USE_PREVIEW("computer-use-preview")
COMPUTER_USE_PREVIEW_2025_03_11("computer-use-preview-2025-03-11")
GPT_5_CODEX("gpt-5-codex")
GPT_5_PRO("gpt-5-pro")
GPT_5_PRO_2025_10_06("gpt-5-pro-2025-10-06")
GPT_5_1_CODEX_MAX("gpt-5.1-codex-max")