openapi: 3.2.0 info: title: Aimlapi Chat API version: 1.0.0 description: 'Operations tagged Chat across 2 of this provider''s published API definitions: aimlapi-inference-openapi.yml, aimlapi-openapi.yml. Each path carries the servers of the definition it was published in.' servers: - url: https://api.aimlapi.com tags: - name: Chat Completions paths: /v1/chat/completions: post: operationId: _v1_chat_completions requestBody: required: true content: application/json: schema: anyOf: - type: object properties: model: type: string enum: - gpt-3.5-turbo - openai/gpt-3.5-turbo - gpt-3.5-turbo-0125 - openai/gpt-3.5-turbo-0125 - gpt-3.5-turbo-1106 - openai/gpt-3.5-turbo-1106 - gpt-3.5-turbo-0613 - openai/gpt-3.5-turbo-0613 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: gpt-3.5-turbo, openai/gpt-3.5-turbo, gpt-3.5-turbo-0125, openai/gpt-3.5-turbo-0125, gpt-3.5-turbo-1106, openai/gpt-3.5-turbo-1106, gpt-3.5-turbo-0613, openai/gpt-3.5-turbo-0613 - type: object properties: model: type: string enum: - gpt-4 - openai/gpt-4 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." required: - model - messages title: gpt-4, openai/gpt-4 - type: object properties: model: type: string enum: - gpt-4.1-mini - openai/gpt-4.1-mini - gpt-4.1-mini-2025-04-14 - openai/gpt-4.1-mini-2025-04-14 - gpt-4.1-nano - openai/gpt-4.1-nano - gpt-4.1-nano-2025-04-14 - openai/gpt-4.1-nano-2025-04-14 - gpt-4.1 - openai/gpt-4.1 - gpt-4.1-2025-04-14 - openai/gpt-4.1-2025-04-14 - gpt-4o-mini - openai/gpt-4o-mini - gpt-4o-mini-2024-07-18 - openai/gpt-4o-mini-2024-07-18 - gpt-4o - openai/gpt-4o - gpt-4o-2024-08-06 - openai/gpt-4o-2024-08-06 - gpt-4o-2024-11-20 - openai/gpt-4o-2024-11-20 - gpt-4o-2024-05-13 - openai/gpt-4o-2024-05-13 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." required: - model - messages title: gpt-4.1-mini, openai/gpt-4.1-mini, gpt-4.1-mini-2025-04-14, openai/gpt-4.1-mini-2025-04-14, gpt-4.1-nano, openai/gpt-4.1-nano, gpt-4.1-nano-2025-04-14, openai/gpt-4.1-nano-2025-04-14, gpt-4.1, openai/gpt-4.1, gpt-4.1-2025-04-14, openai/gpt-4.1-2025-04-14, gpt-4o-mini, openai/gpt-4o-mini, gpt-4o-mini-2024-07-18, openai/gpt-4o-mini-2024-07-18, gpt-4o, openai/gpt-4o, gpt-4o-2024-08-06, openai/gpt-4o-2024-08-06, gpt-4o-2024-11-20, openai/gpt-4o-2024-11-20, gpt-4o-2024-05-13, openai/gpt-4o-2024-05-13 - type: object properties: model: type: string enum: - gpt-4-turbo - openai/gpt-4-turbo - gpt-4-turbo-2024-04-09 - openai/gpt-4-turbo-2024-04-09 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." required: - model - messages title: gpt-4-turbo, openai/gpt-4-turbo, gpt-4-turbo-2024-04-09, openai/gpt-4-turbo-2024-04-09 - type: object properties: model: type: string enum: - o1 - openai/o1 - o1-2024-12-17 - openai/o1-2024-12-17 - o3-mini - openai/o3-mini - o3-mini-2025-01-31 - openai/o3-mini-2025-01-31 - o3-mini-high - openai/o3-mini-high provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: o1, openai/o1, o1-2024-12-17, openai/o1-2024-12-17, o3-mini, openai/o3-mini, o3-mini-2025-01-31, openai/o3-mini-2025-01-31, o3-mini-high, openai/o3-mini-high - type: object properties: model: type: string enum: - o4-mini-2025-04-16 - openai/o4-mini-2025-04-16 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. Only the provider default value is supported for this model. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: o4-mini-2025-04-16, openai/o4-mini-2025-04-16 - type: object properties: model: type: string enum: - gpt-5-nano-2025-08-07 - openai/gpt-5-nano-2025-08-07 - gpt-5-2025-08-07 - openai/gpt-5-2025-08-07 - gpt-5-mini-2025-08-07 - openai/gpt-5-mini-2025-08-07 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. Only the provider default value is supported for this model. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: gpt-5-nano-2025-08-07, openai/gpt-5-nano-2025-08-07, gpt-5-2025-08-07, openai/gpt-5-2025-08-07, gpt-5-mini-2025-08-07, openai/gpt-5-mini-2025-08-07 - type: object properties: model: type: string enum: - gpt-5.1-2025-11-13 - openai/gpt-5.1-2025-11-13 - openai/gpt-5-1 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: gpt-5.1-2025-11-13, openai/gpt-5.1-2025-11-13, openai/gpt-5-1 - type: object properties: model: type: string enum: - gpt-5.2-2025-12-11 - openai/gpt-5.2-2025-12-11 - openai/gpt-5-2 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: gpt-5.2-2025-12-11, openai/gpt-5.2-2025-12-11, openai/gpt-5-2 - type: object properties: model: type: string enum: - gpt-5.2-chat-latest - openai/gpt-5.2-chat-latest - openai/gpt-5-2-chat-latest provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. Only the provider default value is supported for this model. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: gpt-5.2-chat-latest, openai/gpt-5.2-chat-latest, openai/gpt-5-2-chat-latest - type: object properties: model: type: string enum: - gpt-5.4-2026-03-05 - openai/gpt-5.4-2026-03-05 - gpt-5.5-2026-04-23 - openai/gpt-5.5-2026-04-23 - gpt-5.6-sol - openai/gpt-5.6-sol - gpt-5.6-terra - openai/gpt-5.6-terra - gpt-5.6-luna - openai/gpt-5.6-luna - gpt-5.6-luna-pro - openai/gpt-5.6-luna-pro - gpt-5.6-terra-pro - openai/gpt-5.6-terra-pro - gpt-5.6-sol-pro - openai/gpt-5.6-sol-pro - openai/gpt-5-4 - openai/gpt-5-5 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: gpt-5.4-2026-03-05, openai/gpt-5.4-2026-03-05, gpt-5.5-2026-04-23, openai/gpt-5.5-2026-04-23, gpt-5.6-sol, openai/gpt-5.6-sol, gpt-5.6-terra, openai/gpt-5.6-terra, gpt-5.6-luna, openai/gpt-5.6-luna, gpt-5.6-luna-pro, openai/gpt-5.6-luna-pro, gpt-5.6-terra-pro, openai/gpt-5.6-terra-pro, gpt-5.6-sol-pro, openai/gpt-5.6-sol-pro, openai/gpt-5-4, openai/gpt-5-5 - type: object properties: model: type: string enum: - gpt-audio - openai/gpt-audio - gpt-audio-2025-08-28 - openai/gpt-audio-2025-08-28 - gpt-audio-mini - openai/gpt-audio-mini - gpt-audio-mini-2025-10-06 - openai/gpt-audio-mini-2025-10-06 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file - type: object properties: type: type: string enum: - input_audio description: The type of the content part. input_audio: type: object properties: data: anyOf: - type: string format: uri - type: string - type: string description: Either a URL of the audio or the base64 encoded audio data. format: type: string enum: - wav - mp3 - audio/x-aac - audio/flac - audio/mp3 - audio/m4a - audio/mpeg - audio/mpga - audio/mp4 - audio/ogg - audio/pcm - audio/webm description: The format of the encoded audio data. Currently supports "wav" and "mp3". required: - data - format required: - type - input_audio description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. audio: type: - object - 'null' properties: id: type: string description: Unique identifier for a previous audio response from the model. required: - id description: Data about a previous audio response from the model. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." audio: type: - object - 'null' properties: format: type: string enum: - wav - mp3 - flac - opus - pcm16 description: Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16. voice: anyOf: - type: string enum: - alloy - ash - ballad - coral - echo - fable - nova - onyx - sage - shimmer - type: string description: The voice the model uses to respond. Supported voices are alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, and shimmer. required: - format - voice description: 'Parameters for audio output. Required when audio output is requested with modalities: ["audio"].' modalities: type: - array - 'null' items: type: string enum: - text - audio description: "Output types that you would like the model to generate. Most models are capable of generating text, which is the default:\n \n [\"text\"]\n \n Model can also be used to generate audio. To request that this model generate both text and audio responses, you can use:\n \n [\"text\", \"audio\"]" required: - model - messages title: gpt-audio, openai/gpt-audio, gpt-audio-2025-08-28, openai/gpt-audio-2025-08-28, gpt-audio-mini, openai/gpt-audio-mini, gpt-audio-mini-2025-10-06, openai/gpt-audio-mini-2025-10-06 - type: object properties: model: type: string enum: - o3-2025-04-16 - openai/o3-2025-04-16 - o4-mini-high - openai/o4-mini-high - o4-mini - openai/o4-mini provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: o3-2025-04-16, openai/o3-2025-04-16, o4-mini-high, openai/o4-mini-high, o4-mini, openai/o4-mini - type: object properties: model: type: string enum: - gpt-3.5-turbo-instruct - openai/gpt-3.5-turbo-instruct - gpt-3.5-turbo-16k - openai/gpt-3.5-turbo-16k provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - image source: type: object properties: type: type: string enum: - base64 media_type: type: string enum: - image/jpeg - image/png - image/gif - image/webp data: type: string required: - type - media_type - data cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - input_audio description: The type of the content part. input_audio: type: object properties: data: anyOf: - type: string format: uri - type: string - type: string description: Either a URL of the audio or the base64 encoded audio data. format: type: string enum: - wav - mp3 - audio/x-aac - audio/flac - audio/mp3 - audio/m4a - audio/mpeg - audio/mpga - audio/mp4 - audio/ogg - audio/pcm - audio/webm description: The format of the encoded audio data. Currently supports "wav" and "mp3". required: - data - format required: - type - input_audio - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file - type: object properties: type: type: string enum: - video_url video_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: Base64-encoded local video file. required: - url required: - type - video_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - function content: type: string name: type: string required: - role - content - name - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. reasoning_content: type: string refusal: type: - string - 'null' description: The refusal message by the Assistant. audio: type: - object - 'null' properties: id: type: string description: Unique identifier for a previous audio response from the model. required: - id description: Data about a previous audio response from the model. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role minItems: 1 description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: - number - 'null' minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. max_completion_tokens: type: - integer - 'null' minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: - object - 'null' properties: include_usage: type: boolean required: - include_usage frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. prediction: type: - object - 'null' properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: - integer - 'null' minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. top_p: type: - number - 'null' minimum: 0.1 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." temperature: type: - number - 'null' minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. tools: type: - array - 'null' items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. - {} description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." parallel_tool_calls: type: - boolean - 'null' description: Whether to enable parallel function calling during tool use. reasoning_effort: type: - string - 'null' enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. - {} description: An object specifying the format that the model must output. audio: type: - object - 'null' properties: format: type: string enum: - wav - mp3 - flac - opus - pcm16 description: Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16. voice: type: string enum: - alloy - ash - ballad - coral - echo - fable - nova - onyx - sage - shimmer description: The voice the model uses to respond. Supported voices are alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, and shimmer. required: - format - voice description: 'Parameters for audio output. Required when audio output is requested with modalities: ["audio"].' modalities: type: - array - 'null' items: type: string enum: - text - audio description: "Output types that you would like the model to generate. Most models are capable of generating text, which is the default:\n \n [\"text\"]\n \n Model can also be used to generate audio. To request that this model generate both text and audio responses, you can use:\n \n [\"text\", \"audio\"]" web_search_options: type: - object - 'null' properties: search_context_size: type: string enum: - low - medium - high description: 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. user_location: type: - object - 'null' properties: approximate: type: object properties: city: type: string description: Free text input for the city of the user, e.g. San Francisco. country: type: string description: The two-letter ISO country code of the user, e.g. US. region: type: string description: Free text input for the region of the user, e.g. California. timezone: type: string description: The IANA timezone of the user, e.g. America/Los_Angeles. description: Approximate location parameters for the search. type: type: string enum: - approximate description: The type of location approximation. Always approximate. required: - approximate - type description: Approximate location parameters for the search. description: This tool searches the web for relevant results to use in a response. enable_search: type: - boolean - 'null' description: Enable Alibaba Model Studio web search. search_options: type: - object - 'null' properties: forced_search: type: boolean search_strategy: type: string enum: - turbo - max - agent enable_source: type: boolean description: Alibaba Model Studio web search options. required: - model - messages title: gpt-3.5-turbo-instruct, openai/gpt-3.5-turbo-instruct, gpt-3.5-turbo-16k, openai/gpt-3.5-turbo-16k - type: object properties: model: type: string enum: - gpt-oss-120b - openai/gpt-oss-120b - gpt-oss-20b - openai/gpt-oss-20b provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. echo: type: boolean description: If True, the response will contain the prompt. Can be used with logprobs to return prompt logprobs. required: - model - messages title: gpt-oss-120b, openai/gpt-oss-120b, gpt-oss-20b, openai/gpt-oss-20b - type: object properties: model: type: string enum: - gpt-5 - openai/gpt-5 - gpt-5-mini - openai/gpt-5-mini - gpt-5-nano - openai/gpt-5-nano provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: gpt-5, openai/gpt-5, gpt-5-mini, openai/gpt-5-mini, gpt-5-nano, openai/gpt-5-nano - type: object properties: model: type: string enum: - gpt-chat-latest - openai/gpt-chat-latest - gpt-5.5-pro - openai/gpt-5.5-pro - gpt-5.5 - openai/gpt-5.5 - gpt-5.4-image-2 - openai/gpt-5.4-image-2 - gpt-5.4-nano - openai/gpt-5.4-nano - gpt-5.4-mini - openai/gpt-5.4-mini - gpt-5.4-pro - openai/gpt-5.4-pro - gpt-5.4 - openai/gpt-5.4 - gpt-5.3-codex - openai/gpt-5.3-codex - gpt-5.2-codex - openai/gpt-5.2-codex - gpt-5.2-chat - openai/gpt-5.2-chat - gpt-5.2-pro - openai/gpt-5.2-pro - gpt-5.2 - openai/gpt-5.2 - gpt-5.1-codex-max - openai/gpt-5.1-codex-max - gpt-5.1 - openai/gpt-5.1 - gpt-5.1-codex - openai/gpt-5.1-codex - gpt-5.1-codex-mini - openai/gpt-5.1-codex-mini - gpt-oss-safeguard-20b - openai/gpt-oss-safeguard-20b - gpt-5-image-mini - openai/gpt-5-image-mini - gpt-5-image - openai/gpt-5-image - gpt-5-pro - openai/gpt-5-pro - o3-pro - openai/o3-pro - o3 - openai/o3 - o1-pro - openai/o1-pro - gpt-4-turbo-preview - openai/gpt-4-turbo-preview - gpt-latest - openai/gpt-latest - gpt-mini-latest - openai/gpt-mini-latest - claude-opus-4.8-fast - anthropic/claude-opus-4.8-fast - claude-opus-4.8 - anthropic/claude-opus-4.8 - claude-opus-4.7-fast - anthropic/claude-opus-4.7-fast - claude-opus-4.7 - anthropic/claude-opus-4.7 - claude-sonnet-4.6 - anthropic/claude-sonnet-4.6 - claude-opus-4.6 - anthropic/claude-opus-4.6 - claude-opus-4.5 - anthropic/claude-opus-4.5 - claude-haiku-4.5 - anthropic/claude-haiku-4.5 - claude-sonnet-4.5 - anthropic/claude-sonnet-4.5 - claude-opus-4.1 - anthropic/claude-opus-4.1 - claude-opus-4 - anthropic/claude-opus-4 - claude-sonnet-4 - anthropic/claude-sonnet-4 - claude-3-haiku - anthropic/claude-3-haiku - anthropic/claude-fable-latest - claude-fable-latest - anthropic/claude-haiku-latest - claude-haiku-latest - anthropic/claude-sonnet-latest - claude-sonnet-latest - anthropic/claude-opus-latest - claude-opus-latest - deepseek-v4-flash-latest - deepseek/deepseek-v4-flash-latest - gemini-3.1-flash-lite-image - google/gemini-3.1-flash-lite-image - gemini-3.1-flash-image - google/gemini-3.1-flash-image - gemini-3-pro-image - google/gemini-3-pro-image - gemini-3.1-flash-lite-preview - google/gemini-3.1-flash-lite-preview - gemini-3.1-flash-image-preview - google/gemini-3.1-flash-image-preview - gemini-3.1-pro-preview-customtools - google/gemini-3.1-pro-preview-customtools - gemini-3-pro-image-preview - google/gemini-3-pro-image-preview - gemini-2.5-flash-image - google/gemini-2.5-flash-image - gemini-2.5-pro-preview - google/gemini-2.5-pro-preview - gemini-2.5-pro-preview-05-06 - google/gemini-2.5-pro-preview-05-06 - gemma-2-27b-it - google/gemma-2-27b-it - google/gemini-3-1-flash-lite-preview - google/gemini-pro-latest - gemini-pro-latest - google/gemini-flash-latest - gemini-flash-latest - muse-spark-1.1 - meta/muse-spark-1.1 - muse-spark-1.2 - meta/muse-spark-1.2 - mistral-medium-3-5 - mistralai/mistral-medium-3-5 - mistral-small-2603 - mistralai/mistral-small-2603 - ministral-14b-2512 - mistralai/ministral-14b-2512 - ministral-8b-2512 - mistralai/ministral-8b-2512 - ministral-3b-2512 - mistralai/ministral-3b-2512 - mistral-large-2512 - mistralai/mistral-large-2512 - voxtral-small-24b-2507 - mistralai/voxtral-small-24b-2507 - mistral-medium-3.1 - mistralai/mistral-medium-3.1 - codestral-2508 - mistralai/codestral-2508 - mistral-small-3.2-24b-instruct - mistralai/mistral-small-3.2-24b-instruct - mistral-medium-3 - mistralai/mistral-medium-3 - mistral-small-3.1-24b-instruct - mistralai/mistral-small-3.1-24b-instruct - mistral-saba - mistralai/mistral-saba - mistral-small-24b-instruct-2501 - mistralai/mistral-small-24b-instruct-2501 - mistral-large-2407 - mistralai/mistral-large-2407 - mixtral-8x22b-instruct - mistralai/mixtral-8x22b-instruct - mistral-large - mistralai/mistral-large - hermes-4-70b - nousresearch/hermes-4-70b - hermes-3-llama-3.1-70b - nousresearch/hermes-3-llama-3.1-70b - hermes-3-llama-3.1-405b - nousresearch/hermes-3-llama-3.1-405b - command-r7b-12-2024 - cohere/command-r7b-12-2024 - command-r-08-2024 - cohere/command-r-08-2024 - command-r-plus-08-2024 - cohere/command-r-plus-08-2024 - tencent/hy3 - hy3 - aion-3.0-mini - aion-labs/aion-3.0-mini - aion-2.0 - aion-labs/aion-2.0 - aion-3.0 - aion-labs/aion-3.0 - aion-rp-llama-3.1-8b - aion-labs/aion-rp-llama-3.1-8b - olmo-3-32b-think - allenai/olmo-3-32b-think - nova-2-lite-v1 - amazon/nova-2-lite-v1 - nova-premier-v1 - amazon/nova-premier-v1 - nova-lite-v1 - amazon/nova-lite-v1 - nova-micro-v1 - amazon/nova-micro-v1 - nova-pro-v1 - amazon/nova-pro-v1 - trinity-large-thinking - arcee-ai/trinity-large-thinking - virtuoso-large - arcee-ai/virtuoso-large - seed-2-1-turbo - bytedance-seed/seed-2-1-turbo - seed-2.0-code - bytedance-seed/seed-2.0-code - seed-2.0-lite - bytedance-seed/seed-2.0-lite - seed-2.0-mini - bytedance-seed/seed-2.0-mini - seed-1.6-flash - bytedance-seed/seed-1.6-flash - seed-1.6 - bytedance-seed/seed-1.6 - dolphin-mistral-24b-venice-edition - cognitivecomputations/dolphin-mistral-24b-venice-edition - granite-4.1-8b - ibm-granite/granite-4.1-8b - granite-4.0-h-micro - ibm-granite/granite-4.0-h-micro - mercury-2 - inception/mercury-2 - kat-coder-pro-v2 - kwaipilot/kat-coder-pro-v2 - kat-coder-pro-v2.5 - kwaipilot/kat-coder-pro-v2.5 - kat-coder-air-v2.5 - kwaipilot/kat-coder-air-v2.5 - weaver - mancer/weaver - moonshotai/kimi-latest - kimi-latest - kimi-k2.7-code - moonshotai/kimi-k2.7-code - kimi-k2.6 - moonshotai/kimi-k2.6 - kimi-k2.5 - moonshotai/kimi-k2.5 - kimi-k2-thinking - moonshotai/kimi-k2-thinking - kimi-k2-0905 - moonshotai/kimi-k2-0905 - kimi-k2 - moonshotai/kimi-k2 - morph-v3-large - morph/morph-v3-large - morph-v3-fast - morph/morph-v3-fast - nex-n2-mini - nex-agi/nex-n2-mini - nex-n2-pro - nex-agi/nex-n2-pro - perceptron-mk1 - perceptron/perceptron-mk1 - laguna-xs-2.1 - poolside/laguna-xs-2.1 - laguna-s-2.1 - poolside/laguna-s-2.1 - reka-edge - rekaai/reka-edge - reka-flash-3 - rekaai/reka-flash-3 - relace-search - relace/relace-search - relace-apply-3 - relace/relace-apply-3 - l3.3-euryale-70b - sao10k/l3.3-euryale-70b - l3.1-euryale-70b - sao10k/l3.1-euryale-70b - l3-lunaris-8b - sao10k/l3-lunaris-8b - cydonia-24b-v4.1 - thedrummer/cydonia-24b-v4.1 - skyfall-36b-v2 - thedrummer/skyfall-36b-v2 - unslopnemo-12b - thedrummer/unslopnemo-12b - remm-slerp-l2-13b - undi95/remm-slerp-l2-13b - solar-pro-3 - upstage/solar-pro-3 - solar-pro4 - upstage/solar-pro4 - palmyra-x5 - writer/palmyra-x5 - glm-5.3-flash - z-ai/glm-5.3-flash - z-ai/glm-5.3 - z-ai/glm-5.2 - z-ai/glm-5.1 - z-ai/glm-5 - glm-4.7-flash - z-ai/glm-4.7-flash - z-ai/glm-4.7 - glm-4.6v - z-ai/glm-4.6v - z-ai/glm-4.6 - glm-4.5v - z-ai/glm-4.5v - z-ai/glm-4.5 - z-ai/glm-4.5-air provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. web_search_options: type: object properties: search_context_size: type: string enum: - low - medium - high description: 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. user_location: type: - object - 'null' properties: approximate: type: object properties: city: type: string description: Free text input for the city of the user, e.g. San Francisco. country: type: string pattern: ^[A-Z]{2}$ description: The two-letter ISO country code of the user, e.g. US. region: type: string description: Free text input for the region of the user, e.g. California. timezone: type: string description: The IANA timezone of the user, e.g. America/Los_Angeles. description: Approximate location parameters for the search. type: type: string enum: - approximate description: The type of location approximation. Always approximate. required: - approximate - type description: Approximate location parameters for the search. description: This tool searches the web for relevant results to use in a response. search_mode: type: string enum: - academic - web default: academic description: Controls the search mode used for the request. When set to 'academic', results will prioritize scholarly sources like peer-reviewed papers and academic journals. search_domain_filter: type: array items: type: string description: A list of domains to limit search results to. Currently limited to 10 domains for Allowlisting and Denylisting. For Denylisting, add a - at the beginning of the domain string. return_images: type: boolean default: false description: Determines whether search results should include images. return_related_questions: type: boolean default: false description: Determines whether related questions should be returned. search_recency_filter: type: string enum: - day - week - month - year description: Filters search results based on time (e.g., 'week', 'day'). search_after_date_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content published after this date. Format should be %m/%d/%Y (e.g. 3/1/2025) search_before_date_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content published before this date. Format should be %m/%d/%Y (e.g. 3/1/2025) last_updated_after_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content last updated after this date. Format should be %m/%d/%Y (e.g. 3/1/2025) last_updated_before_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content last updated before this date. Format should be %m/%d/%Y (e.g. 3/1/2025) echo: type: boolean description: If True, the response will contain the prompt. Can be used with logprobs to return prompt logprobs. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens required: - model - messages title: gpt-chat-latest, openai/gpt-chat-latest, gpt-5.5-pro, openai/gpt-5.5-pro, gpt-5.5, openai/gpt-5.5, gpt-5.4-image-2, openai/gpt-5.4-image-2, gpt-5.4-nano, openai/gpt-5.4-nano, gpt-5.4-mini, openai/gpt-5.4-mini, gpt-5.4-pro, openai/gpt-5.4-pro, gpt-5.4, openai/gpt-5.4, gpt-5.3-codex, openai/gpt-5.3-codex, gpt-5.2-codex, openai/gpt-5.2-codex, gpt-5.2-chat, openai/gpt-5.2-chat, gpt-5.2-pro, openai/gpt-5.2-pro, gpt-5.2, openai/gpt-5.2, gpt-5.1-codex-max, openai/gpt-5.1-codex-max, gpt-5.1, openai/gpt-5.1, gpt-5.1-codex, openai/gpt-5.1-codex, gpt-5.1-codex-mini, openai/gpt-5.1-codex-mini, gpt-oss-safeguard-20b, openai/gpt-oss-safeguard-20b, gpt-5-image-mini, openai/gpt-5-image-mini, gpt-5-image, openai/gpt-5-image, gpt-5-pro, openai/gpt-5-pro, o3-pro, openai/o3-pro, o3, openai/o3, o1-pro, openai/o1-pro, gpt-4-turbo-preview, openai/gpt-4-turbo-preview, gpt-latest, openai/gpt-latest, gpt-mini-latest, openai/gpt-mini-latest, claude-opus-4.8-fast, anthropic/claude-opus-4.8-fast, claude-opus-4.8, anthropic/claude-opus-4.8, claude-opus-4.7-fast, anthropic/claude-opus-4.7-fast, claude-opus-4.7, anthropic/claude-opus-4.7, claude-sonnet-4.6, anthropic/claude-sonnet-4.6, claude-opus-4.6, anthropic/claude-opus-4.6, claude-opus-4.5, anthropic/claude-opus-4.5, claude-haiku-4.5, anthropic/claude-haiku-4.5, claude-sonnet-4.5, anthropic/claude-sonnet-4.5, claude-opus-4.1, anthropic/claude-opus-4.1, claude-opus-4, anthropic/claude-opus-4, claude-sonnet-4, anthropic/claude-sonnet-4, claude-3-haiku, anthropic/claude-3-haiku, anthropic/claude-fable-latest, claude-fable-latest, anthropic/claude-haiku-latest, claude-haiku-latest, anthropic/claude-sonnet-latest, claude-sonnet-latest, anthropic/claude-opus-latest, claude-opus-latest, deepseek-v4-flash-latest, deepseek/deepseek-v4-flash-latest, gemini-3.1-flash-lite-image, google/gemini-3.1-flash-lite-image, gemini-3.1-flash-image, google/gemini-3.1-flash-image, gemini-3-pro-image, google/gemini-3-pro-image, gemini-3.1-flash-lite-preview, google/gemini-3.1-flash-lite-preview, gemini-3.1-flash-image-preview, google/gemini-3.1-flash-image-preview, gemini-3.1-pro-preview-customtools, google/gemini-3.1-pro-preview-customtools, gemini-3-pro-image-preview, google/gemini-3-pro-image-preview, gemini-2.5-flash-image, google/gemini-2.5-flash-image, gemini-2.5-pro-preview, google/gemini-2.5-pro-preview, gemini-2.5-pro-preview-05-06, google/gemini-2.5-pro-preview-05-06, gemma-2-27b-it, google/gemma-2-27b-it, google/gemini-3-1-flash-lite-preview, google/gemini-pro-latest, gemini-pro-latest, google/gemini-flash-latest, gemini-flash-latest, muse-spark-1.1, meta/muse-spark-1.1, muse-spark-1.2, meta/muse-spark-1.2, mistral-medium-3-5, mistralai/mistral-medium-3-5, mistral-small-2603, mistralai/mistral-small-2603, ministral-14b-2512, mistralai/ministral-14b-2512, ministral-8b-2512, mistralai/ministral-8b-2512, ministral-3b-2512, mistralai/ministral-3b-2512, mistral-large-2512, mistralai/mistral-large-2512, voxtral-small-24b-2507, mistralai/voxtral-small-24b-2507, mistral-medium-3.1, mistralai/mistral-medium-3.1, codestral-2508, mistralai/codestral-2508, mistral-small-3.2-24b-instruct, mistralai/mistral-small-3.2-24b-instruct, mistral-medium-3, mistralai/mistral-medium-3, mistral-small-3.1-24b-instruct, mistralai/mistral-small-3.1-24b-instruct, mistral-saba, mistralai/mistral-saba, mistral-small-24b-instruct-2501, mistralai/mistral-small-24b-instruct-2501, mistral-large-2407, mistralai/mistral-large-2407, mixtral-8x22b-instruct, mistralai/mixtral-8x22b-instruct, mistral-large, mistralai/mistral-large, hermes-4-70b, nousresearch/hermes-4-70b, hermes-3-llama-3.1-70b, nousresearch/hermes-3-llama-3.1-70b, hermes-3-llama-3.1-405b, nousresearch/hermes-3-llama-3.1-405b, command-r7b-12-2024, cohere/command-r7b-12-2024, command-r-08-2024, cohere/command-r-08-2024, command-r-plus-08-2024, cohere/command-r-plus-08-2024, tencent/hy3, hy3, aion-3.0-mini, aion-labs/aion-3.0-mini, aion-2.0, aion-labs/aion-2.0, aion-3.0, aion-labs/aion-3.0, aion-rp-llama-3.1-8b, aion-labs/aion-rp-llama-3.1-8b, olmo-3-32b-think, allenai/olmo-3-32b-think, nova-2-lite-v1, amazon/nova-2-lite-v1, nova-premier-v1, amazon/nova-premier-v1, nova-lite-v1, amazon/nova-lite-v1, nova-micro-v1, amazon/nova-micro-v1, nova-pro-v1, amazon/nova-pro-v1, trinity-large-thinking, arcee-ai/trinity-large-thinking, virtuoso-large, arcee-ai/virtuoso-large, seed-2-1-turbo, bytedance-seed/seed-2-1-turbo, seed-2.0-code, bytedance-seed/seed-2.0-code, seed-2.0-lite, bytedance-seed/seed-2.0-lite, seed-2.0-mini, bytedance-seed/seed-2.0-mini, seed-1.6-flash, bytedance-seed/seed-1.6-flash, seed-1.6, bytedance-seed/seed-1.6, dolphin-mistral-24b-venice-edition, cognitivecomputations/dolphin-mistral-24b-venice-edition, granite-4.1-8b, ibm-granite/granite-4.1-8b, granite-4.0-h-micro, ibm-granite/granite-4.0-h-micro, mercury-2, inception/mercury-2, kat-coder-pro-v2, kwaipilot/kat-coder-pro-v2, kat-coder-pro-v2.5, kwaipilot/kat-coder-pro-v2.5, kat-coder-air-v2.5, kwaipilot/kat-coder-air-v2.5, weaver, mancer/weaver, moonshotai/kimi-latest, kimi-latest, kimi-k2.7-code, moonshotai/kimi-k2.7-code, kimi-k2.6, moonshotai/kimi-k2.6, kimi-k2.5, moonshotai/kimi-k2.5, kimi-k2-thinking, moonshotai/kimi-k2-thinking, kimi-k2-0905, moonshotai/kimi-k2-0905, kimi-k2, moonshotai/kimi-k2, morph-v3-large, morph/morph-v3-large, morph-v3-fast, morph/morph-v3-fast, nex-n2-mini, nex-agi/nex-n2-mini, nex-n2-pro, nex-agi/nex-n2-pro, perceptron-mk1, perceptron/perceptron-mk1, laguna-xs-2.1, poolside/laguna-xs-2.1, laguna-s-2.1, poolside/laguna-s-2.1, reka-edge, rekaai/reka-edge, reka-flash-3, rekaai/reka-flash-3, relace-search, relace/relace-search, relace-apply-3, relace/relace-apply-3, l3.3-euryale-70b, sao10k/l3.3-euryale-70b, l3.1-euryale-70b, sao10k/l3.1-euryale-70b, l3-lunaris-8b, sao10k/l3-lunaris-8b, cydonia-24b-v4.1, thedrummer/cydonia-24b-v4.1, skyfall-36b-v2, thedrummer/skyfall-36b-v2, unslopnemo-12b, thedrummer/unslopnemo-12b, remm-slerp-l2-13b, undi95/remm-slerp-l2-13b, solar-pro-3, upstage/solar-pro-3, solar-pro4, upstage/solar-pro4, palmyra-x5, writer/palmyra-x5, glm-5.3-flash, z-ai/glm-5.3-flash, z-ai/glm-5.3, z-ai/glm-5.2, z-ai/glm-5.1, z-ai/glm-5, glm-4.7-flash, z-ai/glm-4.7-flash, z-ai/glm-4.7, glm-4.6v, z-ai/glm-4.6v, z-ai/glm-4.6, glm-4.5v, z-ai/glm-4.5v, z-ai/glm-4.5, z-ai/glm-4.5-air - type: object properties: model: type: string enum: - claude-opus-4-1-20250805 - anthropic/claude-opus-4-1-20250805 - claude-sonnet-4-5-20250929 - anthropic/claude-sonnet-4-5-20250929 - claude-haiku-4-5-20251001 - anthropic/claude-haiku-4-5-20251001 - claude-opus-4-5-20251101 - anthropic/claude-opus-4-5-20251101 - claude-opus-4-6 - anthropic/claude-opus-4-6 - claude-sonnet-4-6 - anthropic/claude-sonnet-4-6 - claude-opus-4-1-latest - claude-opus-4-1 - anthropic/claude-opus-4.1-20250805 - claude-sonnet-4-5 - claude-haiku-4-5 - anthropic/claude-opus-4-5 - claude-opus-4-5 - anthropic/claude-sonnet-4-6-20260218 messages: anyOf: - type: array items: type: object properties: role: type: string enum: - user - assistant content: anyOf: - type: string - type: array items: oneOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image source: oneOf: - type: object properties: type: type: string enum: - base64 description: The type of the image. media_type: type: string enum: - image/jpeg - image/png - image/gif - image/webp description: The media type of the image. data: type: string description: The base64 encoded image data. required: - type - media_type - data - type: object properties: type: type: string enum: - url url: type: string format: uri required: - type - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source - type: object properties: type: type: string enum: - thinking thinking: type: string signature: type: string required: - type - thinking - signature - type: object properties: type: type: string enum: - tool_result tool_use_id: type: string is_error: type: boolean content: anyOf: - type: string - type: array items: oneOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image source: oneOf: - type: object properties: type: type: string enum: - base64 description: The type of the image. media_type: type: string enum: - image/jpeg - image/png - image/gif - image/webp description: The media type of the image. data: type: string description: The base64 encoded image data. required: - type - media_type - data - type: object properties: type: type: string enum: - url url: type: string format: uri required: - type - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source - type: object properties: type: type: string enum: - search_result source: type: string title: type: string content: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source - title - content - type: object properties: type: type: string enum: - document source: oneOf: - type: object properties: type: type: string enum: - base64 media_type: type: string enum: - application/pdf - text/plain data: type: string required: - type - media_type - data - type: object properties: type: type: string enum: - text media_type: type: string enum: - text/plain data: type: string required: - type - media_type - data - type: object properties: type: type: string enum: - url url: type: string format: uri required: - type - url - type: object properties: type: type: string enum: - content content: anyOf: - type: string - type: array items: {} required: - type - content title: type: string context: type: string cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source - type: object properties: type: type: string enum: - tool_reference tool_name: type: string cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_use_id - type: object properties: type: type: string enum: - tool_use id: type: string name: type: string input: type: object additionalProperties: {} caller: oneOf: - type: object properties: type: type: string enum: - direct required: - type - type: object properties: type: type: string enum: - code_execution_20250825 tool_id: type: string required: - type - tool_id - type: object properties: type: type: string enum: - code_execution_20260120 tool_id: type: string required: - type - tool_id cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - id - name - input - type: object properties: type: type: string enum: - server_tool_use id: type: string name: type: string enum: - web_search - web_fetch - code_execution - bash_code_execution - text_editor_code_execution - tool_search_tool_regex - tool_search_tool_bm25 input: type: object additionalProperties: {} caller: oneOf: - type: object properties: type: type: string enum: - direct required: - type - type: object properties: type: type: string enum: - code_execution_20250825 tool_id: type: string required: - type - tool_id - type: object properties: type: type: string enum: - code_execution_20260120 tool_id: type: string required: - type - tool_id cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - id - name - input - type: object properties: type: type: string enum: - search_result source: type: string title: type: string content: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source - title - content - type: object properties: type: type: string enum: - web_search_tool_result tool_use_id: type: string content: anyOf: - type: array items: type: object properties: type: type: string enum: - web_search_result title: type: string url: type: string page_age: type: string encrypted_content: type: string required: - type - title - url - encrypted_content - type: object properties: type: type: string enum: - web_search_tool_result_error error_code: type: string enum: - invalid_tool_input - unavailable - max_uses_exceeded - too_many_requests - query_too_long - request_too_large required: - type - error_code caller: oneOf: - type: object properties: type: type: string enum: - direct required: - type - type: object properties: type: type: string enum: - code_execution_20250825 tool_id: type: string required: - type - tool_id - type: object properties: type: type: string enum: - code_execution_20260120 tool_id: type: string required: - type - tool_id cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_use_id - content - type: object properties: type: type: string enum: - web_fetch_tool_result tool_use_id: type: string content: anyOf: - type: object properties: type: type: string enum: - web_fetch_tool_result_error error_code: type: string enum: - invalid_tool_input - url_too_long - url_not_allowed - url_not_accessible - unsupported_content_type - too_many_requests - max_uses_exceeded - unavailable required: - type - error_code - type: object properties: type: type: string enum: - web_fetch_result url: type: string retrieved_at: type: string content: type: object properties: type: type: string enum: - document source: oneOf: - type: object properties: type: type: string enum: - base64 media_type: type: string enum: - application/pdf - text/plain data: type: string required: - type - media_type - data - type: object properties: type: type: string enum: - text media_type: type: string enum: - text/plain data: type: string required: - type - media_type - data - type: object properties: type: type: string enum: - url url: type: string format: uri required: - type - url - type: object properties: type: type: string enum: - content content: anyOf: - type: string - type: array items: {} required: - type - content title: type: string context: type: string cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source required: - type - url - content caller: oneOf: - type: object properties: type: type: string enum: - direct required: - type - type: object properties: type: type: string enum: - code_execution_20250825 tool_id: type: string required: - type - tool_id - type: object properties: type: type: string enum: - code_execution_20260120 tool_id: type: string required: - type - tool_id cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_use_id - content - type: object properties: type: type: string enum: - code_execution_tool_result tool_use_id: type: string content: oneOf: - type: object properties: type: type: string enum: - code_execution_tool_result_error error_code: type: string enum: - invalid_tool_input - unavailable - too_many_requests - execution_time_exceeded required: - type - error_code - type: object properties: type: type: string enum: - code_execution_result stdout: type: string stderr: type: string return_code: type: number content: type: array items: type: object properties: type: type: string enum: - code_execution_output file_id: type: string required: - type - file_id required: - type - stdout - stderr - return_code - type: object properties: type: type: string enum: - encrypted_code_execution_result encrypted_stdout: type: string stderr: type: string return_code: type: number content: type: array items: type: object properties: type: type: string enum: - code_execution_output file_id: type: string required: - type - file_id required: - type - encrypted_stdout - stderr - return_code cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_use_id - content - type: object properties: type: type: string enum: - bash_code_execution_tool_result tool_use_id: type: string content: anyOf: - type: object properties: type: type: string enum: - bash_code_execution_tool_result_error error_code: type: string enum: - invalid_tool_input - unavailable - too_many_requests - execution_time_exceeded - output_file_too_large required: - type - error_code - type: object properties: type: type: string enum: - bash_code_execution_result stdout: type: string stderr: type: string return_code: type: number content: type: array items: type: object properties: type: type: string enum: - bash_code_execution_output file_id: type: string required: - type - file_id required: - type - stdout - stderr - return_code cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_use_id - content - type: object properties: type: type: string enum: - text_editor_code_execution_tool_result tool_use_id: type: string content: oneOf: - type: object properties: type: type: string enum: - text_editor_code_execution_tool_result_error error_code: type: string enum: - invalid_tool_input - unavailable - too_many_requests - execution_time_exceeded - file_not_found error_message: type: string required: - type - error_code - type: object properties: type: type: string enum: - text_editor_code_execution_view_result content: type: string file_type: type: string enum: - text - image - pdf start_line: type: number num_lines: type: number total_lines: type: number required: - type - content - file_type - type: object properties: type: type: string enum: - text_editor_code_execution_create_result is_file_update: type: boolean required: - type - is_file_update - type: object properties: type: type: string enum: - text_editor_code_execution_str_replace_result old_start: type: number old_lines: type: number new_start: type: number new_lines: type: number lines: type: array items: type: string required: - type cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_use_id - content - type: object properties: type: type: string enum: - tool_search_tool_result tool_use_id: type: string content: oneOf: - type: object properties: type: type: string enum: - tool_search_tool_result_error error_code: type: string enum: - invalid_tool_input - unavailable - too_many_requests - execution_time_exceeded required: - type - error_code - type: object properties: type: type: string enum: - tool_search_tool_search_result tool_references: type: array items: type: object properties: type: type: string enum: - tool_reference tool_name: type: string cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_name required: - type - tool_references cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_use_id - content - type: object properties: type: type: string enum: - redacted_thinking data: type: string required: - type - data - type: object properties: type: type: string enum: - document source: oneOf: - type: object properties: type: type: string enum: - base64 media_type: type: string enum: - application/pdf - text/plain data: type: string required: - type - media_type - data - type: object properties: type: type: string enum: - text media_type: type: string enum: - text/plain data: type: string required: - type - media_type - data - type: object properties: type: type: string enum: - url url: type: string format: uri required: - type - url - type: object properties: type: type: string enum: - content content: anyOf: - type: string - type: array items: {} required: - type - content title: type: string context: type: string cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source required: - role - content - type: array items: oneOf: - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - image source: type: object properties: type: type: string enum: - base64 media_type: type: string enum: - image/jpeg - image/png - image/gif - image/webp data: type: string required: - type - media_type - data cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - input_audio description: The type of the content part. input_audio: type: object properties: data: anyOf: - type: string format: uri - type: string - type: string description: Either a URL of the audio or the base64 encoded audio data. format: type: string enum: - wav - mp3 - audio/x-aac - audio/flac - audio/mp3 - audio/m4a - audio/mpeg - audio/mpga - audio/mp4 - audio/ogg - audio/pcm - audio/webm description: The format of the encoded audio data. Currently supports "wav" and "mp3". required: - data - format required: - type - input_audio - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file - type: object properties: type: type: string enum: - video_url video_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: Base64-encoded local video file. required: - url required: - type - video_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - function content: type: string name: type: string required: - role - content - name - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. reasoning_content: type: string refusal: type: - string - 'null' description: The refusal message by the Assistant. audio: type: - object - 'null' properties: id: type: string description: Unique identifier for a previous audio response from the model. required: - id description: Data about a previous audio response from the model. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. metadata: type: object additionalProperties: type: string description: An object describing metadata about the request stop_sequences: type: array items: type: string description: Custom text sequences that will cause the model to stop generating. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. system: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text default: text text: type: string citations: type: array items: oneOf: - type: object properties: type: type: string enum: - char_location cited_text: type: string document_index: type: number document_title: type: string end_char_index: type: number start_char_index: type: number required: - type - cited_text - document_index - document_title - end_char_index - start_char_index - type: object properties: type: type: string enum: - page_location cited_text: type: string document_index: type: number document_title: type: string end_page_number: type: number start_page_number: type: number required: - type - cited_text - document_index - document_title - end_page_number - start_page_number - type: object properties: type: type: string enum: - content_block_location cited_text: type: string document_index: type: number document_title: type: string end_block_index: type: number start_block_index: type: number required: - type - cited_text - document_index - document_title - end_block_index - start_block_index - type: object properties: type: type: string enum: - web_search_result_location cited_text: type: string encrypted_index: type: string title: type: string url: type: string required: - type - cited_text - encrypted_index - title - url - type: object properties: type: type: string enum: - search_result_location cited_text: type: string end_block_index: type: number search_result_index: type: number source: type: string start_block_index: type: number title: type: string required: - type - cited_text - end_block_index - search_result_index - source - start_block_index - title cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - text description: A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. tool_choice: anyOf: - type: object properties: type: type: string enum: - auto disable_parallel_tool_use: type: boolean required: - type - type: object properties: type: type: string enum: - any disable_parallel_tool_use: type: boolean required: - type - type: object properties: name: type: string type: type: string enum: - tool disable_parallel_tool_use: type: boolean required: - name - type - type: object properties: type: type: string enum: - none required: - type - type: object properties: type: type: string minLength: 1 required: - type - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." tools: anyOf: - type: array items: anyOf: - oneOf: - type: object properties: name: type: string description: Name of the tool. description: type: string description: "Description of what this tool does.\n Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema." input_schema: type: object properties: type: type: string enum: - object properties: {} required: type: array items: type: string required: - type additionalProperties: {} description: "JSON schema for this tool's input.\n This defines the shape of the input that your tool accepts and that the model will produce." type: type: string enum: - custom defer_loading: type: boolean eager_input_streaming: type: boolean input_examples: type: array items: type: object additionalProperties: {} strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - name - input_schema - type: object properties: name: type: string enum: - bash default: bash type: type: string enum: - bash_20250124 input_examples: type: array items: type: object additionalProperties: {} defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - code_execution default: code_execution type: type: string enum: - code_execution_20250522 defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - code_execution default: code_execution type: type: string enum: - code_execution_20250825 defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - code_execution default: code_execution type: type: string enum: - code_execution_20260120 defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - memory default: memory type: type: string enum: - memory_20250818 input_examples: type: array items: type: object additionalProperties: {} defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - str_replace_editor default: str_replace_editor type: type: string enum: - text_editor_20250124 input_examples: type: array items: type: object additionalProperties: {} defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - str_replace_based_edit_tool default: str_replace_based_edit_tool type: type: string enum: - text_editor_20250429 input_examples: type: array items: type: object additionalProperties: {} defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - str_replace_based_edit_tool default: str_replace_based_edit_tool type: type: string enum: - text_editor_20250728 max_characters: type: number input_examples: type: array items: type: object additionalProperties: {} defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - web_search default: web_search type: type: string enum: - web_search_20250305 allowed_domains: type: array items: type: string blocked_domains: type: array items: type: string max_uses: type: number user_location: type: object properties: type: type: string enum: - approximate city: type: string country: type: string region: type: string timezone: type: string required: - type defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - web_search default: web_search type: type: string enum: - web_search_20260209 allowed_domains: type: array items: type: string blocked_domains: type: array items: type: string max_uses: type: number user_location: type: object properties: type: type: string enum: - approximate city: type: string country: type: string region: type: string timezone: type: string required: - type defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - web_fetch default: web_fetch type: type: string enum: - web_fetch_20250910 allowed_domains: type: array items: type: string blocked_domains: type: array items: type: string citations: type: object properties: enabled: type: boolean max_content_tokens: type: number max_uses: type: number defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - web_fetch default: web_fetch type: type: string enum: - web_fetch_20260209 allowed_domains: type: array items: type: string blocked_domains: type: array items: type: string citations: type: object properties: enabled: type: boolean max_content_tokens: type: number max_uses: type: number defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - web_fetch default: web_fetch type: type: string enum: - web_fetch_20260309 allowed_domains: type: array items: type: string blocked_domains: type: array items: type: string citations: type: object properties: enabled: type: boolean max_content_tokens: type: number max_uses: type: number defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - tool_search_tool_bm25 default: tool_search_tool_bm25 type: type: string enum: - tool_search_tool_bm25_20251119 - tool_search_tool_bm25 defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - tool_search_tool_regex default: tool_search_tool_regex type: type: string enum: - tool_search_tool_regex_20251119 - tool_search_tool_regex defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: type: type: string minLength: 1 required: - type - type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: "Definitions of tools that the model may use.\n If you include tools in your API request, the model may return tool_use content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using tool_result content blocks.\n Each tool definition includes:\n name: Name of the tool.\n description: Optional, but strongly-recommended description of the tool.\n input_schema: JSON schema for the tool input shape that the model will produce in tool_use output content blocks." thinking: anyOf: - oneOf: - type: object properties: type: type: string enum: - enabled budget_tokens: type: integer minimum: 1024 description: Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality. Must be ≥1024 and less than max_tokens. display: type: string enum: - summarized - omitted default: summarized required: - type - budget_tokens - type: object properties: type: type: string enum: - disabled required: - type - type: object properties: type: type: string enum: - adaptive display: type: string enum: - summarized - omitted default: summarized required: - type - type: object properties: type: type: string minLength: 1 required: - type description: Configuration for enabling Claude's extended thinking. When enabled, responses include thinking content blocks showing Claude's thinking process before the final answer. Requires a minimum budget of 1,024 tokens and counts towards your max_tokens limit. max_tokens: type: number default: 32000 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. temperature: type: number minimum: 0 maximum: 1 description: Amount of randomness injected into the response. Defaults to 1.0. Ranges from 0.0 to 1.0. Use temperature closer to 0.0 for analytical / multiple choice, and closer to 1.0 for creative and generative tasks. Note that even with temperature of 0.0, the results will not be fully deterministic. top_p: type: number minimum: 0 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." top_k: type: number minimum: 0 description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. required: - model - messages title: claude-opus-4-1-20250805, anthropic/claude-opus-4-1-20250805, claude-sonnet-4-5-20250929, anthropic/claude-sonnet-4-5-20250929, claude-haiku-4-5-20251001, anthropic/claude-haiku-4-5-20251001, claude-opus-4-5-20251101, anthropic/claude-opus-4-5-20251101, claude-opus-4-6, anthropic/claude-opus-4-6, claude-sonnet-4-6, anthropic/claude-sonnet-4-6, claude-opus-4-1-latest, claude-opus-4-1, anthropic/claude-opus-4.1-20250805, claude-sonnet-4-5, claude-haiku-4-5, anthropic/claude-opus-4-5, claude-opus-4-5, anthropic/claude-sonnet-4-6-20260218 - type: object properties: model: type: string enum: - claude-opus-4-7 - anthropic/claude-opus-4-7 - claude-opus-4-8 - anthropic/claude-opus-4-8 - claude-fable-5 - anthropic/claude-fable-5 - claude-sonnet-5 - anthropic/claude-sonnet-5 - claude-opus-5 - anthropic/claude-opus-5 messages: anyOf: - type: array items: type: object properties: role: type: string enum: - user - assistant content: anyOf: - type: string - type: array items: oneOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image source: oneOf: - type: object properties: type: type: string enum: - base64 description: The type of the image. media_type: type: string enum: - image/jpeg - image/png - image/gif - image/webp description: The media type of the image. data: type: string description: The base64 encoded image data. required: - type - media_type - data - type: object properties: type: type: string enum: - url url: type: string format: uri required: - type - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source - type: object properties: type: type: string enum: - thinking thinking: type: string signature: type: string required: - type - thinking - signature - type: object properties: type: type: string enum: - tool_result tool_use_id: type: string is_error: type: boolean content: anyOf: - type: string - type: array items: oneOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image source: oneOf: - type: object properties: type: type: string enum: - base64 description: The type of the image. media_type: type: string enum: - image/jpeg - image/png - image/gif - image/webp description: The media type of the image. data: type: string description: The base64 encoded image data. required: - type - media_type - data - type: object properties: type: type: string enum: - url url: type: string format: uri required: - type - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source - type: object properties: type: type: string enum: - search_result source: type: string title: type: string content: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source - title - content - type: object properties: type: type: string enum: - document source: oneOf: - type: object properties: type: type: string enum: - base64 media_type: type: string enum: - application/pdf - text/plain data: type: string required: - type - media_type - data - type: object properties: type: type: string enum: - text media_type: type: string enum: - text/plain data: type: string required: - type - media_type - data - type: object properties: type: type: string enum: - url url: type: string format: uri required: - type - url - type: object properties: type: type: string enum: - content content: anyOf: - type: string - type: array items: {} required: - type - content title: type: string context: type: string cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source - type: object properties: type: type: string enum: - tool_reference tool_name: type: string cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_use_id - type: object properties: type: type: string enum: - tool_use id: type: string name: type: string input: type: object additionalProperties: {} caller: oneOf: - type: object properties: type: type: string enum: - direct required: - type - type: object properties: type: type: string enum: - code_execution_20250825 tool_id: type: string required: - type - tool_id - type: object properties: type: type: string enum: - code_execution_20260120 tool_id: type: string required: - type - tool_id cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - id - name - input - type: object properties: type: type: string enum: - server_tool_use id: type: string name: type: string enum: - web_search - web_fetch - code_execution - bash_code_execution - text_editor_code_execution - tool_search_tool_regex - tool_search_tool_bm25 input: type: object additionalProperties: {} caller: oneOf: - type: object properties: type: type: string enum: - direct required: - type - type: object properties: type: type: string enum: - code_execution_20250825 tool_id: type: string required: - type - tool_id - type: object properties: type: type: string enum: - code_execution_20260120 tool_id: type: string required: - type - tool_id cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - id - name - input - type: object properties: type: type: string enum: - search_result source: type: string title: type: string content: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source - title - content - type: object properties: type: type: string enum: - web_search_tool_result tool_use_id: type: string content: anyOf: - type: array items: type: object properties: type: type: string enum: - web_search_result title: type: string url: type: string page_age: type: string encrypted_content: type: string required: - type - title - url - encrypted_content - type: object properties: type: type: string enum: - web_search_tool_result_error error_code: type: string enum: - invalid_tool_input - unavailable - max_uses_exceeded - too_many_requests - query_too_long - request_too_large required: - type - error_code caller: oneOf: - type: object properties: type: type: string enum: - direct required: - type - type: object properties: type: type: string enum: - code_execution_20250825 tool_id: type: string required: - type - tool_id - type: object properties: type: type: string enum: - code_execution_20260120 tool_id: type: string required: - type - tool_id cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_use_id - content - type: object properties: type: type: string enum: - web_fetch_tool_result tool_use_id: type: string content: anyOf: - type: object properties: type: type: string enum: - web_fetch_tool_result_error error_code: type: string enum: - invalid_tool_input - url_too_long - url_not_allowed - url_not_accessible - unsupported_content_type - too_many_requests - max_uses_exceeded - unavailable required: - type - error_code - type: object properties: type: type: string enum: - web_fetch_result url: type: string retrieved_at: type: string content: type: object properties: type: type: string enum: - document source: oneOf: - type: object properties: type: type: string enum: - base64 media_type: type: string enum: - application/pdf - text/plain data: type: string required: - type - media_type - data - type: object properties: type: type: string enum: - text media_type: type: string enum: - text/plain data: type: string required: - type - media_type - data - type: object properties: type: type: string enum: - url url: type: string format: uri required: - type - url - type: object properties: type: type: string enum: - content content: anyOf: - type: string - type: array items: {} required: - type - content title: type: string context: type: string cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source required: - type - url - content caller: oneOf: - type: object properties: type: type: string enum: - direct required: - type - type: object properties: type: type: string enum: - code_execution_20250825 tool_id: type: string required: - type - tool_id - type: object properties: type: type: string enum: - code_execution_20260120 tool_id: type: string required: - type - tool_id cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_use_id - content - type: object properties: type: type: string enum: - code_execution_tool_result tool_use_id: type: string content: oneOf: - type: object properties: type: type: string enum: - code_execution_tool_result_error error_code: type: string enum: - invalid_tool_input - unavailable - too_many_requests - execution_time_exceeded required: - type - error_code - type: object properties: type: type: string enum: - code_execution_result stdout: type: string stderr: type: string return_code: type: number content: type: array items: type: object properties: type: type: string enum: - code_execution_output file_id: type: string required: - type - file_id required: - type - stdout - stderr - return_code - type: object properties: type: type: string enum: - encrypted_code_execution_result encrypted_stdout: type: string stderr: type: string return_code: type: number content: type: array items: type: object properties: type: type: string enum: - code_execution_output file_id: type: string required: - type - file_id required: - type - encrypted_stdout - stderr - return_code cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_use_id - content - type: object properties: type: type: string enum: - bash_code_execution_tool_result tool_use_id: type: string content: anyOf: - type: object properties: type: type: string enum: - bash_code_execution_tool_result_error error_code: type: string enum: - invalid_tool_input - unavailable - too_many_requests - execution_time_exceeded - output_file_too_large required: - type - error_code - type: object properties: type: type: string enum: - bash_code_execution_result stdout: type: string stderr: type: string return_code: type: number content: type: array items: type: object properties: type: type: string enum: - bash_code_execution_output file_id: type: string required: - type - file_id required: - type - stdout - stderr - return_code cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_use_id - content - type: object properties: type: type: string enum: - text_editor_code_execution_tool_result tool_use_id: type: string content: oneOf: - type: object properties: type: type: string enum: - text_editor_code_execution_tool_result_error error_code: type: string enum: - invalid_tool_input - unavailable - too_many_requests - execution_time_exceeded - file_not_found error_message: type: string required: - type - error_code - type: object properties: type: type: string enum: - text_editor_code_execution_view_result content: type: string file_type: type: string enum: - text - image - pdf start_line: type: number num_lines: type: number total_lines: type: number required: - type - content - file_type - type: object properties: type: type: string enum: - text_editor_code_execution_create_result is_file_update: type: boolean required: - type - is_file_update - type: object properties: type: type: string enum: - text_editor_code_execution_str_replace_result old_start: type: number old_lines: type: number new_start: type: number new_lines: type: number lines: type: array items: type: string required: - type cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_use_id - content - type: object properties: type: type: string enum: - tool_search_tool_result tool_use_id: type: string content: oneOf: - type: object properties: type: type: string enum: - tool_search_tool_result_error error_code: type: string enum: - invalid_tool_input - unavailable - too_many_requests - execution_time_exceeded required: - type - error_code - type: object properties: type: type: string enum: - tool_search_tool_search_result tool_references: type: array items: type: object properties: type: type: string enum: - tool_reference tool_name: type: string cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_name required: - type - tool_references cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - tool_use_id - content - type: object properties: type: type: string enum: - redacted_thinking data: type: string required: - type - data - type: object properties: type: type: string enum: - document source: oneOf: - type: object properties: type: type: string enum: - base64 media_type: type: string enum: - application/pdf - text/plain data: type: string required: - type - media_type - data - type: object properties: type: type: string enum: - text media_type: type: string enum: - text/plain data: type: string required: - type - media_type - data - type: object properties: type: type: string enum: - url url: type: string format: uri required: - type - url - type: object properties: type: type: string enum: - content content: anyOf: - type: string - type: array items: {} required: - type - content title: type: string context: type: string cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source required: - role - content - type: array items: oneOf: - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - image source: type: object properties: type: type: string enum: - base64 media_type: type: string enum: - image/jpeg - image/png - image/gif - image/webp data: type: string required: - type - media_type - data cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - source - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - input_audio description: The type of the content part. input_audio: type: object properties: data: anyOf: - type: string format: uri - type: string - type: string description: Either a URL of the audio or the base64 encoded audio data. format: type: string enum: - wav - mp3 - audio/x-aac - audio/flac - audio/mp3 - audio/m4a - audio/mpeg - audio/mpga - audio/mp4 - audio/ogg - audio/pcm - audio/webm description: The format of the encoded audio data. Currently supports "wav" and "mp3". required: - data - format required: - type - input_audio - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file - type: object properties: type: type: string enum: - video_url video_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: Base64-encoded local video file. required: - url required: - type - video_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - function content: type: string name: type: string required: - role - content - name - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. reasoning_content: type: string refusal: type: - string - 'null' description: The refusal message by the Assistant. audio: type: - object - 'null' properties: id: type: string description: Unique identifier for a previous audio response from the model. required: - id description: Data about a previous audio response from the model. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. metadata: type: object additionalProperties: type: string description: An object describing metadata about the request stop_sequences: type: array items: type: string description: Custom text sequences that will cause the model to stop generating. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. system: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text default: text text: type: string citations: type: array items: oneOf: - type: object properties: type: type: string enum: - char_location cited_text: type: string document_index: type: number document_title: type: string end_char_index: type: number start_char_index: type: number required: - type - cited_text - document_index - document_title - end_char_index - start_char_index - type: object properties: type: type: string enum: - page_location cited_text: type: string document_index: type: number document_title: type: string end_page_number: type: number start_page_number: type: number required: - type - cited_text - document_index - document_title - end_page_number - start_page_number - type: object properties: type: type: string enum: - content_block_location cited_text: type: string document_index: type: number document_title: type: string end_block_index: type: number start_block_index: type: number required: - type - cited_text - document_index - document_title - end_block_index - start_block_index - type: object properties: type: type: string enum: - web_search_result_location cited_text: type: string encrypted_index: type: string title: type: string url: type: string required: - type - cited_text - encrypted_index - title - url - type: object properties: type: type: string enum: - search_result_location cited_text: type: string end_block_index: type: number search_result_index: type: number source: type: string start_block_index: type: number title: type: string required: - type - cited_text - end_block_index - search_result_index - source - start_block_index - title cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - text description: A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. tool_choice: anyOf: - type: object properties: type: type: string enum: - auto disable_parallel_tool_use: type: boolean required: - type - type: object properties: type: type: string enum: - any disable_parallel_tool_use: type: boolean required: - type - type: object properties: name: type: string type: type: string enum: - tool disable_parallel_tool_use: type: boolean required: - name - type - type: object properties: type: type: string enum: - none required: - type - type: object properties: type: type: string minLength: 1 required: - type - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." tools: anyOf: - type: array items: anyOf: - oneOf: - type: object properties: name: type: string description: Name of the tool. description: type: string description: "Description of what this tool does.\n Tool descriptions should be as detailed as possible. The more information that the model has about what the tool is and how to use it, the better it will perform. You can use natural language descriptions to reinforce important aspects of the tool input JSON schema." input_schema: type: object properties: type: type: string enum: - object properties: {} required: type: array items: type: string required: - type additionalProperties: {} description: "JSON schema for this tool's input.\n This defines the shape of the input that your tool accepts and that the model will produce." type: type: string enum: - custom defer_loading: type: boolean eager_input_streaming: type: boolean input_examples: type: array items: type: object additionalProperties: {} strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - name - input_schema - type: object properties: name: type: string enum: - bash default: bash type: type: string enum: - bash_20250124 input_examples: type: array items: type: object additionalProperties: {} defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - code_execution default: code_execution type: type: string enum: - code_execution_20250522 defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - code_execution default: code_execution type: type: string enum: - code_execution_20250825 defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - code_execution default: code_execution type: type: string enum: - code_execution_20260120 defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - memory default: memory type: type: string enum: - memory_20250818 input_examples: type: array items: type: object additionalProperties: {} defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - str_replace_editor default: str_replace_editor type: type: string enum: - text_editor_20250124 input_examples: type: array items: type: object additionalProperties: {} defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - str_replace_based_edit_tool default: str_replace_based_edit_tool type: type: string enum: - text_editor_20250429 input_examples: type: array items: type: object additionalProperties: {} defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - str_replace_based_edit_tool default: str_replace_based_edit_tool type: type: string enum: - text_editor_20250728 max_characters: type: number input_examples: type: array items: type: object additionalProperties: {} defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - web_search default: web_search type: type: string enum: - web_search_20250305 allowed_domains: type: array items: type: string blocked_domains: type: array items: type: string max_uses: type: number user_location: type: object properties: type: type: string enum: - approximate city: type: string country: type: string region: type: string timezone: type: string required: - type defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - web_search default: web_search type: type: string enum: - web_search_20260209 allowed_domains: type: array items: type: string blocked_domains: type: array items: type: string max_uses: type: number user_location: type: object properties: type: type: string enum: - approximate city: type: string country: type: string region: type: string timezone: type: string required: - type defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - web_fetch default: web_fetch type: type: string enum: - web_fetch_20250910 allowed_domains: type: array items: type: string blocked_domains: type: array items: type: string citations: type: object properties: enabled: type: boolean max_content_tokens: type: number max_uses: type: number defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - web_fetch default: web_fetch type: type: string enum: - web_fetch_20260209 allowed_domains: type: array items: type: string blocked_domains: type: array items: type: string citations: type: object properties: enabled: type: boolean max_content_tokens: type: number max_uses: type: number defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - web_fetch default: web_fetch type: type: string enum: - web_fetch_20260309 allowed_domains: type: array items: type: string blocked_domains: type: array items: type: string citations: type: object properties: enabled: type: boolean max_content_tokens: type: number max_uses: type: number defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - tool_search_tool_bm25 default: tool_search_tool_bm25 type: type: string enum: - tool_search_tool_bm25_20251119 - tool_search_tool_bm25 defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: name: type: string enum: - tool_search_tool_regex default: tool_search_tool_regex type: type: string enum: - tool_search_tool_regex_20251119 - tool_search_tool_regex defer_loading: type: boolean strict: type: boolean allowed_callers: type: array items: type: string enum: - direct - code_execution_20250825 - code_execution_20260120 cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - type: object properties: type: type: string minLength: 1 required: - type - type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: "Definitions of tools that the model may use.\n If you include tools in your API request, the model may return tool_use content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using tool_result content blocks.\n Each tool definition includes:\n name: Name of the tool.\n description: Optional, but strongly-recommended description of the tool.\n input_schema: JSON schema for the tool input shape that the model will produce in tool_use output content blocks." thinking: anyOf: - oneOf: - type: object properties: type: type: string enum: - enabled budget_tokens: type: integer minimum: 1024 description: Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality. Must be ≥1024 and less than max_tokens. display: type: string enum: - summarized - omitted default: summarized required: - type - budget_tokens - type: object properties: type: type: string enum: - disabled required: - type - type: object properties: type: type: string enum: - adaptive display: type: string enum: - summarized - omitted default: summarized required: - type - type: object properties: type: type: string minLength: 1 required: - type description: Configuration for enabling Claude's extended thinking. When enabled, responses include thinking content blocks showing Claude's thinking process before the final answer. Requires a minimum budget of 1,024 tokens and counts towards your max_tokens limit. max_tokens: type: number default: 128000 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. required: - model - messages title: claude-opus-4-7, anthropic/claude-opus-4-7, claude-opus-4-8, anthropic/claude-opus-4-8, claude-fable-5, anthropic/claude-fable-5, claude-sonnet-5, anthropic/claude-sonnet-5, claude-opus-5, anthropic/claude-opus-5 - type: object properties: model: type: string enum: - bytedance/seed-1-8 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: bytedance/seed-1-8 - type: object properties: model: type: string enum: - bytedance/seed-2-0-pro - bytedance/seed-2-0-code-preview - bytedance/dola-seed-2-0-pro - bytedance/dola-seed-2-0-code provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - video_url description: The type of the content part. video_url: type: object properties: url: type: string format: uri description: Either a URL of the video or the base64 encoded video data. required: - url required: - type - video_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. required: - model - messages title: bytedance/seed-2-0-pro, bytedance/seed-2-0-code-preview, bytedance/dola-seed-2-0-pro, bytedance/dola-seed-2-0-code - type: object properties: model: type: string enum: - bytedance/seed-2-0-lite - bytedance/seed-2-0-mini - bytedance/dola-seed-2-0-lite - bytedance/dola-seed-2-0-mini provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - video_url description: The type of the content part. video_url: type: object properties: url: type: string format: uri description: Either a URL of the video or the base64 encoded video data. required: - url required: - type - video_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: bytedance/seed-2-0-lite, bytedance/seed-2-0-mini, bytedance/dola-seed-2-0-lite, bytedance/dola-seed-2-0-mini - type: object properties: model: type: string enum: - deepseek-v4-pro - deepseek/deepseek-v4-pro provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. description: An object specifying the format that the model must output. echo: type: boolean description: If True, the response will contain the prompt. Can be used with logprobs to return prompt logprobs. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. required: - model - messages title: deepseek-v4-pro, deepseek/deepseek-v4-pro - type: object properties: model: type: string enum: - deepseek-reasoner - deepseek/deepseek-reasoner - deepseek/deepseek-r1 - deepseek/deepseek-reasoner-v3.1 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. echo: type: boolean description: If True, the response will contain the prompt. Can be used with logprobs to return prompt logprobs. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. required: - model - messages title: deepseek-reasoner, deepseek/deepseek-reasoner, deepseek/deepseek-r1, deepseek/deepseek-reasoner-v3.1 - type: object properties: model: type: string enum: - deepseek-chat - deepseek/deepseek-chat provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. echo: type: boolean description: If True, the response will contain the prompt. Can be used with logprobs to return prompt logprobs. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. description: An object specifying the format that the model must output. required: - model - messages title: deepseek-chat, deepseek/deepseek-chat - type: object properties: model: type: string enum: - deepseek-v4-flash - deepseek/deepseek-v4-flash provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. description: An object specifying the format that the model must output. echo: type: boolean description: If True, the response will contain the prompt. Can be used with logprobs to return prompt logprobs. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. web_search_options: type: object properties: search_context_size: type: string enum: - low - medium - high description: 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. user_location: type: - object - 'null' properties: approximate: type: object properties: city: type: string description: Free text input for the city of the user, e.g. San Francisco. country: type: string pattern: ^[A-Z]{2}$ description: The two-letter ISO country code of the user, e.g. US. region: type: string description: Free text input for the region of the user, e.g. California. timezone: type: string description: The IANA timezone of the user, e.g. America/Los_Angeles. description: Approximate location parameters for the search. type: type: string enum: - approximate description: The type of location approximation. Always approximate. required: - approximate - type description: Approximate location parameters for the search. description: This tool searches the web for relevant results to use in a response. search_mode: type: string enum: - academic - web default: academic description: Controls the search mode used for the request. When set to 'academic', results will prioritize scholarly sources like peer-reviewed papers and academic journals. search_domain_filter: type: array items: type: string description: A list of domains to limit search results to. Currently limited to 10 domains for Allowlisting and Denylisting. For Denylisting, add a - at the beginning of the domain string. return_images: type: boolean default: false description: Determines whether search results should include images. return_related_questions: type: boolean default: false description: Determines whether related questions should be returned. search_recency_filter: type: string enum: - day - week - month - year description: Filters search results based on time (e.g., 'week', 'day'). search_after_date_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content published after this date. Format should be %m/%d/%Y (e.g. 3/1/2025) search_before_date_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content published before this date. Format should be %m/%d/%Y (e.g. 3/1/2025) last_updated_after_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content last updated after this date. Format should be %m/%d/%Y (e.g. 3/1/2025) last_updated_before_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content last updated before this date. Format should be %m/%d/%Y (e.g. 3/1/2025) required: - model - messages title: deepseek-v4-flash, deepseek/deepseek-v4-flash - type: object properties: model: type: string enum: - deepseek-v4-flash-vision-exp - deepseek/deepseek-v4-flash-vision-exp - deepseek-v4-pro-0813 - deepseek/deepseek-v4-pro-0813 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. description: An object specifying the format that the model must output. required: - model - messages title: deepseek-v4-flash-vision-exp, deepseek/deepseek-v4-flash-vision-exp, deepseek-v4-pro-0813, deepseek/deepseek-v4-pro-0813 - type: object properties: model: type: string enum: - deepseek/deepseek-chat-v3-0324 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. echo: type: boolean description: If True, the response will contain the prompt. Can be used with logprobs to return prompt logprobs. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: deepseek/deepseek-chat-v3-0324 - type: object properties: model: type: string enum: - deepseek/deepseek-chat-v3.1 - deepseek-non-reasoner-v3.1-terminus - deepseek/deepseek-non-reasoner-v3.1-terminus - deepseek-reasoner-v3.1-terminus - deepseek/deepseek-reasoner-v3.1-terminus - deepseek-non-thinking-v3.2-exp - deepseek/deepseek-non-thinking-v3.2-exp - deepseek-thinking-v3.2-exp-v2 - deepseek/deepseek-thinking-v3.2-exp provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. echo: type: boolean description: If True, the response will contain the prompt. Can be used with logprobs to return prompt logprobs. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. required: - model - messages title: deepseek/deepseek-chat-v3.1, deepseek-non-reasoner-v3.1-terminus, deepseek/deepseek-non-reasoner-v3.1-terminus, deepseek-reasoner-v3.1-terminus, deepseek/deepseek-reasoner-v3.1-terminus, deepseek-non-thinking-v3.2-exp, deepseek/deepseek-non-thinking-v3.2-exp, deepseek-thinking-v3.2-exp-v2, deepseek/deepseek-thinking-v3.2-exp - type: object properties: model: type: string enum: - longcat-2.0 - meituan/longcat-2.0 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 1 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. thinking: type: object properties: type: type: string enum: - enabled - disabled description: Set to `enabled` to turn on deep-thinking, or `disabled` to turn it off. required: - type description: Controls LongCat-2.0 deep-thinking (reasoning) mode. required: - model - messages title: longcat-2.0, meituan/longcat-2.0 - type: object properties: model: type: string enum: - gemini-2.5-flash - google/gemini-2.5-flash provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - input_audio description: The type of the content part. input_audio: type: object properties: data: anyOf: - type: string format: uri - type: string - type: string description: Either a URL of the audio or the base64 encoded audio data. format: type: string enum: - wav - mp3 - audio/x-aac - audio/flac - audio/mp3 - audio/m4a - audio/mpeg - audio/mpga - audio/mp4 - audio/ogg - audio/pcm - audio/webm description: The format of the encoded audio data. Currently supports "wav" and "mp3". required: - data - format required: - type - input_audio description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. audio: type: - object - 'null' properties: id: type: string description: Unique identifier for a previous audio response from the model. required: - id description: Data about a previous audio response from the model. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage audio: type: - object - 'null' properties: format: type: string enum: - wav - mp3 - flac - opus - pcm16 description: Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16. voice: anyOf: - type: string enum: - alloy - ash - ballad - coral - echo - fable - nova - onyx - sage - shimmer - type: string description: The voice the model uses to respond. Supported voices are alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, and shimmer. required: - format - voice description: 'Parameters for audio output. Required when audio output is requested with modalities: ["audio"].' modalities: type: - array - 'null' items: type: string enum: - text - audio description: "Output types that you would like the model to generate. Most models are capable of generating text, which is the default:\n \n [\"text\"]\n \n Model can also be used to generate audio. To request that this model generate both text and audio responses, you can use:\n \n [\"text\", \"audio\"]" n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. required: - model - messages title: gemini-2.5-flash, google/gemini-2.5-flash - type: object properties: model: type: string enum: - gemini-3-flash-preview - google/gemini-3-flash-preview - gemini-2.5-pro - google/gemini-2.5-pro - gemini-3.1-pro-preview - google/gemini-3.1-pro-preview - gemini-3-1-pro-preview - google/gemini-3-1-pro-preview provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. required: - model - messages title: gemini-3-flash-preview, google/gemini-3-flash-preview, gemini-2.5-pro, google/gemini-2.5-pro, gemini-3.1-pro-preview, google/gemini-3.1-pro-preview, gemini-3-1-pro-preview, google/gemini-3-1-pro-preview - type: object properties: model: type: string enum: - gemini-3.5-flash - google/gemini-3.5-flash - gemini-3.1-flash-lite - google/gemini-3.1-flash-lite - gemini-3-5-flash - google/gemini-3-5-flash - google/gemini-3-1-flash-lite provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - video_url video_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: Base64-encoded local video file. required: - url required: - type - video_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file - type: object properties: type: type: string enum: - input_audio description: The type of the content part. input_audio: type: object properties: data: anyOf: - type: string format: uri - type: string - type: string description: Either a URL of the audio or the base64 encoded audio data. format: type: string enum: - wav - mp3 - audio/x-aac - audio/flac - audio/mp3 - audio/m4a - audio/mpeg - audio/mpga - audio/mp4 - audio/ogg - audio/pcm - audio/webm description: The format of the encoded audio data. Currently supports "wav" and "mp3". required: - data - format required: - type - input_audio description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. audio: type: - object - 'null' properties: id: type: string description: Unique identifier for a previous audio response from the model. required: - id description: Data about a previous audio response from the model. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage audio: type: - object - 'null' properties: format: type: string enum: - wav - mp3 - flac - opus - pcm16 description: Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16. voice: anyOf: - type: string enum: - alloy - ash - ballad - coral - echo - fable - nova - onyx - sage - shimmer - type: string description: The voice the model uses to respond. Supported voices are alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, and shimmer. required: - format - voice description: 'Parameters for audio output. Required when audio output is requested with modalities: ["audio"].' modalities: type: - array - 'null' items: type: string enum: - text - audio description: "Output types that you would like the model to generate. Most models are capable of generating text, which is the default:\n \n [\"text\"]\n \n Model can also be used to generate audio. To request that this model generate both text and audio responses, you can use:\n \n [\"text\", \"audio\"]" n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. required: - model - messages title: gemini-3.5-flash, google/gemini-3.5-flash, gemini-3.1-flash-lite, google/gemini-3.1-flash-lite, gemini-3-5-flash, google/gemini-3-5-flash, google/gemini-3-1-flash-lite - type: object properties: model: type: string enum: - gemini-3.6-flash - google/gemini-3.6-flash - gemini-3.7-flash - google/gemini-3.7-flash - gemini-3-6-flash - google/gemini-3-6-flash - gemini-3-7-flash - google/gemini-3-7-flash provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. required: - model - messages title: gemini-3.6-flash, google/gemini-3.6-flash, gemini-3.7-flash, google/gemini-3.7-flash, gemini-3-6-flash, google/gemini-3-6-flash, gemini-3-7-flash, google/gemini-3-7-flash - type: object properties: model: type: string enum: - gemini-2.5-flash-lite - google/gemini-2.5-flash-lite - gemini-2.5-flash-lite-preview - google/gemini-2.5-flash-lite-preview provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. required: - model - messages title: gemini-2.5-flash-lite, google/gemini-2.5-flash-lite, gemini-2.5-flash-lite-preview, google/gemini-2.5-flash-lite-preview - type: object properties: model: type: string enum: - gemini-3.5-flash-lite - google/gemini-3.5-flash-lite - google/gemini-3-5-flash-lite - gemini-3-5-flash-lite provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - video_url video_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: Base64-encoded local video file. required: - url required: - type - video_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file - type: object properties: type: type: string enum: - input_audio description: The type of the content part. input_audio: type: object properties: data: anyOf: - type: string format: uri - type: string - type: string description: Either a URL of the audio or the base64 encoded audio data. format: type: string enum: - wav - mp3 - audio/x-aac - audio/flac - audio/mp3 - audio/m4a - audio/mpeg - audio/mpga - audio/mp4 - audio/ogg - audio/pcm - audio/webm description: The format of the encoded audio data. Currently supports "wav" and "mp3". required: - data - format required: - type - input_audio description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. audio: type: - object - 'null' properties: id: type: string description: Unique identifier for a previous audio response from the model. required: - id description: Data about a previous audio response from the model. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage audio: type: - object - 'null' properties: format: type: string enum: - wav - mp3 - flac - opus - pcm16 description: Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16. voice: anyOf: - type: string enum: - alloy - ash - ballad - coral - echo - fable - nova - onyx - sage - shimmer - type: string description: The voice the model uses to respond. Supported voices are alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, and shimmer. required: - format - voice description: 'Parameters for audio output. Required when audio output is requested with modalities: ["audio"].' modalities: type: - array - 'null' items: type: string enum: - text - audio description: "Output types that you would like the model to generate. Most models are capable of generating text, which is the default:\n \n [\"text\"]\n \n Model can also be used to generate audio. To request that this model generate both text and audio responses, you can use:\n \n [\"text\", \"audio\"]" n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. required: - model - messages title: gemini-3.5-flash-lite, google/gemini-3.5-flash-lite, google/gemini-3-5-flash-lite, gemini-3-5-flash-lite - type: object properties: model: type: string enum: - gemma-4-26b-a4b-it-maas - google/gemma-4-26b-a4b-it-maas provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. required: - model - messages title: gemma-4-26b-a4b-it-maas, google/gemma-4-26b-a4b-it-maas - type: object properties: model: type: string enum: - gemma-3-4b-it - google/gemma-3-4b-it provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. required: - model - messages title: gemma-3-4b-it, google/gemma-3-4b-it - type: object properties: model: type: string enum: - gemma-3-12b-it - google/gemma-3-12b-it provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: gemma-3-12b-it, google/gemma-3-12b-it - type: object properties: model: type: string enum: - gemma-3-27b-it - google/gemma-3-27b-it provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: gemma-3-27b-it, google/gemma-3-27b-it - type: object properties: model: type: string enum: - gemma-4-31b-it - google/gemma-4-31b-it - gemma-4-26b-a4b-it - google/gemma-4-26b-a4b-it provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. required: - model - messages title: gemma-4-31b-it, google/gemma-4-31b-it, gemma-4-26b-a4b-it, google/gemma-4-26b-a4b-it - type: object properties: model: type: string enum: - muse-glimmer-30b - meta/muse-glimmer-30b provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens required: - model - messages title: muse-glimmer-30b, meta/muse-glimmer-30b - type: object properties: model: type: string enum: - meta-llama/Llama-3.3-70B-Instruct-Turbo provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. echo: type: boolean description: If True, the response will contain the prompt. Can be used with logprobs to return prompt logprobs. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. required: - model - messages title: meta-llama/Llama-3.3-70B-Instruct-Turbo - type: object properties: model: type: string enum: - meta-llama/llama-3.3-70b-versatile - llama-3.3-70b-versatile provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: meta-llama/llama-3.3-70b-versatile, llama-3.3-70b-versatile - type: object properties: model: type: string enum: - mistral-nemo - mistralai/mistral-nemo provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: mistral-nemo, mistralai/mistral-nemo - type: object properties: model: type: string enum: - devstral-2512 - mistralai/devstral-2512 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. required: - model - messages title: devstral-2512, mistralai/devstral-2512 - type: object properties: model: type: string enum: - glm-5.3 - zhipu/glm-5.3 - zhipu/glm-5-3 - glm-5.2 - zhipu/glm-5.2 - zhipu/glm-5-2 - glm-5.1 - zhipu/glm-5.1 - zhipu/glm-5-1 - glm-5 - zhipu/glm-5 - glm-5-turbo - z-ai/glm-5-turbo - glm-5v-turbo - z-ai/glm-5v-turbo provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. thinking: type: object properties: type: type: string enum: - enabled - disabled default: enabled description: Whether to enable the chain of thought description: Control whether the model enables chain of thought. Only supported by GLM-4.5 and above models. required: - model - messages title: glm-5.3, zhipu/glm-5.3, zhipu/glm-5-3, glm-5.2, zhipu/glm-5.2, zhipu/glm-5-2, glm-5.1, zhipu/glm-5.1, zhipu/glm-5-1, glm-5, zhipu/glm-5, glm-5-turbo, z-ai/glm-5-turbo, glm-5v-turbo, z-ai/glm-5v-turbo - type: object properties: model: type: string enum: - glm-4.7 - zhipu/glm-4.7 - glm-4.6 - zhipu/glm-4.6 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: glm-4.7, zhipu/glm-4.7, glm-4.6, zhipu/glm-4.6 - type: object properties: model: type: string enum: - glm-4.5 - zhipu/glm-4.5 - glm-4.5-air - zhipu/glm-4.5-air provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: anyOf: - type: string enum: - search_pro_jina - type: string description: 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. parameters: description: The parameters the functions accepts, described as a JSON Schema object. required: type: array items: type: string required: - name required: - type - function - type: object properties: type: type: string enum: - web_search description: Web search tool for real-time information retrieval web_search: type: object properties: search_engine: type: string enum: - search_pro_jina description: Search engine to use enable: type: boolean description: Whether to enable web search search_query: type: string description: Search query string count: type: integer minimum: 1 maximum: 20 description: Number of search results to return search_result: type: boolean default: true description: Whether to include search results in response require_search: type: boolean default: true description: Whether search is required required: - search_engine - enable required: - type - web_search - type: object properties: type: type: string minLength: 1 required: - type description: Tool definition for zhipu models supporting both function calling and web search description: Tools for zhipu models supporting both function calling and web search tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. thinking: type: object properties: type: type: string enum: - enabled - disabled default: enabled description: Whether to enable the chain of thought description: Control whether the model enables chain of thought. Only supported by GLM-4.5 and above models. required: - model - messages title: glm-4.5, zhipu/glm-4.5, glm-4.5-air, zhipu/glm-4.5-air - type: object properties: model: type: string enum: - alibaba/glm-5.2 - glm-5.2-fast-preview - alibaba/glm-5.2-fast-preview - zhipu/glm-5-2-fast-preview provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. enable_thinking: type: boolean default: false description: Specifies whether to use the thinking mode. thinking_budget: type: integer minimum: 1 description: The maximum reasoning length, effective only when enable_thinking is set to true. required: - model - messages title: alibaba/glm-5.2, glm-5.2-fast-preview, alibaba/glm-5.2-fast-preview, zhipu/glm-5-2-fast-preview - type: object properties: model: type: string enum: - qwen-max - alibaba/qwen-max - qwen-turbo - alibaba/qwen-turbo provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage enable_search: type: boolean default: false description: Enable Alibaba Model Studio web search. search_options: type: object properties: forced_search: type: boolean search_strategy: type: string enum: - turbo - max - agent enable_source: type: boolean description: Alibaba Model Studio web search options. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. required: - model - messages title: qwen-max, alibaba/qwen-max, qwen-turbo, alibaba/qwen-turbo - type: object properties: model: type: string enum: - qwen-plus - alibaba/qwen-plus provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage enable_search: type: boolean default: false description: Enable Alibaba Model Studio web search. search_options: type: object properties: forced_search: type: boolean search_strategy: type: string enum: - turbo - max - agent enable_source: type: boolean description: Alibaba Model Studio web search options. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. required: - model - messages title: qwen-plus, alibaba/qwen-plus - type: object properties: model: type: string enum: - qwen3-32b - alibaba/qwen3-32b provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage enable_search: type: boolean default: false description: Enable Alibaba Model Studio web search. search_options: type: object properties: forced_search: type: boolean search_strategy: type: string enum: - turbo - max - agent enable_source: type: boolean description: Alibaba Model Studio web search options. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. enable_thinking: type: boolean default: false description: Specifies whether to use the thinking mode. thinking_budget: type: integer minimum: 1 description: The maximum reasoning length, effective only when enable_thinking is set to true. required: - model - messages title: qwen3-32b, alibaba/qwen3-32b - type: object properties: model: type: string enum: - qwen3-235b-a22b-thinking-2507 - alibaba/qwen3-235b-a22b-thinking-2507 - qwen3-next-80b-a3b-thinking - alibaba/qwen3-next-80b-a3b-thinking - qwen3-vl-32b-thinking - alibaba/qwen3-vl-32b-thinking - qwen3-vl-32b-instruct - alibaba/qwen3-vl-32b-instruct provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage enable_search: type: boolean default: false description: Enable Alibaba Model Studio web search. search_options: type: object properties: forced_search: type: boolean search_strategy: type: string enum: - turbo - max - agent enable_source: type: boolean description: Alibaba Model Studio web search options. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. required: - model - messages title: qwen3-235b-a22b-thinking-2507, alibaba/qwen3-235b-a22b-thinking-2507, qwen3-next-80b-a3b-thinking, alibaba/qwen3-next-80b-a3b-thinking, qwen3-vl-32b-thinking, alibaba/qwen3-vl-32b-thinking, qwen3-vl-32b-instruct, alibaba/qwen3-vl-32b-instruct - type: object properties: model: type: string enum: - qwen3.5-flash - alibaba/qwen3.5-flash provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. echo: type: boolean description: If True, the response will contain the prompt. Can be used with logprobs to return prompt logprobs. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. enable_search: type: boolean default: false description: Enable Alibaba Model Studio web search. search_options: type: object properties: forced_search: type: boolean search_strategy: type: string enum: - turbo - max - agent enable_source: type: boolean description: Alibaba Model Studio web search options. required: - model - messages title: qwen3.5-flash, alibaba/qwen3.5-flash - type: object properties: model: type: string enum: - qwen3.5-plus - alibaba/qwen3.5-plus - qwen3-next-80b-a3b-instruct - alibaba/qwen3-next-80b-a3b-instruct - qwen3-max-preview - alibaba/qwen3-max-preview - qwen3-max - alibaba/qwen3-max - qwen3.6-max-preview - alibaba/qwen3.6-max-preview - qwen3.6-plus - alibaba/qwen3.6-plus - qwen3.6-flash - alibaba/qwen3.6-flash - alibaba/qwen3.5-plus-20260218 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage enable_search: type: boolean default: false description: Enable Alibaba Model Studio web search. search_options: type: object properties: forced_search: type: boolean search_strategy: type: string enum: - turbo - max - agent enable_source: type: boolean description: Alibaba Model Studio web search options. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. required: - model - messages title: qwen3.5-plus, alibaba/qwen3.5-plus, qwen3-next-80b-a3b-instruct, alibaba/qwen3-next-80b-a3b-instruct, qwen3-max-preview, alibaba/qwen3-max-preview, qwen3-max, alibaba/qwen3-max, qwen3.6-max-preview, alibaba/qwen3.6-max-preview, qwen3.6-plus, alibaba/qwen3.6-plus, qwen3.6-flash, alibaba/qwen3.6-flash, alibaba/qwen3.5-plus-20260218 - type: object properties: model: type: string enum: - qwen3-coder-480b-a35b-instruct - alibaba/qwen3-coder-480b-a35b-instruct provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage enable_search: type: boolean default: false description: Enable Alibaba Model Studio web search. search_options: type: object properties: forced_search: type: boolean search_strategy: type: string enum: - turbo - max - agent enable_source: type: boolean description: Alibaba Model Studio web search options. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: qwen3-coder-480b-a35b-instruct, alibaba/qwen3-coder-480b-a35b-instruct - type: object properties: model: type: string enum: - qwen3-vl-plus - alibaba/qwen3-vl-plus - qwen3-vl-flash - alibaba/qwen3-vl-flash - qwen3.7-plus - alibaba/qwen3.7-plus provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage enable_search: type: boolean default: false description: Enable Alibaba Model Studio web search. search_options: type: object properties: forced_search: type: boolean search_strategy: type: string enum: - turbo - max - agent enable_source: type: boolean description: Alibaba Model Studio web search options. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. enable_thinking: type: boolean default: false description: Specifies whether to use the thinking mode. thinking_budget: type: integer minimum: 1 description: The maximum reasoning length, effective only when enable_thinking is set to true. required: - model - messages title: qwen3-vl-plus, alibaba/qwen3-vl-plus, qwen3-vl-flash, alibaba/qwen3-vl-flash, qwen3.7-plus, alibaba/qwen3.7-plus - type: object properties: model: type: string enum: - qwen3-omni-30b-a3b-captioner - alibaba/qwen3-omni-30b-a3b-captioner provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: type: array items: type: object properties: type: type: string enum: - input_audio description: The type of the content part. input_audio: type: object properties: data: anyOf: - type: string format: uri - type: string description: Base64 encoded audio data. required: - data required: - type - input_audio description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage required: - model - messages title: qwen3-omni-30b-a3b-captioner, alibaba/qwen3-omni-30b-a3b-captioner - type: object properties: model: type: string enum: - qwen3.5-omni-plus - alibaba/qwen3.5-omni-plus - qwen3.5-omni-flash - alibaba/qwen3.5-omni-flash provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - input_audio description: The type of the content part. input_audio: type: object properties: data: anyOf: - type: string format: uri - type: string - type: string description: Either a URL of the audio or the base64 encoded audio data. format: type: string enum: - wav - mp3 - audio/x-aac - audio/flac - audio/mp3 - audio/m4a - audio/mpeg - audio/mpga - audio/mp4 - audio/ogg - audio/pcm - audio/webm description: The format of the encoded audio data. Currently supports "wav" and "mp3". required: - data - format required: - type - input_audio - type: object properties: type: type: string enum: - video_url description: The type of the content part. video_url: type: object properties: url: type: string format: uri description: Either a URL of the video or the base64 encoded video data. required: - url required: - type - video_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. audio: type: - object - 'null' properties: id: type: string description: Unique identifier for a previous audio response from the model. required: - id description: Data about a previous audio response from the model. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. audio: type: - object - 'null' properties: format: type: string enum: - wav - mp3 - flac - opus - pcm16 description: Specifies the output audio format. Must be one of wav, mp3, flac, opus, or pcm16. voice: anyOf: - type: string enum: - alloy - ash - ballad - coral - echo - fable - nova - onyx - sage - shimmer - type: string description: The voice the model uses to respond. Supported voices are alloy, ash, ballad, coral, echo, fable, nova, onyx, sage, and shimmer. required: - format - voice description: 'Parameters for audio output. Required when audio output is requested with modalities: ["audio"].' modalities: type: - array - 'null' items: type: string enum: - text - audio description: "Output types that you would like the model to generate. Most models are capable of generating text, which is the default:\n \n [\"text\"]\n \n Model can also be used to generate audio. To request that this model generate both text and audio responses, you can use:\n \n [\"text\", \"audio\"]" temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. enable_thinking: type: boolean default: false description: Specifies whether to use the thinking mode. thinking_budget: type: integer minimum: 1 description: The maximum reasoning length, effective only when enable_thinking is set to true. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: qwen3.5-omni-plus, alibaba/qwen3.5-omni-plus, qwen3.5-omni-flash, alibaba/qwen3.5-omni-flash - type: object properties: model: type: string enum: - qwen3.7-max - alibaba/qwen3.7-max - qwen3.8-max - alibaba/qwen3.8-max - qwen3.8-flash - alibaba/qwen3.8-flash provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage enable_search: type: boolean default: false description: Enable Alibaba Model Studio web search. search_options: type: object properties: forced_search: type: boolean search_strategy: type: string enum: - turbo - max - agent enable_source: type: boolean description: Alibaba Model Studio web search options. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens required: - model - messages title: qwen3.7-max, alibaba/qwen3.7-max, qwen3.8-max, alibaba/qwen3.8-max, qwen3.8-flash, alibaba/qwen3.8-flash - type: object properties: model: type: string enum: - qwen3.6-27b - alibaba/qwen3.6-27b - qwen3.6-35b-a3b - alibaba/qwen3.6-35b-a3b provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage enable_search: type: boolean default: false description: Enable Alibaba Model Studio web search. search_options: type: object properties: forced_search: type: boolean search_strategy: type: string enum: - turbo - max - agent enable_source: type: boolean description: Alibaba Model Studio web search options. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: qwen3.6-27b, alibaba/qwen3.6-27b, qwen3.6-35b-a3b, alibaba/qwen3.6-35b-a3b - type: object properties: model: type: string enum: - alibaba/qwen3.8-2.4t-a95b - qwen3.8-2.4t-a95b provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens required: - model - messages title: alibaba/qwen3.8-2.4t-a95b, qwen3.8-2.4t-a95b - type: object properties: model: type: string enum: - alibaba/qwen3.8-27b - qwen3.8-27b provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - video_url video_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: Base64-encoded local video file. required: - url required: - type - video_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens required: - model - messages title: alibaba/qwen3.8-27b, qwen3.8-27b - type: object properties: model: type: string enum: - alibaba/qwen3-max-instruct provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. required: - model - messages title: alibaba/qwen3-max-instruct - type: object properties: model: type: string enum: - Qwen/Qwen2.5-7B-Instruct-Turbo provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. echo: type: boolean description: If True, the response will contain the prompt. Can be used with logprobs to return prompt logprobs. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. required: - model - messages title: Qwen/Qwen2.5-7B-Instruct-Turbo - type: object properties: model: type: string enum: - Qwen/Qwen3-235B-A22B-Thinking-2507 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. required: - model - messages title: Qwen/Qwen3-235B-A22B-Thinking-2507 - type: object properties: model: type: string enum: - Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: Qwen/Qwen3-Coder-480B-A35B-Instruct-FP8 - type: object properties: model: type: string enum: - test/dummy-breaker - dummy-breaker - test/dummy-breaker-all-fail - dummy-breaker-all-fail - test/dummy-rps-chain - dummy-rps-chain - test/dummy - test/dummy-breaker-fail - test/dummy-breaker-fail-a - test/dummy-breaker-fail-b - test/dummy-1 - test/dummy-2 - test/dummy-3 stream: type: boolean test: type: object properties: credits: type: number delay: type: number required: - model title: test/dummy-breaker, dummy-breaker, test/dummy-breaker-all-fail, dummy-breaker-all-fail, test/dummy-rps-chain, dummy-rps-chain, test/dummy, test/dummy-breaker-fail, test/dummy-breaker-fail-a, test/dummy-breaker-fail-b, test/dummy-1, test/dummy-2, test/dummy-3 - type: object properties: model: type: string enum: - minimax/MiniMax-Text-01 - MiniMax-Text-01 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 1 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. mask_sensitive_info: type: boolean default: false description: Mask (replace with ***) content in the output that involves private information, including but not limited to email, domain, link, ID number, home address, etc. Defaults to False, i.e. enable masking. required: - model - messages title: minimax/MiniMax-Text-01, MiniMax-Text-01 - type: object properties: model: type: string enum: - minimax/m1 - MiniMax-M1 - minimax/m2 - MiniMax-M2 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 1 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: minimax/m1, MiniMax-M1, minimax/m2, MiniMax-M2 - type: object properties: model: type: string enum: - minimax/m2-her - MiniMax M2-her provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. required: - model - messages title: minimax/m2-her, MiniMax M2-her - type: object properties: model: type: string enum: - minimax/m2-1 - MiniMax-M2.1 - minimax/m2-5-20260218 - MiniMax-M2.5 - minimax/m2-5-highspeed-20260218 - MiniMax-M2.5-Highspeed provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: minimax/m2-1, MiniMax-M2.1, minimax/m2-5-20260218, MiniMax-M2.5, minimax/m2-5-highspeed-20260218, MiniMax-M2.5-Highspeed - type: object properties: model: type: string enum: - minimax/m2-1-highspeed - MiniMax-M2.1-Highspeed provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: minimax/m2-1-highspeed, MiniMax-M2.1-Highspeed - type: object properties: model: type: string enum: - minimax/minimax-m3 - MiniMax-M3 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. echo: type: boolean description: If True, the response will contain the prompt. Can be used with logprobs to return prompt logprobs. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. web_search_options: type: object properties: search_context_size: type: string enum: - low - medium - high description: 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. user_location: type: - object - 'null' properties: approximate: type: object properties: city: type: string description: Free text input for the city of the user, e.g. San Francisco. country: type: string pattern: ^[A-Z]{2}$ description: The two-letter ISO country code of the user, e.g. US. region: type: string description: Free text input for the region of the user, e.g. California. timezone: type: string description: The IANA timezone of the user, e.g. America/Los_Angeles. description: Approximate location parameters for the search. type: type: string enum: - approximate description: The type of location approximation. Always approximate. required: - approximate - type description: Approximate location parameters for the search. description: This tool searches the web for relevant results to use in a response. search_mode: type: string enum: - academic - web default: academic description: Controls the search mode used for the request. When set to 'academic', results will prioritize scholarly sources like peer-reviewed papers and academic journals. search_domain_filter: type: array items: type: string description: A list of domains to limit search results to. Currently limited to 10 domains for Allowlisting and Denylisting. For Denylisting, add a - at the beginning of the domain string. return_images: type: boolean default: false description: Determines whether search results should include images. return_related_questions: type: boolean default: false description: Determines whether related questions should be returned. search_recency_filter: type: string enum: - day - week - month - year description: Filters search results based on time (e.g., 'week', 'day'). search_after_date_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content published after this date. Format should be %m/%d/%Y (e.g. 3/1/2025) search_before_date_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content published before this date. Format should be %m/%d/%Y (e.g. 3/1/2025) last_updated_after_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content last updated after this date. Format should be %m/%d/%Y (e.g. 3/1/2025) last_updated_before_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content last updated before this date. Format should be %m/%d/%Y (e.g. 3/1/2025) required: - model - messages title: minimax/minimax-m3, MiniMax-M3 - type: object properties: model: type: string enum: - minimax/m2-7-20260402 - MiniMax-M2.7 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. required: - model - messages title: minimax/m2-7-20260402, MiniMax-M2.7 - type: object properties: model: type: string enum: - minimax/m2-7-highspeed - MiniMax-M2.7-Highspeed provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: minimax/m2-7-highspeed, MiniMax-M2.7-Highspeed - type: object properties: model: type: string enum: - moonshot/kimi-k2-5 - kimi-k2-5 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - type: object properties: type: type: string enum: - function - builtin_function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: anyOf: - type: string enum: - $web_search - type: string description: 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. parameters: description: The parameters the functions accepts, described as a JSON Schema object. required: type: array items: type: string required: - name required: - type - function - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. Only the provider default value is supported for this model. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: moonshot/kimi-k2-5, kimi-k2-5 - type: object properties: model: type: string enum: - moonshot/kimi-k2-6 - moonshot/kimi-k2-7-code - kimi-k2-7-code - moonshot/kimi-k2-7-code-highspeed - kimi-k2-7-code-highspeed provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - type: object properties: type: type: string enum: - function - builtin_function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: anyOf: - type: string enum: - $web_search - type: string description: 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. parameters: description: The parameters the functions accepts, described as a JSON Schema object. required: type: array items: type: string required: - name required: - type - function - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: moonshot/kimi-k2-6, moonshot/kimi-k2-7-code, kimi-k2-7-code, moonshot/kimi-k2-7-code-highspeed, kimi-k2-7-code-highspeed - type: object properties: model: type: string enum: - kimi-k3 - moonshotai/kimi-k3 - moonshot/kimi-k3 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - type: object properties: type: type: string enum: - function - builtin_function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: anyOf: - type: string enum: - $web_search - type: string description: 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. parameters: description: The parameters the functions accepts, described as a JSON Schema object. required: type: array items: type: string required: - name required: - type - function - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: kimi-k3, moonshotai/kimi-k3, moonshot/kimi-k3 - type: object properties: model: type: string enum: - magnum-v4-72b - anthracite-org/magnum-v4-72b provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. required: - model - messages title: magnum-v4-72b, anthracite-org/magnum-v4-72b - type: object properties: model: type: string enum: - mythomax-l2-13b - gryphe/mythomax-l2-13b provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. required: - model - messages title: mythomax-l2-13b, gryphe/mythomax-l2-13b - type: object properties: model: type: string enum: - baidu/ernie-4-5-vl-424b-a47b - baidu/ernie-4.5-vl-424b-a47b provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: baidu/ernie-4-5-vl-424b-a47b, baidu/ernie-4.5-vl-424b-a47b - type: object properties: model: type: string enum: - ernie-5.0 - baidu/ernie-5.0 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. enable_thinking: type: boolean description: Enable ERNIE deep-thinking mode. When omitted, the model default applies (enabled for ERNIE 5.0). thinking_budget: type: integer minimum: 100 description: Maximum chain-of-thought length in tokens; effective only when enable_thinking is true (minimum 100). required: - model - messages title: ernie-5.0, baidu/ernie-5.0 - type: object properties: model: type: string enum: - nemotron-3-nano-30b-a3b - nvidia/nemotron-3-nano-30b-a3b - nemotron-3-super-120b-a12b - nvidia/nemotron-3-super-120b-a12b - nemotron-3-ultra-550b-a55b - nvidia/nemotron-3-ultra-550b-a55b - nemotron-3.5-lightning - nvidia/nemotron-3.5-lightning - nvidia/nemotron-3.5-lightning:free - nemotron-3.5-lightning:free provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens echo: type: boolean description: If True, the response will contain the prompt. Can be used with logprobs to return prompt logprobs. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. required: - model - messages title: nemotron-3-nano-30b-a3b, nvidia/nemotron-3-nano-30b-a3b, nemotron-3-super-120b-a12b, nvidia/nemotron-3-super-120b-a12b, nemotron-3-ultra-550b-a55b, nvidia/nemotron-3-ultra-550b-a55b, nemotron-3.5-lightning, nvidia/nemotron-3.5-lightning, nvidia/nemotron-3.5-lightning:free, nemotron-3.5-lightning:free - type: object properties: model: type: string enum: - hermes-4-405b - nousresearch/hermes-4-405b provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: hermes-4-405b, nousresearch/hermes-4-405b - type: object properties: model: type: string enum: - command-a - cohere/command-a provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. required: - model - messages title: command-a, cohere/command-a - type: object properties: model: type: string enum: - sonar - perplexity/sonar - sonar-pro - perplexity/sonar-pro provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. web_search_options: type: object properties: search_context_size: type: string enum: - low - medium - high description: 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. user_location: type: - object - 'null' properties: approximate: type: object properties: city: type: string description: Free text input for the city of the user, e.g. San Francisco. country: type: string pattern: ^[A-Z]{2}$ description: The two-letter ISO country code of the user, e.g. US. region: type: string description: Free text input for the region of the user, e.g. California. timezone: type: string description: The IANA timezone of the user, e.g. America/Los_Angeles. description: Approximate location parameters for the search. type: type: string enum: - approximate description: The type of location approximation. Always approximate. required: - approximate - type description: Approximate location parameters for the search. description: This tool searches the web for relevant results to use in a response. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. search_mode: type: string enum: - academic - web default: academic description: Controls the search mode used for the request. When set to 'academic', results will prioritize scholarly sources like peer-reviewed papers and academic journals. search_domain_filter: type: array items: type: string description: A list of domains to limit search results to. Currently limited to 10 domains for Allowlisting and Denylisting. For Denylisting, add a - at the beginning of the domain string. return_images: type: boolean default: false description: Determines whether search results should include images. return_related_questions: type: boolean default: false description: Determines whether related questions should be returned. search_recency_filter: type: string enum: - day - week - month - year description: Filters search results based on time (e.g., 'week', 'day'). search_after_date_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content published after this date. Format should be %m/%d/%Y (e.g. 3/1/2025) search_before_date_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content published before this date. Format should be %m/%d/%Y (e.g. 3/1/2025) last_updated_after_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content last updated after this date. Format should be %m/%d/%Y (e.g. 3/1/2025) last_updated_before_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content last updated before this date. Format should be %m/%d/%Y (e.g. 3/1/2025) required: - model - messages title: sonar, perplexity/sonar, sonar-pro, perplexity/sonar-pro - type: object properties: model: type: string enum: - x-ai/grok-3-beta - grok-3 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: x-ai/grok-3-beta, grok-3 - type: object properties: model: type: string enum: - x-ai/grok-3-mini-beta - grok-3-mini - x-ai/grok-code-fast-1 - grok-code-fast-1 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: x-ai/grok-3-mini-beta, grok-3-mini, x-ai/grok-code-fast-1, grok-code-fast-1 - type: object properties: model: type: string enum: - grok-4-fast-reasoning - x-ai/grok-4-fast-reasoning - grok-4-1-fast-reasoning - x-ai/grok-4-1-fast-reasoning - x-ai/grok-4-5 - grok-4-5 - x-ai/grok-4-6 - grok-4-6 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens required: - model - messages title: grok-4-fast-reasoning, x-ai/grok-4-fast-reasoning, grok-4-1-fast-reasoning, x-ai/grok-4-1-fast-reasoning, x-ai/grok-4-5, grok-4-5, x-ai/grok-4-6, grok-4-6 - type: object properties: model: type: string enum: - grok-4-fast-non-reasoning - x-ai/grok-4-fast-non-reasoning - grok-4-1-fast-non-reasoning - x-ai/grok-4-1-fast-non-reasoning provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. required: - model - messages title: grok-4-fast-non-reasoning, x-ai/grok-4-fast-non-reasoning, grok-4-1-fast-non-reasoning, x-ai/grok-4-1-fast-non-reasoning - type: object properties: model: type: string enum: - x-ai/grok-4-3 - grok-4-3 - grok-4-20-0309-reasoning - x-ai/grok-4-20-0309-reasoning - grok-4-20-0309-non-reasoning - x-ai/grok-4-20-0309-non-reasoning provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. echo: type: boolean description: If True, the response will contain the prompt. Can be used with logprobs to return prompt logprobs. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. search_mode: type: string enum: - academic - web default: academic description: Controls the search mode used for the request. When set to 'academic', results will prioritize scholarly sources like peer-reviewed papers and academic journals. search_domain_filter: type: array items: type: string description: A list of domains to limit search results to. Currently limited to 10 domains for Allowlisting and Denylisting. For Denylisting, add a - at the beginning of the domain string. return_images: type: boolean default: false description: Determines whether search results should include images. return_related_questions: type: boolean default: false description: Determines whether related questions should be returned. search_recency_filter: type: string enum: - day - week - month - year description: Filters search results based on time (e.g., 'week', 'day'). search_after_date_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content published after this date. Format should be %m/%d/%Y (e.g. 3/1/2025) search_before_date_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content published before this date. Format should be %m/%d/%Y (e.g. 3/1/2025) last_updated_after_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content last updated after this date. Format should be %m/%d/%Y (e.g. 3/1/2025) last_updated_before_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content last updated before this date. Format should be %m/%d/%Y (e.g. 3/1/2025) required: - model - messages title: x-ai/grok-4-3, grok-4-3, grok-4-20-0309-reasoning, x-ai/grok-4-20-0309-reasoning, grok-4-20-0309-non-reasoning, x-ai/grok-4-20-0309-non-reasoning - type: object properties: model: type: string enum: - xai/grok-build-0-1 - x-ai/grok-build-0-1 - grok-build-0-1 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: xai/grok-build-0-1, x-ai/grok-build-0-1, grok-build-0-1 - type: object properties: model: type: string enum: - labs-leanstral-1-5 - mistral/labs-leanstral-1-5 - leanstral-1-5 - mistral/leanstral-1-5 provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: labs-leanstral-1-5, mistral/labs-leanstral-1-5, leanstral-1-5, mistral/leanstral-1-5 - type: object properties: model: type: string enum: - xiaomi/mimo-v2.5 - mimo-v2.5 - xiaomi/mimo-v2.5-pro - mimo-v2.5-pro provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. prediction: type: object properties: type: type: string enum: - content description: The type of the predicted content you want to provide. content: anyOf: - type: string description: The content used for a Predicted Output. This is often the text of a file you are regenerating with minor changes. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. required: - type - text description: An array of content parts with a defined type. Supported options differ based on the model being used to generate the response. Can contain text inputs. description: The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly. required: - type - content description: Configuration for a Predicted Output, which can greatly improve response times when large parts of the model response are known ahead of time. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. echo: type: boolean description: If True, the response will contain the prompt. Can be used with logprobs to return prompt logprobs. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. web_search_options: type: object properties: search_context_size: type: string enum: - low - medium - high description: 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. user_location: type: - object - 'null' properties: approximate: type: object properties: city: type: string description: Free text input for the city of the user, e.g. San Francisco. country: type: string pattern: ^[A-Z]{2}$ description: The two-letter ISO country code of the user, e.g. US. region: type: string description: Free text input for the region of the user, e.g. California. timezone: type: string description: The IANA timezone of the user, e.g. America/Los_Angeles. description: Approximate location parameters for the search. type: type: string enum: - approximate description: The type of location approximation. Always approximate. required: - approximate - type description: Approximate location parameters for the search. description: This tool searches the web for relevant results to use in a response. search_mode: type: string enum: - academic - web default: academic description: Controls the search mode used for the request. When set to 'academic', results will prioritize scholarly sources like peer-reviewed papers and academic journals. search_domain_filter: type: array items: type: string description: A list of domains to limit search results to. Currently limited to 10 domains for Allowlisting and Denylisting. For Denylisting, add a - at the beginning of the domain string. return_images: type: boolean default: false description: Determines whether search results should include images. return_related_questions: type: boolean default: false description: Determines whether related questions should be returned. search_recency_filter: type: string enum: - day - week - month - year description: Filters search results based on time (e.g., 'week', 'day'). search_after_date_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content published after this date. Format should be %m/%d/%Y (e.g. 3/1/2025) search_before_date_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content published before this date. Format should be %m/%d/%Y (e.g. 3/1/2025) last_updated_after_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content last updated after this date. Format should be %m/%d/%Y (e.g. 3/1/2025) last_updated_before_filter: type: string pattern: ^(0?[1-9]|1[0-2])\/(0?[1-9]|[12]\d|3[01])\/\d{4}$ description: Filters search results to only include content last updated before this date. Format should be %m/%d/%Y (e.g. 3/1/2025) required: - model - messages title: xiaomi/mimo-v2.5, mimo-v2.5, xiaomi/mimo-v2.5-pro, mimo-v2.5-pro - type: object properties: model: type: string enum: - stepfun/step-3.7-flash - step-3.7-flash provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - video_url video_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: Base64-encoded local video file. required: - url required: - type - video_url description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage n: type: - integer - 'null' minimum: 1 description: How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep n as 1 to minimize costs. temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens required: - model - messages title: stepfun/step-3.7-flash, step-3.7-flash - type: object properties: model: type: string enum: - sakana/fugu-ultra - fugu-ultra - sakana/sakana-namazu - sakana-namazu provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: refusal: type: string description: The refusal message generated by the model. type: type: string enum: - refusal description: The type of the content part. required: - refusal - type description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens web_search_options: type: object properties: search_context_size: type: string enum: - low - medium - high description: 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. user_location: type: - object - 'null' properties: approximate: type: object properties: city: type: string description: Free text input for the city of the user, e.g. San Francisco. country: type: string pattern: ^[A-Z]{2}$ description: The two-letter ISO country code of the user, e.g. US. region: type: string description: Free text input for the region of the user, e.g. California. timezone: type: string description: The IANA timezone of the user, e.g. America/Los_Angeles. description: Approximate location parameters for the search. type: type: string enum: - approximate description: The type of location approximation. Always approximate. required: - approximate - type description: Approximate location parameters for the search. description: This tool searches the web for relevant results to use in a response. required: - model - messages title: sakana/fugu-ultra, fugu-ultra, sakana/sakana-namazu, sakana-namazu - type: object properties: model: type: string enum: - tencent/hy4-preview - hy4-preview provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens required: - model - messages title: tencent/hy4-preview, hy4-preview - type: object properties: model: type: string enum: - tencent/hy-mt2-1.8b - hy-mt2-1.8b - tencent/hy-mt2-7b - hy-mt2-7b provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. required: - model - messages title: tencent/hy-mt2-1.8b, hy-mt2-1.8b, tencent/hy-mt2-7b, hy-mt2-7b - type: object properties: model: type: string enum: - tencent/hy-mt2-30b-a3b - hy-mt2-30b-a3b provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. required: - model - messages title: tencent/hy-mt2-30b-a3b, hy-mt2-30b-a3b - type: object properties: model: type: string enum: - ling-3.0-flash - inclusionai/ling-3.0-flash - inclusionai/ling-3.0-flash:free - ling-3.0-flash:free provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. seed: type: integer minimum: 1 description: This feature is in Beta. If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. logprobs: type: - boolean - 'null' description: Whether to return log probabilities of the output tokens or not. If True, returns the log probabilities of each output token returned in the content of message. top_logprobs: type: - number - 'null' minimum: 0 maximum: 20 description: An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. logprobs must be set to True if this parameter is used. reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens required: - model - messages title: ling-3.0-flash, inclusionai/ling-3.0-flash, inclusionai/ling-3.0-flash:free, ling-3.0-flash:free - type: object properties: model: type: string enum: - inkling - thinkingmachines/inkling provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - tool description: The role of the author of the message — in this case, the tool. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the tool message. tool_call_id: type: string description: Tool call that this message is responding to. name: type: - string - 'null' description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - tool_call_id - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. tool_calls: type: array items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. required: - name - arguments description: The function that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool to call. input: type: string description: The input for the custom tool call generated by the model. required: - name - input description: The custom tool that the model called. extra_content: type: object additionalProperties: {} description: Opaque provider metadata for this tool call (e.g. Gemini thought_signature). Echo it back unchanged on the next turn. required: - id - type - custom description: The tool calls generated by the model, such as function calls. refusal: type: - string - 'null' description: The refusal message by the Assistant. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. response_format: oneOf: - type: object properties: type: type: string enum: - text description: The type of response format being defined. Always text. required: - type additionalProperties: false description: Default response format. Used to generate text responses. - type: object properties: type: type: string enum: - json_object description: The type of response format being defined. Always json_object. required: - type additionalProperties: false description: 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. - type: object properties: type: type: string enum: - json_schema description: The type of response format being defined. Always json_schema. json_schema: type: object properties: name: type: string description: 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. schema: type: object additionalProperties: {} description: The schema for the response format, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. description: type: string description: A description of what the response format is for, used by the model to determine how to respond in the format. required: - name additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. required: - type - json_schema additionalProperties: false description: JSON Schema response format. Used to generate structured JSON responses. description: An object specifying the format that the model must output. tools: type: array items: anyOf: - oneOf: - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: description: type: string description: A description of what the function does, used by the model to choose when and how to call the function. name: type: string description: 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. parameters: type: object additionalProperties: description: The parameters the functions accepts, described as a JSON Schema object. strict: type: - boolean - 'null' description: 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. required: - name cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - function - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: object properties: name: type: string description: The name of the custom tool, used to identify it in tool calls. description: type: string description: Optional description of the custom tool, used to provide more context. format: oneOf: - type: object properties: type: type: string enum: - text required: - type - type: object properties: type: type: string enum: - grammar grammar: type: object properties: definition: type: string description: The grammar definition. syntax: type: string enum: - lark - regex description: The syntax of the grammar definition. required: - definition - syntax required: - type - grammar description: The input format for the custom tool. Default is unconstrained text. required: - name - format cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - custom - type: object properties: type: type: string minLength: 1 required: - type description: A list of tools the model may call. Currently, only functions are supported as a tool. Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported. tool_choice: anyOf: - type: string enum: - none - auto - required description: none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: object properties: name: type: string description: The name of the function to call. required: - name required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - allowed_tools description: The type of the tool. Currently, only function is supported. allowed_tools: type: object properties: mode: type: string enum: - auto - required description: 'Constrains the tools available to the model to a pre-defined set. - auto allows the model to pick from among the allowed tools and generate a message. - required requires the model to call one or more of the allowed tools.' tools: type: array items: type: object additionalProperties: {} description: A list of tool definitions that the model should be allowed to call. required: - mode - tools required: - type - allowed_tools description: Constrains the tools available to the model to a pre-defined set. - type: object properties: type: type: string enum: - function description: The type of the tool. Currently, only function is supported. function: type: string enum: - name description: The name of the function to call. required: - type - function description: Specifies a tool the model should use. Use to force the model to call a specific function. - type: object properties: type: type: string enum: - custom description: The type of the tool. Currently, only function is supported. custom: type: string enum: - name description: The name of the custom tool to call. required: - type - custom description: Specifies a tool the model should use. Use to force the model to call a specific custom tool. description: "Controls which (if any) tool is called by the model. none means the model will not call any tool and instead generates a message. auto means the model can pick between generating a message or calling one or more tools. required means the model must call one or more tools. Specifying a particular tool via {\"type\": \"function\", \"function\": {\"name\": \"my_function\"}} forces the model to call that tool.\n none is the default when no tools are present. auto is the default if tools are present." normalize_tool_schemas: type: boolean description: Enable provider compatibility normalization for tool function JSON schemas. parallel_tool_calls: type: boolean description: Whether to enable parallel function calling during tool use. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens required: - model - messages title: inkling, thinkingmachines/inkling - type: object properties: model: type: string enum: - inkling-small - thinkingmachines/inkling-small provider: type: string description: Provider routing override. Use a source key such as `openai`, `openrouter`, `xai`, `google`, `alibaba`, `minimax`, `moonshot`, `baidu`, or `togetherai` to run that provider with no fallback; `auto` (default) uses the full fallback chain. Case-insensitive. example: auto messages: type: array items: oneOf: - type: object properties: role: type: string enum: - user description: The role of the author of the message — in this case, the user content: anyOf: - type: string - type: array items: anyOf: - type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text - type: object properties: type: type: string enum: - image_url image_url: type: object properties: url: anyOf: - type: string format: uri - type: string description: 'Either a URL of the image or the base64 encoded image data. ' detail: type: string enum: - low - high - auto description: Specifies the detail level of the image. Currently supports JPG/JPEG, PNG, GIF, and WEBP formats. required: - url cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - image_url - type: object properties: type: type: string enum: - file description: The type of the content part. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type file: type: object properties: file_data: type: string description: "The file data, encoded in base64 and passed to the model as a string. Only PDF format is supported.\n - Maximum size per file: Up to 512 MB and up to 2 million tokens.\n - Maximum number of files: Up to 20 files can be attached to a single GPT application or Assistant. This limit applies throughout the application's lifetime.\n - Maximum total file storage per user: 10 GB." file_id: type: string filename: type: string description: The file name specified by the user. This name can be used to reference the file when interacting with the model, especially if multiple files are uploaded. required: - type - file description: The contents of the user message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the developer message. role: type: string enum: - developer description: The role of the author of the message — in this case, the developer. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - content - role - type: object properties: role: type: string enum: - system description: The role of the author of the message — in this case, the system. content: anyOf: - type: string - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: The contents of the system message. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role - content - type: object properties: role: type: string enum: - assistant description: The role of the author of the message — in this case, the Assistant. content: anyOf: - type: string description: The contents of the Assistant message. - type: array items: type: object properties: type: type: string enum: - text description: The type of the content part. text: type: string description: The text content. cache_control: type: object properties: type: type: string enum: - ephemeral ttl: type: string enum: - 5m - 1h required: - type required: - type - text description: An array of content parts with a defined type. Can be one or more of type text, or exactly one of type refusal. - {} description: The contents of the Assistant message. Required unless tool_calls or function_call is specified. name: type: string description: An optional name for the participant. Provides the model information to differentiate between participants of the same role. required: - role description: A list of messages comprising the conversation so far. Depending on the model you use, different message types (modalities) are supported, like text, documents (txt, pdf), images, and audio. max_completion_tokens: type: integer minimum: 1 description: An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and reasoning tokens. max_tokens: type: number minimum: 1 description: The maximum number of tokens that can be generated in the chat completion. This value can be used to control costs for text generated via API. stream: type: boolean default: false description: If set to True, the model response data will be streamed to the client as it is generated using server-sent events. stream_options: type: object properties: include_usage: type: boolean required: - include_usage temperature: type: number minimum: 0 maximum: 2 description: What sampling temperature to use. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. We generally recommend altering this or top_p but not both. top_p: type: number minimum: 0.01 maximum: 1 description: "An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top 10% probability mass are considered.\n We generally recommend altering this or temperature but not both." stop: anyOf: - type: string - type: array items: type: string - {} description: Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence. frequency_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. presence_penalty: type: - number - 'null' minimum: -2 maximum: 2 description: Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics. logit_bias: type: - object - 'null' additionalProperties: type: number minimum: -100 maximum: 100 description: "Modify the likelihood of specified tokens appearing in the completion.\n \n Accepts a JSON object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100. Mathematically, the bias is added to the logits generated by the model prior to sampling. The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection; values like -100 or 100 should result in a ban or exclusive selection of the relevant token." reasoning_effort: type: string enum: - none - low - medium - high description: Constrains effort on reasoning for reasoning models. Currently supported values are low, medium, and high. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. min_p: type: number minimum: 0.001 maximum: 0.999 description: A number between 0.001 and 0.999 that can be used as an alternative to top_p and top_k. top_k: type: number description: Only sample from the top K options for each subsequent token. Used to remove "long tail" low probability responses. Recommended for advanced use cases only. You usually only need to use temperature. repetition_penalty: type: - number - 'null' description: A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. top_a: type: number minimum: 0 maximum: 1 description: Alternate top sampling parameter. reasoning: type: object properties: effort: type: string enum: - low - medium - high description: Reasoning effort setting max_tokens: type: integer minimum: 1 description: Max tokens of reasoning content. Cannot be used simultaneously with effort. exclude: type: boolean description: Whether to exclude reasoning from the response description: Configuration for model reasoning/thinking tokens required: - model - messages title: inkling-small, thinkingmachines/inkling-small responses: '200': content: application/json: schema: type: object properties: id: type: string description: A unique identifier for the chat completion. example: chatcmpl-CQ9FPg3osank0dx0k46Z53LTqtXMl object: type: string enum: - chat.completion description: The object type. example: chat.completion created: type: number description: The Unix timestamp (in seconds) of when the chat completion was created. example: 1762343744 choices: type: array items: type: object properties: index: type: number description: The index of the choice in the list of choices. example: 0 message: type: object properties: role: type: string description: The role of the author of this message. example: assistant content: type: string description: The contents of the message. example: Hello! I'm just a program, so I don't have feelings, but I'm here and ready to help you. How can I assist you today? refusal: type: - string - 'null' description: The refusal message generated by the model. example: null annotations: type: - array - 'null' items: type: object properties: type: type: string enum: - url_citation description: The type of the URL citation. Always url_citation. url_citation: type: object properties: end_index: type: integer description: The index of the last character of the URL citation in the message. start_index: type: integer description: The index of the first character of the URL citation in the message. title: type: string description: The title of the web resource. url: type: string description: The URL of the web resource. required: - end_index - start_index - title - url description: A URL citation when using web search. required: - type - url_citation description: Annotations for the message, when applicable, as when using the web search tool. example: null audio: type: - object - 'null' properties: id: type: string description: Unique identifier for this audio response. data: type: string description: Base64 encoded audio bytes generated by the model, in the format specified in the request. transcript: type: string description: Transcript of the audio generated by the model. expires_at: type: integer description: The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations. required: - id - data - transcript - expires_at description: A chat completion message generated by the model. example: null tool_calls: type: - array - 'null' items: oneOf: - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - function description: The type of the tool. function: type: object properties: arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. name: type: string description: The name of the function to call. required: - arguments - name description: The function that the model called. required: - id - type - function - type: object properties: id: type: string description: The ID of the tool call. type: type: string enum: - custom description: The type of the tool. custom: type: object properties: input: type: string description: The input for the custom tool call generated by the model. name: type: string description: The name of the custom tool to call. required: - input - name description: The custom tool that the model called. required: - id - type - custom description: The tool calls generated by the model, such as function calls. example: null required: - role - content description: A chat completion message generated by the model. finish_reason: type: string enum: - stop - length - content_filter - tool_calls description: The reason the model stopped generating tokens. This will be stop if the model hit a natural stop point or a provided stop sequence, length if the maximum number of tokens specified in the request was reached, content_filter if content was omitted due to a flag from our content filters, tool_calls if the model called a tool logprobs: type: - object - 'null' properties: content: type: array items: type: object properties: bytes: type: array items: type: integer description: A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token. logprob: type: number description: The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely. token: type: string description: The token. top_logprobs: type: - array - 'null' items: type: object properties: bytes: type: - array - 'null' items: type: integer description: A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token. logprob: type: number description: The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely. token: type: string description: The token. required: - logprob - token description: List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested top_logprobs returned. required: - bytes - logprob - token description: A list of message content tokens with log probability information. refusal: type: array items: type: object properties: bytes: type: array items: type: integer description: A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token. logprob: type: number description: The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely. token: type: string description: The token. top_logprobs: type: - array - 'null' items: type: object properties: bytes: type: - array - 'null' items: type: integer description: A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token. logprob: type: number description: The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely. token: type: string description: The token. required: - logprob - token description: List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested top_logprobs returned. required: - bytes - logprob - token description: A list of message refusal tokens with log probability information. required: - content - refusal description: Log probability information for the choice. example: null required: - index - message - finish_reason model: type: string description: The model used for the chat completion. example: gpt-4o-2024-08-06 usage: type: object properties: prompt_tokens: type: number description: Number of tokens in the prompt. example: 137 completion_tokens: type: number description: Number of tokens in the generated completion. example: 914 total_tokens: type: number description: Total number of tokens used in the request (prompt + completion). example: 1051 completion_tokens_details: type: - object - 'null' properties: accepted_prediction_tokens: type: - integer - 'null' description: When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion. audio_tokens: type: - integer - 'null' description: Audio input tokens generated by the model. reasoning_tokens: type: - integer - 'null' description: Tokens generated by the model for reasoning. rejected_prediction_tokens: type: - integer - 'null' description: When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. However, like reasoning tokens, these tokens are still counted in the total completion tokens for purposes of billing, output, and context window limits. description: Breakdown of tokens used in a completion. example: null prompt_tokens_details: type: - object - 'null' properties: audio_tokens: type: - integer - 'null' description: Audio input tokens present in the prompt. cached_tokens: type: - integer - 'null' description: Cached tokens present in the prompt. description: Breakdown of tokens used in the prompt. example: null required: - prompt_tokens - completion_tokens - total_tokens description: Usage statistics for the completion request. meta: type: - object - 'null' properties: usage: type: - object - 'null' properties: credits_used: type: number description: The number of tokens consumed during generation. example: 120000 usd_spent: type: number description: The total amount of money spent by the user in USD. example: 0.06 required: - credits_used - usd_spent description: Additional details about the generation. required: - id - object - created - choices - model - usage text/event-stream: schema: type: object properties: id: type: string description: A unique identifier for the chat completion. choices: type: array items: type: object properties: delta: type: - object - 'null' properties: content: type: string description: The contents of the chunk message. refusal: type: - string - 'null' description: The refusal message generated by the model. role: type: string enum: - user - assistant - developer - system - tool description: The role of the author of this message. tool_calls: type: - array - 'null' items: type: object properties: index: type: number id: type: string description: The ID of the tool call. function: type: object properties: arguments: type: string description: The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function. name: type: string required: - arguments - name description: The function that the model called. type: type: string enum: - function description: The type of the tool. required: - index - id - function - type description: The tool calls generated by the model, such as function calls. required: - content - role description: A chat completion delta generated by streamed model responses. finish_reason: type: string enum: - length - function_call - stop - tool_calls - content_filter index: type: number description: The index of the choice in the list of choices. logprobs: type: - object - 'null' properties: content: type: array items: type: object properties: token: type: string description: The token. bytes: type: array items: type: number description: A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token. logprob: type: number description: The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely. top_logprobs: type: - array - 'null' items: type: object properties: token: type: string description: The token. bytes: type: array items: type: number description: A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token. logprob: type: number description: The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely. required: - token - bytes - logprob description: List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested top_logprobs returned. required: - token - bytes - logprob refusal: type: array items: type: object properties: token: type: string description: The token. bytes: type: array items: type: number description: A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token. logprob: type: number description: The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely. top_logprobs: type: - array - 'null' items: type: object properties: token: type: string description: The token. bytes: type: array items: type: number description: A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be null if there is no bytes representation for the token. logprob: type: number description: The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value -9999.0 is used to signify that the token is very unlikely. required: - token - bytes - logprob description: List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested top_logprobs returned. required: - token - bytes - logprob required: - content - refusal description: Log probability information for the choice. required: - finish_reason - index description: A list of chat completion choices. Can be more than one if n is greater than 1. created: type: number description: The Unix timestamp (in seconds) of when the chat completion was created. model: type: string description: The model used for the chat completion. object: type: string enum: - chat.completion.chunk description: The object type. service_tier: type: - string - 'null' enum: - auto - default - flex - scale - priority description: Specifies the processing type used for serving the request. usage: type: - object - 'null' properties: prompt_tokens: type: number description: Number of tokens in the prompt. example: 137 completion_tokens: type: number description: Number of tokens in the generated completion. example: 914 total_tokens: type: number description: Total number of tokens used in the request (prompt + completion). example: 1051 completion_tokens_details: type: - object - 'null' properties: accepted_prediction_tokens: type: - integer - 'null' description: When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion. audio_tokens: type: - integer - 'null' description: Audio input tokens generated by the model. reasoning_tokens: type: - integer - 'null' description: Tokens generated by the model for reasoning. rejected_prediction_tokens: type: - integer - 'null' description: When using Predicted Outputs, the number of tokens in the prediction that did not appear in the completion. However, like reasoning tokens, these tokens are still counted in the total completion tokens for purposes of billing, output, and context window limits. description: Breakdown of tokens used in a completion. example: null prompt_tokens_details: type: - object - 'null' properties: audio_tokens: type: - integer - 'null' description: Audio input tokens present in the prompt. cached_tokens: type: - integer - 'null' description: Cached tokens present in the prompt. description: Breakdown of tokens used in the prompt. example: null required: - prompt_tokens - completion_tokens - total_tokens description: Usage statistics for the completion request. required: - id - choices - created - model - object tags: - Chat Completions summary: V1 chat completions x-summary-source: derived servers: - url: https://api.aimlapi.com /chat/completions: post: tags: - Chat Completions summary: AIMLAPI Create Chat Message Completion description: You can read about parameters here. requestBody: content: application/json: schema: type: object example: model: '{{llmModel}}' messages: - role: user content: Who won the world series in 2020? - role: assistant content: The Los Angeles Dodgers won the World Series in 2020. - role: user content: Where was it played? temperature: 1 top_p: 1 n: 1 stream: false max_tokens: 250 presence_penalty: 0 frequency_penalty: 0 parameters: - name: Content-Type in: header schema: type: string example: application/json - name: Accept in: header schema: type: string example: application/json responses: '201': description: Created headers: Access-Control-Allow-Origin: schema: type: string example: '*' Content-Length: schema: type: integer example: '568' Content-Type: schema: type: string example: application/json; charset=utf-8 Date: schema: type: string example: Mon, 22 Apr 2024 12:20:25 GMT Etag: schema: type: string example: W/"238-2D9iLg+dO3KTtrTjMwcYdpNqeQY" X-Powered-By: schema: type: string example: Express content: application/json: schema: type: object example: id: 878591576bebef4b-PDX object: chat.completion created: 1713788425 model: mistralai/Mistral-7B-Instruct-v0.2 prompt: [] choices: - finish_reason: eos logprobs: null index: 0 message: role: assistant content: ' The 2020 World Series was played at Globe Life Field in Arlington, Texas. It was played with no fans in attendance due to the COVID-19 pandemic. This was the first time in the history of the World Series that it was played in its entirety in a single site.' usage: prompt_tokens: 52 completion_tokens: 64 total_tokens: 116 x-microcks-operation: delay: 0 dispatcher: FALLBACK security: - bearerAuth: [] operationId: postChatCompletions x-operation-id-source: derived servers: - url: https://api.aimlapi.com components: securitySchemes: bearerAuth: type: http scheme: bearer x-refined-from: - aimlapi-inference-openapi.yml - aimlapi-openapi.yml