openapi: 3.0.0 info: title: AIML API version: 1.0.0 servers: - url: https://api.aimlapi.com 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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 - nullable: true 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 nullable: true 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 nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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. 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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 - nullable: true 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 nullable: true 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 nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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. 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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 - nullable: true 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 nullable: true 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 nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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 - nullable: true 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 nullable: true 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 nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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 - nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. 'n': type: integer nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. 'n': type: integer nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true description: The refusal message by the Assistant. audio: type: object nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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. We generally recommend altering this or temperature but not both. audio: type: object nullable: true 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 nullable: true 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: ["text"] Model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: ["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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true description: The refusal message by the Assistant. audio: type: object nullable: true 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 nullable: true 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 nullable: true 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 nullable: true properties: include_usage: type: boolean required: - include_usage frequency_penalty: type: number nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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. We generally recommend altering this or temperature but not both. temperature: type: number nullable: true 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 - nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. - nullable: true 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. none is the default when no tools are present. auto is the default if tools are present. parallel_tool_calls: type: boolean nullable: true description: >- Whether to enable parallel function calling during tool use. reasoning_effort: type: string nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - nullable: true description: >- An object specifying the format that the model must output. audio: type: object nullable: true 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 nullable: true 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: ["text"] Model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: ["text", "audio"] web_search_options: type: object nullable: true 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 nullable: true 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 nullable: true description: Enable Alibaba Model Studio web search. search_options: type: object nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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. 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true description: The refusal message by the Assistant. audio: type: object nullable: true 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: nullable: true 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. 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. 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: nullable: true required: type: array items: type: string required: - type additionalProperties: nullable: true description: |- JSON schema for this tool's input. 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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. 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. Each tool definition includes: name: Name of the tool. description: Optional, but strongly-recommended description of the tool. 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. 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true description: The refusal message by the Assistant. audio: type: object nullable: true 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: nullable: true 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. 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. 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: nullable: true required: type: array items: type: string required: - type additionalProperties: nullable: true description: |- JSON schema for this tool's input. 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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. 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. Each tool definition includes: name: Name of the tool. description: Optional, but strongly-recommended description of the tool. 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. frequency_penalty: type: number nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. frequency_penalty: type: number nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. frequency_penalty: type: number nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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. - nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true description: The refusal message by the Assistant. audio: type: object nullable: true 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 nullable: true 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 nullable: true 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: ["text"] Model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: ["text", "audio"] 'n': type: integer nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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 nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true description: The refusal message by the Assistant. audio: type: object nullable: true 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 nullable: true 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 nullable: true 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: ["text"] Model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: ["text", "audio"] 'n': type: integer nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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 nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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 nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true description: The refusal message by the Assistant. audio: type: object nullable: true 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 nullable: true 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 nullable: true 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: ["text"] Model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: ["text", "audio"] 'n': type: integer nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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 nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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. - nullable: true 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. 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 nullable: true 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 nullable: true 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 nullable: true 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 - nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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. - nullable: true 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. 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 nullable: true 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 nullable: true 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 nullable: true 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 - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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. - nullable: true 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. 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 nullable: true 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 nullable: true 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 nullable: true 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 - nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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. - nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. 'n': type: integer nullable: true 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 - nullable: true 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 nullable: true 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 nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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. 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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 nullable: true 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 - nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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. 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 nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 - nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. frequency_penalty: type: number nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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. We generally recommend altering this or temperature but not both. frequency_penalty: type: number nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true 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. 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 nullable: true 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. We generally recommend altering this or temperature but not both. frequency_penalty: type: number nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true description: >- A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. logprobs: type: boolean nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true description: The refusal message by the Assistant. audio: type: object nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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 nullable: true 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: ["text"] Model can also be used to generate audio. To request that this model generate both text and audio responses, you can use: ["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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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. 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. - nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true description: >- A number that controls the diversity of generated text by reducing the likelihood of repeated sequences. Higher values decrease repetition. logprobs: type: boolean nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. We generally recommend altering this or temperature but not both. 'n': type: integer nullable: true 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 - nullable: true 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 nullable: true 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 nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. logit_bias: type: object nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. logit_bias: type: object nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. logit_bias: type: object nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. logit_bias: type: object nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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 nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. logit_bias: type: object nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. logit_bias: type: object nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true 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: nullable: true 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. 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 nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true 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: nullable: true 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. 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 - nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true 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: nullable: true 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. 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 nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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. - nullable: true 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. 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 nullable: true 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 nullable: true 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 - nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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. - nullable: true 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. 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 nullable: true 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 nullable: true 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 - nullable: true 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 nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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. 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 nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. 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 nullable: true 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 nullable: true 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 - nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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. We generally recommend altering this or temperature but not both. logit_bias: type: object nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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. 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 nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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. 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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. 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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 nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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. 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. 'n': type: integer nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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. 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. frequency_penalty: type: number nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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 nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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 nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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 - nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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. - nullable: true 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 - nullable: true 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. - nullable: true 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 - nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true 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 nullable: true 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 nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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: nullable: true 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. 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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. - nullable: true 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. We generally recommend altering this or temperature but not both. stop: anyOf: - type: string - type: array items: type: string - nullable: true 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 nullable: true 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 nullable: true 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 nullable: true additionalProperties: type: number minimum: -100 maximum: 100 description: >- Modify the likelihood of specified tokens appearing in the completion. 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 nullable: true 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 nullable: true description: The refusal message generated by the model. example: null annotations: type: array nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true items: type: object properties: bytes: type: array nullable: true 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 nullable: true items: type: object properties: bytes: type: array nullable: true 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 nullable: true properties: accepted_prediction_tokens: type: integer nullable: true description: >- When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion. audio_tokens: type: integer nullable: true description: Audio input tokens generated by the model. reasoning_tokens: type: integer nullable: true description: Tokens generated by the model for reasoning. rejected_prediction_tokens: type: integer nullable: true 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 nullable: true properties: audio_tokens: type: integer nullable: true description: Audio input tokens present in the prompt. cached_tokens: type: integer nullable: true 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 nullable: true properties: usage: type: object nullable: true 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 nullable: true properties: content: type: string description: The contents of the chunk message. refusal: type: string nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true 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 nullable: true enum: - auto - default - flex - scale - priority description: >- Specifies the processing type used for serving the request. usage: type: object nullable: true 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 nullable: true properties: accepted_prediction_tokens: type: integer nullable: true description: >- When using Predicted Outputs, the number of tokens in the prediction that appeared in the completion. audio_tokens: type: integer nullable: true description: Audio input tokens generated by the model. reasoning_tokens: type: integer nullable: true description: Tokens generated by the model for reasoning. rejected_prediction_tokens: type: integer nullable: true 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 nullable: true properties: audio_tokens: type: integer nullable: true description: Audio input tokens present in the prompt. cached_tokens: type: integer nullable: true 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 /v1/responses: post: operationId: _v1_responses 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-4 - openai/gpt-4 input: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the user role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content description: An output message from the model. - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type description: A tool call to run a function. - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type description: The output of a function tool call. - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: type: object additionalProperties: nullable: true description: >- The JSON schema describing the tool's input. name: type: string description: The name of the tool. annotations: type: object nullable: true additionalProperties: nullable: true description: Additional annotations about the tool. description: type: string nullable: true description: The description of the tool. required: - input_schema - name description: The tools available on the server. type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type description: A list of tools available on an MCP server. - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type description: >- A request for human approval of a tool invocation. - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type description: A response to an MCP approval request. - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type description: An invocation of a tool on an MCP server. - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- Text, image, or file inputs to the model, used to generate a response. background: type: boolean default: false description: Whether to run the model response in the background. instructions: type: string nullable: true description: >- A system (or developer) message inserted into the model's context. When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. include: type: array nullable: true items: type: string enum: - message.input_image.image_url - computer_call_output.output.image_url - reasoning.encrypted_content - code_interpreter_call.outputs description: > Specify additional output data to include in the model response. Currently supported values are: - code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items. - computer_call_output.output.image_url: Include image urls from the computer call output. - file_search_call.results: Include the search results of the file search tool call. - message.output_text.logprobs: Include logprobs with assistant messages. - reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program). max_output_tokens: type: integer minimum: 16 description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. prompt: type: object nullable: true properties: id: type: string description: The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: anyOf: - type: string - oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. store: type: boolean nullable: true default: false description: >- Whether to store the generated model response for later retrieval via API. stream: type: boolean nullable: true 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. text: type: object properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. required: - format description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. truncation: type: string enum: - auto - disabled default: disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. tools: type: array items: anyOf: - type: object properties: name: type: string description: The name of the function to call. parameters: type: object additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: anyOf: - type: boolean - nullable: true - nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - parameters - type description: >- Defines a function in your own code the model can choose to call. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string minLength: 1 required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- How the model should select which tool (or tools) to use when generating a response. parallel_tool_calls: type: boolean nullable: true description: >- Whether to allow the model to run tool calls in parallel. temperature: type: number nullable: true minimum: 0 maximum: 2 description: >- What sampling temperature to use, between 0 and 2. 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. We generally recommend altering this or temperature but not both. required: - model - input 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-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 - 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 input: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the user role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content description: An output message from the model. - type: object properties: id: type: string description: The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type description: The results of a web search tool call. - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type description: A tool call to run a function. - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type description: The output of a function tool call. - type: object properties: code: type: string description: The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - interpreting description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - code - id - outputs - status - type - container_id description: A tool call to run code. - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: type: object additionalProperties: nullable: true description: >- The JSON schema describing the tool's input. name: type: string description: The name of the tool. annotations: type: object nullable: true additionalProperties: nullable: true description: Additional annotations about the tool. description: type: string nullable: true description: The description of the tool. required: - input_schema - name description: The tools available on the server. type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type description: A list of tools available on an MCP server. - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type description: >- A request for human approval of a tool invocation. - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type description: A response to an MCP approval request. - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type description: An invocation of a tool on an MCP server. - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- Text, image, or file inputs to the model, used to generate a response. background: type: boolean default: false description: Whether to run the model response in the background. instructions: type: string nullable: true description: >- A system (or developer) message inserted into the model's context. When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. include: type: array nullable: true items: type: string enum: - message.input_image.image_url - computer_call_output.output.image_url - reasoning.encrypted_content - code_interpreter_call.outputs description: > Specify additional output data to include in the model response. Currently supported values are: - code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items. - computer_call_output.output.image_url: Include image urls from the computer call output. - file_search_call.results: Include the search results of the file search tool call. - message.output_text.logprobs: Include logprobs with assistant messages. - reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program). max_output_tokens: type: integer minimum: 16 description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. prompt: type: object nullable: true properties: id: type: string description: The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: anyOf: - type: string - oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. store: type: boolean nullable: true default: false description: >- Whether to store the generated model response for later retrieval via API. stream: type: boolean nullable: true 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. text: type: object properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. required: - format description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. truncation: type: string enum: - auto - disabled default: disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. tools: type: array items: anyOf: - type: object properties: name: type: string description: The name of the function to call. parameters: type: object additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: anyOf: - type: boolean - nullable: true - nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - parameters - type description: >- Defines a function in your own code the model can choose to call. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: >- The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11. 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 nullable: true properties: type: type: string enum: - approximate description: >- The type of location approximation. Always approximate. city: type: string nullable: true description: >- Free text input for the city of the user, e.g. San Francisco. country: type: string nullable: true description: >- The two-letter ISO country code of the user, e.g. US. region: type: string nullable: true description: >- Free text input for the region of the user, e.g. California. timezone: type: string nullable: true description: >- The IANA timezone of the user, e.g. America/Los_Angeles. required: - type description: The user's location required: - type description: >- This tool searches the web for relevant results to use in a response. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string enum: - code_interpreter description: >- The type of the code interpreter tool. Always code_interpreter. container: anyOf: - type: string - type: object properties: type: type: string enum: - auto required: - type description: The container ID. required: - type - container description: >- A tool that runs Python code to help generate a response to a prompt. - type: object properties: type: type: string minLength: 1 required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- How the model should select which tool (or tools) to use when generating a response. temperature: type: number nullable: true minimum: 0 maximum: 2 description: >- What sampling temperature to use, between 0 and 2. 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. We generally recommend altering this or temperature but not both. parallel_tool_calls: type: boolean nullable: true description: >- Whether to allow the model to run tool calls in parallel. required: - model - input 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, 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.1-nano - openai/gpt-4.1-nano - gpt-4.1-nano-2025-04-14 - openai/gpt-4.1-nano-2025-04-14 - gpt-4-turbo - openai/gpt-4-turbo - gpt-4-turbo-2024-04-09 - openai/gpt-4-turbo-2024-04-09 input: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the user role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content description: An output message from the model. - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type description: A tool call to run a function. - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type description: The output of a function tool call. - type: object properties: code: type: string description: The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - interpreting description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - code - id - outputs - status - type - container_id description: A tool call to run code. - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: type: object additionalProperties: nullable: true description: >- The JSON schema describing the tool's input. name: type: string description: The name of the tool. annotations: type: object nullable: true additionalProperties: nullable: true description: Additional annotations about the tool. description: type: string nullable: true description: The description of the tool. required: - input_schema - name description: The tools available on the server. type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type description: A list of tools available on an MCP server. - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type description: >- A request for human approval of a tool invocation. - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type description: A response to an MCP approval request. - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type description: An invocation of a tool on an MCP server. - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- Text, image, or file inputs to the model, used to generate a response. background: type: boolean default: false description: Whether to run the model response in the background. instructions: type: string nullable: true description: >- A system (or developer) message inserted into the model's context. When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. include: type: array nullable: true items: type: string enum: - message.input_image.image_url - computer_call_output.output.image_url - reasoning.encrypted_content - code_interpreter_call.outputs description: > Specify additional output data to include in the model response. Currently supported values are: - code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items. - computer_call_output.output.image_url: Include image urls from the computer call output. - file_search_call.results: Include the search results of the file search tool call. - message.output_text.logprobs: Include logprobs with assistant messages. - reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program). max_output_tokens: type: integer minimum: 16 description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. prompt: type: object nullable: true properties: id: type: string description: The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: anyOf: - type: string - oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. store: type: boolean nullable: true default: false description: >- Whether to store the generated model response for later retrieval via API. stream: type: boolean nullable: true 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. text: type: object properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. required: - format description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. truncation: type: string enum: - auto - disabled default: disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. tools: type: array items: anyOf: - type: object properties: name: type: string description: The name of the function to call. parameters: type: object additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: anyOf: - type: boolean - nullable: true - nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - parameters - type description: >- Defines a function in your own code the model can choose to call. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string enum: - code_interpreter description: >- The type of the code interpreter tool. Always code_interpreter. container: anyOf: - type: string - type: object properties: type: type: string enum: - auto required: - type description: The container ID. required: - type - container description: >- A tool that runs Python code to help generate a response to a prompt. - type: object properties: type: type: string minLength: 1 required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- How the model should select which tool (or tools) to use when generating a response. temperature: type: number nullable: true minimum: 0 maximum: 2 description: >- What sampling temperature to use, between 0 and 2. 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. We generally recommend altering this or temperature but not both. parallel_tool_calls: type: boolean nullable: true description: >- Whether to allow the model to run tool calls in parallel. required: - model - input title: >- 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-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 input: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the user role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content description: An output message from the model. - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type description: A tool call to run a function. - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type description: The output of a function tool call. - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type description: >- A description of the chain of thought used by a reasoning model while generating a response. - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: type: object additionalProperties: nullable: true description: >- The JSON schema describing the tool's input. name: type: string description: The name of the tool. annotations: type: object nullable: true additionalProperties: nullable: true description: Additional annotations about the tool. description: type: string nullable: true description: The description of the tool. required: - input_schema - name description: The tools available on the server. type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type description: A list of tools available on an MCP server. - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type description: >- A request for human approval of a tool invocation. - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type description: A response to an MCP approval request. - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type description: An invocation of a tool on an MCP server. - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- Text, image, or file inputs to the model, used to generate a response. background: type: boolean default: false description: Whether to run the model response in the background. instructions: type: string nullable: true description: >- A system (or developer) message inserted into the model's context. When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. include: type: array nullable: true items: type: string enum: - message.input_image.image_url - computer_call_output.output.image_url - reasoning.encrypted_content - code_interpreter_call.outputs description: > Specify additional output data to include in the model response. Currently supported values are: - code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items. - computer_call_output.output.image_url: Include image urls from the computer call output. - file_search_call.results: Include the search results of the file search tool call. - message.output_text.logprobs: Include logprobs with assistant messages. - reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program). max_output_tokens: type: integer minimum: 16 description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. prompt: type: object nullable: true properties: id: type: string description: The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: anyOf: - type: string - oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. store: type: boolean nullable: true default: false description: >- Whether to store the generated model response for later retrieval via API. stream: type: boolean nullable: true 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. text: type: object properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. required: - format description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. truncation: type: string enum: - auto - disabled default: disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. tools: type: array items: anyOf: - type: object properties: name: type: string description: The name of the function to call. parameters: type: object additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: anyOf: - type: boolean - nullable: true - nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - parameters - type description: >- Defines a function in your own code the model can choose to call. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string minLength: 1 required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- How the model should select which tool (or tools) to use when generating a response. reasoning: type: object nullable: true properties: effort: type: string nullable: true enum: - none - low - medium - high description: >- Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. summary: type: string nullable: true enum: - auto - concise - detailed description: >- A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. description: |- o-series models only Configuration options for reasoning models. parallel_tool_calls: type: boolean nullable: true description: >- Whether to allow the model to run tool calls in parallel. required: - model - input 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 - type: object properties: model: type: string enum: - o4-mini-2025-04-16 - openai/o4-mini-2025-04-16 - o3-2025-04-16 - openai/o3-2025-04-16 input: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the user role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content description: An output message from the model. - type: object properties: id: type: string description: The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type description: The results of a web search tool call. - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type description: A tool call to run a function. - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type description: The output of a function tool call. - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type description: >- A description of the chain of thought used by a reasoning model while generating a response. - type: object properties: code: type: string description: The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - interpreting description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - code - id - outputs - status - type - container_id description: A tool call to run code. - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: type: object additionalProperties: nullable: true description: >- The JSON schema describing the tool's input. name: type: string description: The name of the tool. annotations: type: object nullable: true additionalProperties: nullable: true description: Additional annotations about the tool. description: type: string nullable: true description: The description of the tool. required: - input_schema - name description: The tools available on the server. type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type description: A list of tools available on an MCP server. - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type description: >- A request for human approval of a tool invocation. - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type description: A response to an MCP approval request. - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type description: An invocation of a tool on an MCP server. - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- Text, image, or file inputs to the model, used to generate a response. background: type: boolean default: false description: Whether to run the model response in the background. instructions: type: string nullable: true description: >- A system (or developer) message inserted into the model's context. When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. include: type: array nullable: true items: type: string enum: - message.input_image.image_url - computer_call_output.output.image_url - reasoning.encrypted_content - code_interpreter_call.outputs description: > Specify additional output data to include in the model response. Currently supported values are: - code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items. - computer_call_output.output.image_url: Include image urls from the computer call output. - file_search_call.results: Include the search results of the file search tool call. - message.output_text.logprobs: Include logprobs with assistant messages. - reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program). max_output_tokens: type: integer minimum: 16 description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. prompt: type: object nullable: true properties: id: type: string description: The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: anyOf: - type: string - oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. store: type: boolean nullable: true default: false description: >- Whether to store the generated model response for later retrieval via API. stream: type: boolean nullable: true 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. text: type: object properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. required: - format description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. truncation: type: string enum: - auto - disabled default: disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. tools: type: array items: anyOf: - type: object properties: name: type: string description: The name of the function to call. parameters: type: object additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: anyOf: - type: boolean - nullable: true - nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - parameters - type description: >- Defines a function in your own code the model can choose to call. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: >- The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11. 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 nullable: true properties: type: type: string enum: - approximate description: >- The type of location approximation. Always approximate. city: type: string nullable: true description: >- Free text input for the city of the user, e.g. San Francisco. country: type: string nullable: true description: >- The two-letter ISO country code of the user, e.g. US. region: type: string nullable: true description: >- Free text input for the region of the user, e.g. California. timezone: type: string nullable: true description: >- The IANA timezone of the user, e.g. America/Los_Angeles. required: - type description: The user's location required: - type description: >- This tool searches the web for relevant results to use in a response. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string enum: - code_interpreter description: >- The type of the code interpreter tool. Always code_interpreter. container: anyOf: - type: string - type: object properties: type: type: string enum: - auto required: - type description: The container ID. required: - type - container description: >- A tool that runs Python code to help generate a response to a prompt. - type: object properties: type: type: string minLength: 1 required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- How the model should select which tool (or tools) to use when generating a response. reasoning: type: object nullable: true properties: effort: type: string nullable: true enum: - none - low - medium - high description: >- Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. summary: type: string nullable: true enum: - auto - concise - detailed description: >- A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. description: |- o-series models only Configuration options for reasoning models. parallel_tool_calls: type: boolean nullable: true description: >- Whether to allow the model to run tool calls in parallel. required: - model - input title: >- o4-mini-2025-04-16, openai/o4-mini-2025-04-16, o3-2025-04-16, openai/o3-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.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-2025-08-07 - openai/gpt-5-2025-08-07 - gpt-5-mini-2025-08-07 - openai/gpt-5-mini-2025-08-07 - gpt-5 - openai/gpt-5 - gpt-5-mini - openai/gpt-5-mini - gpt-5-nano - openai/gpt-5-nano - openai/gpt-5-5 input: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the user role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content description: An output message from the model. - type: object properties: id: type: string description: The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type description: The results of a web search tool call. - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type description: A tool call to run a function. - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type description: The output of a function tool call. - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type description: >- A description of the chain of thought used by a reasoning model while generating a response. - type: object properties: code: type: string description: The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - interpreting description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - code - id - outputs - status - type - container_id description: A tool call to run code. - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: type: object additionalProperties: nullable: true description: >- The JSON schema describing the tool's input. name: type: string description: The name of the tool. annotations: type: object nullable: true additionalProperties: nullable: true description: Additional annotations about the tool. description: type: string nullable: true description: The description of the tool. required: - input_schema - name description: The tools available on the server. type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type description: A list of tools available on an MCP server. - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type description: >- A request for human approval of a tool invocation. - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type description: A response to an MCP approval request. - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type description: An invocation of a tool on an MCP server. - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- Text, image, or file inputs to the model, used to generate a response. background: type: boolean default: false description: Whether to run the model response in the background. instructions: type: string nullable: true description: >- A system (or developer) message inserted into the model's context. When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. include: type: array nullable: true items: type: string enum: - message.input_image.image_url - computer_call_output.output.image_url - reasoning.encrypted_content - code_interpreter_call.outputs description: > Specify additional output data to include in the model response. Currently supported values are: - code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items. - computer_call_output.output.image_url: Include image urls from the computer call output. - file_search_call.results: Include the search results of the file search tool call. - message.output_text.logprobs: Include logprobs with assistant messages. - reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program). max_output_tokens: type: integer minimum: 16 description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. prompt: type: object nullable: true properties: id: type: string description: The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: anyOf: - type: string - oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. store: type: boolean nullable: true default: false description: >- Whether to store the generated model response for later retrieval via API. stream: type: boolean nullable: true 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. text: type: object properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. required: - format description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. truncation: type: string enum: - auto - disabled default: disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. tools: type: array items: anyOf: - type: object properties: name: type: string description: The name of the function to call. parameters: type: object additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: anyOf: - type: boolean - nullable: true - nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - parameters - type description: >- Defines a function in your own code the model can choose to call. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: >- The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11. 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 nullable: true properties: type: type: string enum: - approximate description: >- The type of location approximation. Always approximate. city: type: string nullable: true description: >- Free text input for the city of the user, e.g. San Francisco. country: type: string nullable: true description: >- The two-letter ISO country code of the user, e.g. US. region: type: string nullable: true description: >- Free text input for the region of the user, e.g. California. timezone: type: string nullable: true description: >- The IANA timezone of the user, e.g. America/Los_Angeles. required: - type description: The user's location required: - type description: >- This tool searches the web for relevant results to use in a response. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string enum: - code_interpreter description: >- The type of the code interpreter tool. Always code_interpreter. container: anyOf: - type: string - type: object properties: type: type: string enum: - auto required: - type description: The container ID. required: - type - container description: >- A tool that runs Python code to help generate a response to a prompt. - type: object properties: type: type: string minLength: 1 required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- How the model should select which tool (or tools) to use when generating a response. parallel_tool_calls: type: boolean nullable: true description: >- Whether to allow the model to run tool calls in parallel. reasoning: type: object nullable: true properties: effort: type: string nullable: true enum: - none - low - medium - high description: >- Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. summary: type: string nullable: true enum: - auto - concise - detailed description: >- A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. description: |- o-series models only Configuration options for reasoning models. required: - model - input title: >- gpt-5-nano-2025-08-07, openai/gpt-5-nano-2025-08-07, 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-2025-08-07, openai/gpt-5-2025-08-07, gpt-5-mini-2025-08-07, openai/gpt-5-mini-2025-08-07, gpt-5, openai/gpt-5, gpt-5-mini, openai/gpt-5-mini, gpt-5-nano, openai/gpt-5-nano, openai/gpt-5-5 - type: object properties: model: type: string enum: - gpt-5-pro - openai/gpt-5-pro - gpt-5.2-pro-2025-12-11 - openai/gpt-5.2-pro-2025-12-11 - openai/gpt-5-2-pro input: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the user role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content description: An output message from the model. - type: object properties: id: type: string description: The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type description: The results of a web search tool call. - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type description: A tool call to run a function. - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type description: The output of a function tool call. - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: type: object additionalProperties: nullable: true description: >- The JSON schema describing the tool's input. name: type: string description: The name of the tool. annotations: type: object nullable: true additionalProperties: nullable: true description: Additional annotations about the tool. description: type: string nullable: true description: The description of the tool. required: - input_schema - name description: The tools available on the server. type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type description: A list of tools available on an MCP server. - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type description: >- A request for human approval of a tool invocation. - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type description: A response to an MCP approval request. - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type description: An invocation of a tool on an MCP server. - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- Text, image, or file inputs to the model, used to generate a response. background: type: boolean default: false description: Whether to run the model response in the background. instructions: type: string nullable: true description: >- A system (or developer) message inserted into the model's context. When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. include: type: array nullable: true items: type: string enum: - message.input_image.image_url - computer_call_output.output.image_url - reasoning.encrypted_content - code_interpreter_call.outputs description: > Specify additional output data to include in the model response. Currently supported values are: - code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items. - computer_call_output.output.image_url: Include image urls from the computer call output. - file_search_call.results: Include the search results of the file search tool call. - message.output_text.logprobs: Include logprobs with assistant messages. - reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program). max_output_tokens: type: integer minimum: 16 description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. prompt: type: object nullable: true properties: id: type: string description: The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: anyOf: - type: string - oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. store: type: boolean nullable: true default: false description: >- Whether to store the generated model response for later retrieval via API. stream: type: boolean nullable: true 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. text: type: object properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. required: - format description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. truncation: type: string enum: - auto - disabled default: disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. tools: type: array items: anyOf: - type: object properties: name: type: string description: The name of the function to call. parameters: type: object additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: anyOf: - type: boolean - nullable: true - nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - parameters - type description: >- Defines a function in your own code the model can choose to call. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: >- The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11. 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 nullable: true properties: type: type: string enum: - approximate description: >- The type of location approximation. Always approximate. city: type: string nullable: true description: >- Free text input for the city of the user, e.g. San Francisco. country: type: string nullable: true description: >- The two-letter ISO country code of the user, e.g. US. region: type: string nullable: true description: >- Free text input for the region of the user, e.g. California. timezone: type: string nullable: true description: >- The IANA timezone of the user, e.g. America/Los_Angeles. required: - type description: The user's location required: - type description: >- This tool searches the web for relevant results to use in a response. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string minLength: 1 required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- How the model should select which tool (or tools) to use when generating a response. parallel_tool_calls: type: boolean nullable: true description: >- Whether to allow the model to run tool calls in parallel. required: - model - input title: >- gpt-5-pro, openai/gpt-5-pro, gpt-5.2-pro-2025-12-11, openai/gpt-5.2-pro-2025-12-11, openai/gpt-5-2-pro - type: object properties: model: type: string enum: - gpt-5.1-2025-11-13 - openai/gpt-5.1-2025-11-13 - gpt-5.2-2025-12-11 - openai/gpt-5.2-2025-12-11 - gpt-5.4-2026-03-05 - openai/gpt-5.4-2026-03-05 - openai/gpt-5-1 - openai/gpt-5-2 - openai/gpt-5-4 input: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the user role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content description: An output message from the model. - type: object properties: id: type: string description: The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type description: The results of a web search tool call. - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type description: A tool call to run a function. - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type description: The output of a function tool call. - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type description: >- A description of the chain of thought used by a reasoning model while generating a response. - type: object properties: code: type: string description: The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - interpreting description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - code - id - outputs - status - type - container_id description: A tool call to run code. - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: type: object additionalProperties: nullable: true description: >- The JSON schema describing the tool's input. name: type: string description: The name of the tool. annotations: type: object nullable: true additionalProperties: nullable: true description: Additional annotations about the tool. description: type: string nullable: true description: The description of the tool. required: - input_schema - name description: The tools available on the server. type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type description: A list of tools available on an MCP server. - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type description: >- A request for human approval of a tool invocation. - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type description: A response to an MCP approval request. - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type description: An invocation of a tool on an MCP server. - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- Text, image, or file inputs to the model, used to generate a response. background: type: boolean default: false description: Whether to run the model response in the background. instructions: type: string nullable: true description: >- A system (or developer) message inserted into the model's context. When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. include: type: array nullable: true items: type: string enum: - message.input_image.image_url - computer_call_output.output.image_url - reasoning.encrypted_content - code_interpreter_call.outputs description: > Specify additional output data to include in the model response. Currently supported values are: - code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items. - computer_call_output.output.image_url: Include image urls from the computer call output. - file_search_call.results: Include the search results of the file search tool call. - message.output_text.logprobs: Include logprobs with assistant messages. - reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program). max_output_tokens: type: integer minimum: 16 description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. prompt: type: object nullable: true properties: id: type: string description: The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: anyOf: - type: string - oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. store: type: boolean nullable: true default: false description: >- Whether to store the generated model response for later retrieval via API. stream: type: boolean nullable: true 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. text: type: object properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. required: - format description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. truncation: type: string enum: - auto - disabled default: disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. tools: type: array items: anyOf: - type: object properties: name: type: string description: The name of the function to call. parameters: type: object additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: anyOf: - type: boolean - nullable: true - nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - parameters - type description: >- Defines a function in your own code the model can choose to call. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: >- The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11. 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 nullable: true properties: type: type: string enum: - approximate description: >- The type of location approximation. Always approximate. city: type: string nullable: true description: >- Free text input for the city of the user, e.g. San Francisco. country: type: string nullable: true description: >- The two-letter ISO country code of the user, e.g. US. region: type: string nullable: true description: >- Free text input for the region of the user, e.g. California. timezone: type: string nullable: true description: >- The IANA timezone of the user, e.g. America/Los_Angeles. required: - type description: The user's location required: - type description: >- This tool searches the web for relevant results to use in a response. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string enum: - code_interpreter description: >- The type of the code interpreter tool. Always code_interpreter. container: anyOf: - type: string - type: object properties: type: type: string enum: - auto required: - type description: The container ID. required: - type - container description: >- A tool that runs Python code to help generate a response to a prompt. - type: object properties: type: type: string minLength: 1 required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- How the model should select which tool (or tools) to use when generating a response. parallel_tool_calls: type: boolean nullable: true description: >- Whether to allow the model to run tool calls in parallel. reasoning: type: object nullable: true properties: effort: type: string nullable: true enum: - none - low - medium - high description: >- Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. summary: type: string nullable: true enum: - auto - concise - detailed description: >- A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. description: |- o-series models only Configuration options for reasoning models. temperature: type: number nullable: true minimum: 0 maximum: 2 description: >- What sampling temperature to use, between 0 and 2. 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. We generally recommend altering this or temperature but not both. required: - model - input title: >- gpt-5.1-2025-11-13, openai/gpt-5.1-2025-11-13, gpt-5.2-2025-12-11, openai/gpt-5.2-2025-12-11, gpt-5.4-2026-03-05, openai/gpt-5.4-2026-03-05, openai/gpt-5-1, openai/gpt-5-2, openai/gpt-5-4 - type: object properties: model: type: string enum: - gpt-5.1-codex - openai/gpt-5.1-codex - gpt-5.1-codex-mini - openai/gpt-5.1-codex-mini - gpt-5.2-codex - openai/gpt-5.2-codex - gpt-5.3-codex - openai/gpt-5.3-codex - openai/gpt-5-1-codex - openai/gpt-5-1-codex-mini - openai/gpt-5-2-codex - openai/gpt-5-3-codex input: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the user role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content description: An output message from the model. - type: object properties: id: type: string description: The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type description: The results of a web search tool call. - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type description: A tool call to run a function. - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type description: The output of a function tool call. - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type description: >- A description of the chain of thought used by a reasoning model while generating a response. - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type description: >- A tool call to run a command on the local shell. - type: object properties: id: type: string description: >- The unique ID of the local shell tool call generated by the model. output: type: string description: >- A JSON string of the output of the local shell tool call. type: type: string enum: - local_shell_call_output description: >- The type of the local shell tool call output. Always local_shell_call_output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - id - output - type description: The output of a local shell tool call. - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: type: object additionalProperties: nullable: true description: >- The JSON schema describing the tool's input. name: type: string description: The name of the tool. annotations: type: object nullable: true additionalProperties: nullable: true description: Additional annotations about the tool. description: type: string nullable: true description: The description of the tool. required: - input_schema - name description: The tools available on the server. type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type description: A list of tools available on an MCP server. - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type description: >- A request for human approval of a tool invocation. - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type description: A response to an MCP approval request. - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type description: An invocation of a tool on an MCP server. - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- Text, image, or file inputs to the model, used to generate a response. background: type: boolean default: false description: Whether to run the model response in the background. instructions: type: string nullable: true description: >- A system (or developer) message inserted into the model's context. When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. include: type: array nullable: true items: type: string enum: - message.input_image.image_url - computer_call_output.output.image_url - reasoning.encrypted_content - code_interpreter_call.outputs description: > Specify additional output data to include in the model response. Currently supported values are: - code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items. - computer_call_output.output.image_url: Include image urls from the computer call output. - file_search_call.results: Include the search results of the file search tool call. - message.output_text.logprobs: Include logprobs with assistant messages. - reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program). max_output_tokens: type: integer minimum: 16 description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. prompt: type: object nullable: true properties: id: type: string description: The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: anyOf: - type: string - oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. store: type: boolean nullable: true default: false description: >- Whether to store the generated model response for later retrieval via API. stream: type: boolean nullable: true 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. text: type: object properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. required: - format description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. truncation: type: string enum: - auto - disabled default: disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. tools: type: array items: anyOf: - type: object properties: name: type: string description: The name of the function to call. parameters: type: object additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: anyOf: - type: boolean - nullable: true - nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - parameters - type description: >- Defines a function in your own code the model can choose to call. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: >- The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11. 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 nullable: true properties: type: type: string enum: - approximate description: >- The type of location approximation. Always approximate. city: type: string nullable: true description: >- Free text input for the city of the user, e.g. San Francisco. country: type: string nullable: true description: >- The two-letter ISO country code of the user, e.g. US. region: type: string nullable: true description: >- Free text input for the region of the user, e.g. California. timezone: type: string nullable: true description: >- The IANA timezone of the user, e.g. America/Los_Angeles. required: - type description: The user's location required: - type description: >- This tool searches the web for relevant results to use in a response. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string enum: - local_shell description: >- The type of the local shell tool. Always local_shell. required: - type description: >- A tool that allows the model to execute shell commands in a local environment. - type: object properties: type: type: string minLength: 1 required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- How the model should select which tool (or tools) to use when generating a response. parallel_tool_calls: type: boolean nullable: true description: >- Whether to allow the model to run tool calls in parallel. reasoning: type: object nullable: true properties: effort: type: string nullable: true enum: - none - low - medium - high description: >- Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. summary: type: string nullable: true enum: - auto - concise - detailed description: >- A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. description: |- o-series models only Configuration options for reasoning models. required: - model - input title: >- gpt-5.1-codex, openai/gpt-5.1-codex, gpt-5.1-codex-mini, openai/gpt-5.1-codex-mini, gpt-5.2-codex, openai/gpt-5.2-codex, gpt-5.3-codex, openai/gpt-5.3-codex, openai/gpt-5-1-codex, openai/gpt-5-1-codex-mini, openai/gpt-5-2-codex, openai/gpt-5-3-codex - type: object properties: model: type: string enum: - gpt-5.2-chat-latest - openai/gpt-5.2-chat-latest - gpt-5.4-pro-2026-03-05 - openai/gpt-5.4-pro-2026-03-05 - gpt-5.5-pro-2026-04-23 - openai/gpt-5.5-pro-2026-04-23 - openai/gpt-5-2-chat-latest - openai/gpt-5-4-pro - openai/gpt-5-5-pro input: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the user role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content description: An output message from the model. - type: object properties: id: type: string description: The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type description: The results of a web search tool call. - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type description: A tool call to run a function. - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type description: The output of a function tool call. - type: object properties: code: type: string description: The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - interpreting description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - code - id - outputs - status - type - container_id description: A tool call to run code. - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: type: object additionalProperties: nullable: true description: >- The JSON schema describing the tool's input. name: type: string description: The name of the tool. annotations: type: object nullable: true additionalProperties: nullable: true description: Additional annotations about the tool. description: type: string nullable: true description: The description of the tool. required: - input_schema - name description: The tools available on the server. type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type description: A list of tools available on an MCP server. - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type description: >- A request for human approval of a tool invocation. - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type description: A response to an MCP approval request. - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type description: An invocation of a tool on an MCP server. - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- Text, image, or file inputs to the model, used to generate a response. background: type: boolean default: false description: Whether to run the model response in the background. instructions: type: string nullable: true description: >- A system (or developer) message inserted into the model's context. When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. include: type: array nullable: true items: type: string enum: - message.input_image.image_url - computer_call_output.output.image_url - reasoning.encrypted_content - code_interpreter_call.outputs description: > Specify additional output data to include in the model response. Currently supported values are: - code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items. - computer_call_output.output.image_url: Include image urls from the computer call output. - file_search_call.results: Include the search results of the file search tool call. - message.output_text.logprobs: Include logprobs with assistant messages. - reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program). max_output_tokens: type: integer minimum: 16 description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. prompt: type: object nullable: true properties: id: type: string description: The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: anyOf: - type: string - oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. store: type: boolean nullable: true default: false description: >- Whether to store the generated model response for later retrieval via API. stream: type: boolean nullable: true 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. text: type: object properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. required: - format description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. truncation: type: string enum: - auto - disabled default: disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. tools: type: array items: anyOf: - type: object properties: name: type: string description: The name of the function to call. parameters: type: object additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: anyOf: - type: boolean - nullable: true - nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - parameters - type description: >- Defines a function in your own code the model can choose to call. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: >- The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11. 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 nullable: true properties: type: type: string enum: - approximate description: >- The type of location approximation. Always approximate. city: type: string nullable: true description: >- Free text input for the city of the user, e.g. San Francisco. country: type: string nullable: true description: >- The two-letter ISO country code of the user, e.g. US. region: type: string nullable: true description: >- Free text input for the region of the user, e.g. California. timezone: type: string nullable: true description: >- The IANA timezone of the user, e.g. America/Los_Angeles. required: - type description: The user's location required: - type description: >- This tool searches the web for relevant results to use in a response. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string enum: - code_interpreter description: >- The type of the code interpreter tool. Always code_interpreter. container: anyOf: - type: string - type: object properties: type: type: string enum: - auto required: - type description: The container ID. required: - type - container description: >- A tool that runs Python code to help generate a response to a prompt. - type: object properties: type: type: string minLength: 1 required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- How the model should select which tool (or tools) to use when generating a response. parallel_tool_calls: type: boolean nullable: true description: >- Whether to allow the model to run tool calls in parallel. required: - model - input title: >- gpt-5.2-chat-latest, openai/gpt-5.2-chat-latest, gpt-5.4-pro-2026-03-05, openai/gpt-5.4-pro-2026-03-05, gpt-5.5-pro-2026-04-23, openai/gpt-5.5-pro-2026-04-23, openai/gpt-5-2-chat-latest, openai/gpt-5-4-pro, openai/gpt-5-5-pro - type: object properties: model: type: string enum: - o3-pro - openai/o3-pro input: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the user role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content description: An output message from the model. - type: object properties: id: type: string description: The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type description: The results of a web search tool call. - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type description: A tool call to run a function. - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type description: The output of a function tool call. - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type description: >- A description of the chain of thought used by a reasoning model while generating a response. - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: type: object additionalProperties: nullable: true description: >- The JSON schema describing the tool's input. name: type: string description: The name of the tool. annotations: type: object nullable: true additionalProperties: nullable: true description: Additional annotations about the tool. description: type: string nullable: true description: The description of the tool. required: - input_schema - name description: The tools available on the server. type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type description: A list of tools available on an MCP server. - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type description: >- A request for human approval of a tool invocation. - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type description: A response to an MCP approval request. - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type description: An invocation of a tool on an MCP server. - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- Text, image, or file inputs to the model, used to generate a response. background: type: boolean default: false description: Whether to run the model response in the background. instructions: type: string nullable: true description: >- A system (or developer) message inserted into the model's context. When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. include: type: array nullable: true items: type: string enum: - message.input_image.image_url - computer_call_output.output.image_url - reasoning.encrypted_content - code_interpreter_call.outputs description: > Specify additional output data to include in the model response. Currently supported values are: - code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items. - computer_call_output.output.image_url: Include image urls from the computer call output. - file_search_call.results: Include the search results of the file search tool call. - message.output_text.logprobs: Include logprobs with assistant messages. - reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program). max_output_tokens: type: integer minimum: 16 description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. prompt: type: object nullable: true properties: id: type: string description: The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: anyOf: - type: string - oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. store: type: boolean nullable: true default: false description: >- Whether to store the generated model response for later retrieval via API. stream: type: boolean nullable: true 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. text: type: object properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. required: - format description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. truncation: type: string enum: - auto - disabled default: disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. tools: type: array items: anyOf: - type: object properties: name: type: string description: The name of the function to call. parameters: type: object additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: anyOf: - type: boolean - nullable: true - nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - parameters - type description: >- Defines a function in your own code the model can choose to call. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: >- The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11. 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 nullable: true properties: type: type: string enum: - approximate description: >- The type of location approximation. Always approximate. city: type: string nullable: true description: >- Free text input for the city of the user, e.g. San Francisco. country: type: string nullable: true description: >- The two-letter ISO country code of the user, e.g. US. region: type: string nullable: true description: >- Free text input for the region of the user, e.g. California. timezone: type: string nullable: true description: >- The IANA timezone of the user, e.g. America/Los_Angeles. required: - type description: The user's location required: - type description: >- This tool searches the web for relevant results to use in a response. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string minLength: 1 required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- How the model should select which tool (or tools) to use when generating a response. reasoning: type: object nullable: true properties: effort: type: string nullable: true enum: - none - low - medium - high description: >- Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. summary: type: string nullable: true enum: - auto - concise - detailed description: >- A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. description: |- o-series models only Configuration options for reasoning models. parallel_tool_calls: type: boolean nullable: true description: >- Whether to allow the model to run tool calls in parallel. required: - model - input title: o3-pro, openai/o3-pro - type: object properties: model: type: string enum: - test/dummy-responses input: type: string minLength: 1 instructions: type: string max_output_tokens: type: integer minimum: 1 stream: type: boolean enum: - false test: type: object properties: delay: type: number runningPolls: type: number tokens: type: number errorStatus: type: number submitErrorStatus: type: number required: - model - input title: test/dummy-responses - type: object properties: model: type: string enum: - x-ai/grok-4-3 - grok-4-3 input: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the user role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. description: >- A list of one or many input items to the model, containing different content types. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content description: An output message from the model. - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type description: >- A description of the chain of thought used by a reasoning model while generating a response. - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- Text, image, or file inputs to the model, used to generate a response. background: type: boolean default: false description: Whether to run the model response in the background. instructions: type: string nullable: true description: >- A system (or developer) message inserted into the model's context. When using along with previous_response_id, the instructions from a previous response will not be carried over to the next response. This makes it simple to swap out system (or developer) messages in new responses. include: type: array nullable: true items: type: string enum: - message.input_image.image_url - computer_call_output.output.image_url - reasoning.encrypted_content - code_interpreter_call.outputs description: > Specify additional output data to include in the model response. Currently supported values are: - code_interpreter_call.outputs: Includes the outputs of python code execution in code interpreter tool call items. - computer_call_output.output.image_url: Include image urls from the computer call output. - file_search_call.results: Include the search results of the file search tool call. - message.output_text.logprobs: Include logprobs with assistant messages. - reasoning.encrypted_content: Includes an encrypted version of reasoning tokens in reasoning item outputs. This enables reasoning items to be used in multi-turn conversations when using the Responses API statelessly (like when the store parameter is set to false, or when an organization is enrolled in the zero data retention program). max_output_tokens: type: integer minimum: 16 description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. prompt: type: object nullable: true properties: id: type: string description: The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: anyOf: - type: string - oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. store: type: boolean nullable: true default: false description: >- Whether to store the generated model response for later retrieval via API. stream: type: boolean nullable: true 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. text: type: object properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. required: - format description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. truncation: type: string enum: - auto - disabled default: disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. tools: type: array items: anyOf: - type: object properties: type: type: string enum: - web_search filters: type: object properties: allowed_domains: type: array items: type: string minLength: 1 description: >- Restrict results to these domains. Mutually exclusive with excluded_domains (enforced by xAI). excluded_domains: type: array items: type: string minLength: 1 description: Exclude results from these domains. description: >- Domain include/exclude filters for the web search. enable_image_understanding: type: boolean description: >- Let Grok analyze images found on matching pages. enable_image_search: type: boolean description: Include image search results. required: - type description: >- xAI Agent Tools web_search. Documented here; validated by xAI (passthrough). - type: object properties: type: type: string enum: - x_search allowed_x_handles: type: array items: type: string minLength: 1 description: >- Restrict the search to posts from these X handles. Mutually exclusive with excluded_x_handles (enforced by xAI). excluded_x_handles: type: array items: type: string minLength: 1 description: Exclude posts from these X handles. from_date: type: string pattern: ^\d{4}-\d{2}-\d{2}$ description: >- Earliest post date to consider, ISO8601 (YYYY-MM-DD). to_date: type: string pattern: ^\d{4}-\d{2}-\d{2}$ description: >- Latest post date to consider, ISO8601 (YYYY-MM-DD). enable_image_understanding: type: boolean description: >- Let Grok analyze images attached to matching posts. enable_video_understanding: type: boolean description: >- Let Grok analyze videos attached to matching posts. required: - type description: >- xAI Agent Tools x_search — real-time X (Twitter) search. Documented here; validated by xAI (passthrough). - type: object properties: type: type: string minLength: 1 required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- How the model should select which tool (or tools) to use when generating a response. parallel_tool_calls: type: boolean nullable: true description: >- Whether to allow the model to run tool calls in parallel. reasoning: type: object nullable: true properties: effort: type: string nullable: true enum: - none - low - medium - high description: >- Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. summary: type: string nullable: true enum: - auto - concise - detailed description: >- A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. description: |- o-series models only Configuration options for reasoning models. required: - model - input title: x-ai/grok-4-3, grok-4-3 responses: '200': content: application/json: schema: type: object properties: background: type: boolean nullable: true description: Whether to run the model response in the background. example: false created_at: type: number description: >- Unix timestamp (in seconds) of when this Response was created. example: 1762343744 error: type: object nullable: true properties: code: type: string description: The error code for the response. message: type: string description: A human-readable description of the error. required: - code - message description: >- An error object returned when the model fails to generate a Response. example: null id: type: string description: Unique identifier for this Response. example: resp_68963fb142d08197b4d3ae3ad852542c054845c6ea84caa2 incomplete_details: type: object nullable: true properties: reason: type: string description: The reason why the response is incomplete. description: Details about why the response is incomplete. example: null instructions: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the developer role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: >- The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: >- The unique ID of the local shell tool call generated by the model. output: type: string description: >- A JSON string of the output of the local shell tool call. type: type: string enum: - local_shell_call_output description: >- The type of the local shell tool call output. Always local_shell_call_output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - id - output - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: An internal identifier for an item to reference. description: >- A list of one or many input items to the model, containing different content types. - nullable: true description: >- A system (or developer) message inserted into the model's context. example: null max_output_tokens: type: integer nullable: true description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. example: null metadata: type: object nullable: true additionalProperties: nullable: true description: >- Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. example: {} model: type: string description: Model ID used to generate the response. example: gpt-5-chat-latest object: type: string enum: - response description: The object type of this resource - always set to response. example: response output: type: array nullable: true items: oneOf: - type: object properties: role: type: string enum: - assistant description: >- The role of the output message. Always assistant. type: type: string enum: - message description: The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - role - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: id: type: string description: The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: The code to run, or null if not available. id: type: string description: The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: type: type: string enum: - x_search_call required: - type description: > An array of content items generated by the model. - The length and order of items in the output array is dependent on the model's response. - Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs. example: null output_text: type: string nullable: true description: >- SDK-only convenience property that contains the aggregated text output from all output_text items in the output array, if any are present. Supported in the Python and JavaScript SDKs. example: Hi! How’s your day going? parallel_tool_calls: type: boolean description: Whether to allow the model to run tool calls in parallel. example: false previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. example: null prompt: type: object nullable: true properties: id: type: string description: The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: nullable: true description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. example: null reasoning: type: object nullable: true properties: effort: type: string nullable: true enum: - none - low - medium - high description: >- Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. summary: type: string nullable: true enum: - auto - concise - detailed description: >- A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. description: Configuration options for reasoning models. example: null service_tier: type: string nullable: true description: >- Specifies the processing type used for serving the request. example: null status: type: string enum: - completed - failed - in_progress - cancelled - queued - incomplete description: The status of the response generation. example: completed temperature: type: number nullable: true minimum: 0 maximum: 2 description: >- What sampling temperature to use, between 0 and 2. 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. example: null text: type: object nullable: true properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp - file_search - image_generation required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: For function calling, the type is always function. required: - name - type description: >- Use this option to force the model to call a specific function. - nullable: true description: >- How the model should select which tool (or tools) to use when generating a response. example: null tools: type: array nullable: true items: oneOf: - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: >- The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11. 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 nullable: true properties: type: type: string enum: - approximate description: >- The type of location approximation. Always approximate. city: type: string nullable: true description: >- Free text input for the city of the user, e.g. San Francisco. country: type: string nullable: true description: >- The two-letter ISO country code of the user, e.g. US. region: type: string nullable: true description: >- Free text input for the region of the user, e.g. California. timezone: type: string nullable: true description: >- The IANA timezone of the user, e.g. America/Los_Angeles. required: - type description: The user's location required: - type description: >- This tool searches the web for relevant results to use in a response. - type: object properties: display_height: type: integer description: The height of the computer display. display_width: type: integer description: The width of the computer display. environment: type: string enum: - windows - mac - linux - ubuntu - browser description: The type of computer environment to control. type: type: string enum: - computer_use_preview description: >- The type of the computer use tool. Always computer_use_preview. required: - display_height - display_width - environment - type description: A tool that controls a virtual computer. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string enum: - code_interpreter description: >- The type of the code interpreter tool. Always code_interpreter. container: anyOf: - type: string - type: object properties: type: type: string enum: - auto required: - type description: The container ID. required: - type - container description: >- A tool that runs Python code to help generate a response to a prompt. - type: object properties: type: type: string enum: - local_shell description: >- The type of the local shell tool. Always local_shell. required: - type description: >- A tool that allows the model to execute shell commands in a local environment. - type: object properties: name: type: string description: The name of the function to call. parameters: type: object nullable: true additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: type: boolean nullable: true description: Whether to enforce strict parameter validation. type: type: string enum: - function description: The type of the function tool. Always function. description: type: string nullable: true description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - type - type: object properties: type: type: string enum: - image_generation background: type: string enum: - transparent - opaque - auto input_image_mask: type: object properties: file_id: type: string image_url: type: string model: type: string enum: - gpt-image-1 moderation: type: string enum: - auto - low output_compression: type: number output_format: type: string enum: - png - webp - jpeg partial_images: type: integer minimum: 0 maximum: 3 quality: type: string enum: - low - medium - high - auto size: type: string enum: - 1024x1024 - 1024x1536 - 1536x1024 - auto required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. example: null top_p: type: number nullable: true 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. We generally recommend altering this or temperature but not both. example: null truncation: type: string nullable: true enum: - auto - disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. example: null usage: type: object properties: input_tokens: type: integer description: The number of input tokens. example: 137 input_tokens_details: type: object nullable: true properties: cached_tokens: type: integer description: >- The number of tokens that were retrieved from the cache. required: - cached_tokens description: A detailed breakdown of the input tokens. example: null output_tokens: type: integer description: The number of output tokens. example: 914 output_tokens_details: type: object nullable: true properties: reasoning_tokens: type: integer description: The number of reasoning tokens. required: - reasoning_tokens description: A detailed breakdown of the output tokens. example: null total_tokens: type: integer description: The total number of tokens used. example: 1051 required: - input_tokens - output_tokens - total_tokens description: >- Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. citations: type: array items: type: string format: uri server_side_tool_usage: type: object additionalProperties: type: integer minimum: 0 meta: type: object nullable: true properties: usage: type: object nullable: true 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: - created_at - id - model - object - parallel_tool_calls text/event-stream: schema: oneOf: - type: object properties: delta: type: string description: The text delta that was added. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.audio.delta description: The type of the event. required: - delta - sequence_number - type - type: object properties: sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.audio.done description: The type of the event. required: - sequence_number - type - type: object properties: delta: type: string description: The text delta that was added. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.audio.transcript.delta description: The type of the event. required: - delta - sequence_number - type - type: object properties: sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.audio.transcript.done description: The type of the event. required: - sequence_number - type - type: object properties: delta: type: string description: >- The partial code snippet being streamed by the code interpreter. item_id: type: string description: >- The unique identifier of the code interpreter tool call item. output_index: type: number sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.code_interpreter_call_code.delta description: The type of the event. required: - delta - item_id - output_index - sequence_number - type - type: object properties: code: type: string description: The final code snippet output by the code interpreter. item_id: type: string description: >- The unique identifier of the code interpreter tool call item. output_index: type: number description: >- The index of the output item in the response for which the code is finalized. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.code_interpreter_call_code.done description: The type of the event. required: - code - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: >- The unique identifier of the code interpreter tool call item. output_index: type: number description: >- The index of the output item in the response for which the code interpreter call is completed. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.code_interpreter_call.completed description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: >- The unique identifier of the code interpreter tool call item. output_index: type: number description: >- The index of the output item in the response for which the code interpreter call is in progress. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.code_interpreter_call.in_progress description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: >- The unique identifier of the code interpreter tool call item. output_index: type: number description: >- The index of the output item in the response for which the code interpreter is interpreting code. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.code_interpreter_call.interpreting description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: response: type: object properties: background: type: boolean nullable: true description: >- Whether to run the model response in the background. example: false created_at: type: number description: >- Unix timestamp (in seconds) of when this Response was created. example: 1762343744 error: type: object nullable: true properties: code: type: string description: The error code for the response. message: type: string description: A human-readable description of the error. required: - code - message description: >- An error object returned when the model fails to generate a Response. example: null id: type: string description: Unique identifier for this Response. example: >- resp_68963fb142d08197b4d3ae3ad852542c054845c6ea84caa2 incomplete_details: type: object nullable: true properties: reason: type: string description: The reason why the response is incomplete. description: Details about why the response is incomplete. example: null instructions: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the developer role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: >- The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: >- The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: >- The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: >- The unique ID of the local shell tool call generated by the model. output: type: string description: >- A JSON string of the output of the local shell tool call. type: type: string enum: - local_shell_call_output description: >- The type of the local shell tool call output. Always local_shell_call_output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - id - output - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- A list of one or many input items to the model, containing different content types. - nullable: true description: >- A system (or developer) message inserted into the model's context. example: null max_output_tokens: type: integer nullable: true description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. example: null metadata: type: object nullable: true additionalProperties: nullable: true description: >- Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. example: {} model: type: string description: Model ID used to generate the response. example: gpt-5-chat-latest object: type: string enum: - response description: >- The object type of this resource - always set to response. example: response output: type: array nullable: true items: oneOf: - type: object properties: role: type: string enum: - assistant description: >- The role of the output message. Always assistant. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - role - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: >- The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: >- The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: >- The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: type: type: string enum: - x_search_call required: - type description: > An array of content items generated by the model. - The length and order of items in the output array is dependent on the model's response. - Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs. example: null output_text: type: string nullable: true description: >- SDK-only convenience property that contains the aggregated text output from all output_text items in the output array, if any are present. Supported in the Python and JavaScript SDKs. example: Hi! How’s your day going? parallel_tool_calls: type: boolean description: >- Whether to allow the model to run tool calls in parallel. example: false previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. example: null prompt: type: object nullable: true properties: id: type: string description: >- The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: nullable: true description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. example: null reasoning: type: object nullable: true properties: effort: type: string nullable: true enum: - none - low - medium - high description: >- Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. summary: type: string nullable: true enum: - auto - concise - detailed description: >- A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. description: Configuration options for reasoning models. example: null service_tier: type: string nullable: true description: >- Specifies the processing type used for serving the request. example: null status: type: string enum: - completed - failed - in_progress - cancelled - queued - incomplete description: The status of the response generation. example: completed temperature: type: number nullable: true minimum: 0 maximum: 2 description: >- What sampling temperature to use, between 0 and 2. 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. example: null text: type: object nullable: true properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp - file_search - image_generation required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- Use this option to force the model to call a specific function. - nullable: true description: >- How the model should select which tool (or tools) to use when generating a response. example: null tools: type: array nullable: true items: oneOf: - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: >- The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11. 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 nullable: true properties: type: type: string enum: - approximate description: >- The type of location approximation. Always approximate. city: type: string nullable: true description: >- Free text input for the city of the user, e.g. San Francisco. country: type: string nullable: true description: >- The two-letter ISO country code of the user, e.g. US. region: type: string nullable: true description: >- Free text input for the region of the user, e.g. California. timezone: type: string nullable: true description: >- The IANA timezone of the user, e.g. America/Los_Angeles. required: - type description: The user's location required: - type description: >- This tool searches the web for relevant results to use in a response. - type: object properties: display_height: type: integer description: The height of the computer display. display_width: type: integer description: The width of the computer display. environment: type: string enum: - windows - mac - linux - ubuntu - browser description: >- The type of computer environment to control. type: type: string enum: - computer_use_preview description: >- The type of the computer use tool. Always computer_use_preview. required: - display_height - display_width - environment - type description: A tool that controls a virtual computer. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: >- List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string enum: - code_interpreter description: >- The type of the code interpreter tool. Always code_interpreter. container: anyOf: - type: string - type: object properties: type: type: string enum: - auto required: - type description: The container ID. required: - type - container description: >- A tool that runs Python code to help generate a response to a prompt. - type: object properties: type: type: string enum: - local_shell description: >- The type of the local shell tool. Always local_shell. required: - type description: >- A tool that allows the model to execute shell commands in a local environment. - type: object properties: name: type: string description: The name of the function to call. parameters: type: object nullable: true additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: type: boolean nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string nullable: true description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - type - type: object properties: type: type: string enum: - image_generation background: type: string enum: - transparent - opaque - auto input_image_mask: type: object properties: file_id: type: string image_url: type: string model: type: string enum: - gpt-image-1 moderation: type: string enum: - auto - low output_compression: type: number output_format: type: string enum: - png - webp - jpeg partial_images: type: integer minimum: 0 maximum: 3 quality: type: string enum: - low - medium - high - auto size: type: string enum: - 1024x1024 - 1024x1536 - 1536x1024 - auto required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. example: null top_p: type: number nullable: true 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. We generally recommend altering this or temperature but not both. example: null truncation: type: string nullable: true enum: - auto - disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. example: null usage: type: object properties: input_tokens: type: integer description: The number of input tokens. example: 137 input_tokens_details: type: object nullable: true properties: cached_tokens: type: integer description: >- The number of tokens that were retrieved from the cache. required: - cached_tokens description: A detailed breakdown of the input tokens. example: null output_tokens: type: integer description: The number of output tokens. example: 914 output_tokens_details: type: object nullable: true properties: reasoning_tokens: type: integer description: The number of reasoning tokens. required: - reasoning_tokens description: A detailed breakdown of the output tokens. example: null total_tokens: type: integer description: The total number of tokens used. example: 1051 required: - input_tokens - output_tokens - total_tokens description: >- Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. citations: type: array items: type: string format: uri server_side_tool_usage: type: object additionalProperties: type: integer minimum: 0 meta: type: object nullable: true properties: usage: type: object nullable: true 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: - created_at - id - model - object - parallel_tool_calls description: Properties of the completed response. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.completed description: The type of the event. required: - response - sequence_number - type - type: object properties: code: type: string description: The error code for the response. message: type: string description: A human-readable description of the error. param: type: string description: The error parameter. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - error description: The type of the event. required: - code - message - param - sequence_number - type - type: object properties: item_id: type: string description: >- The ID of the output item that the file search call is initiated. output_index: type: number description: >- The index of the output item that the file search call is initiated. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.file_search_call.completed description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: >- The ID of the output item that the file search call is initiated. output_index: type: number description: >- The index of the output item that the file search call is initiated. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.file_search_call.in_progress description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: >- The ID of the output item that the file search call is initiated. output_index: type: number description: >- The index of the output item that the file search call is searching. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.file_search_call.searching description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: delta: type: string description: The function-call arguments delta that is added. item_id: type: string description: >- The ID of the output item that the function-call arguments delta is added to. output_index: type: number description: >- The index of the output item that the function-call arguments delta is added to. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.function_call_arguments.delta description: The type of the event. required: - delta - item_id - output_index - sequence_number - type - type: object properties: arguments: type: string description: The function-call arguments. item_id: type: string description: The ID of the item. output_index: type: number sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.function_call_arguments.done description: The type of the event. required: - arguments - item_id - output_index - sequence_number - type - type: object properties: response: type: object properties: background: type: boolean nullable: true description: >- Whether to run the model response in the background. example: false created_at: type: number description: >- Unix timestamp (in seconds) of when this Response was created. example: 1762343744 error: type: object nullable: true properties: code: type: string description: The error code for the response. message: type: string description: A human-readable description of the error. required: - code - message description: >- An error object returned when the model fails to generate a Response. example: null id: type: string description: Unique identifier for this Response. example: >- resp_68963fb142d08197b4d3ae3ad852542c054845c6ea84caa2 incomplete_details: type: object nullable: true properties: reason: type: string description: The reason why the response is incomplete. description: Details about why the response is incomplete. example: null instructions: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the developer role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: >- The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: >- The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: >- The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: >- The unique ID of the local shell tool call generated by the model. output: type: string description: >- A JSON string of the output of the local shell tool call. type: type: string enum: - local_shell_call_output description: >- The type of the local shell tool call output. Always local_shell_call_output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - id - output - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- A list of one or many input items to the model, containing different content types. - nullable: true description: >- A system (or developer) message inserted into the model's context. example: null max_output_tokens: type: integer nullable: true description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. example: null metadata: type: object nullable: true additionalProperties: nullable: true description: >- Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. example: {} model: type: string description: Model ID used to generate the response. example: gpt-5-chat-latest object: type: string enum: - response description: >- The object type of this resource - always set to response. example: response output: type: array nullable: true items: oneOf: - type: object properties: role: type: string enum: - assistant description: >- The role of the output message. Always assistant. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - role - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: >- The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: >- The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: >- The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: type: type: string enum: - x_search_call required: - type description: > An array of content items generated by the model. - The length and order of items in the output array is dependent on the model's response. - Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs. example: null output_text: type: string nullable: true description: >- SDK-only convenience property that contains the aggregated text output from all output_text items in the output array, if any are present. Supported in the Python and JavaScript SDKs. example: Hi! How’s your day going? parallel_tool_calls: type: boolean description: >- Whether to allow the model to run tool calls in parallel. example: false previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. example: null prompt: type: object nullable: true properties: id: type: string description: >- The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: nullable: true description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. example: null reasoning: type: object nullable: true properties: effort: type: string nullable: true enum: - none - low - medium - high description: >- Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. summary: type: string nullable: true enum: - auto - concise - detailed description: >- A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. description: Configuration options for reasoning models. example: null service_tier: type: string nullable: true description: >- Specifies the processing type used for serving the request. example: null status: type: string enum: - completed - failed - in_progress - cancelled - queued - incomplete description: The status of the response generation. example: completed temperature: type: number nullable: true minimum: 0 maximum: 2 description: >- What sampling temperature to use, between 0 and 2. 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. example: null text: type: object nullable: true properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp - file_search - image_generation required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- Use this option to force the model to call a specific function. - nullable: true description: >- How the model should select which tool (or tools) to use when generating a response. example: null tools: type: array nullable: true items: oneOf: - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: >- The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11. 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 nullable: true properties: type: type: string enum: - approximate description: >- The type of location approximation. Always approximate. city: type: string nullable: true description: >- Free text input for the city of the user, e.g. San Francisco. country: type: string nullable: true description: >- The two-letter ISO country code of the user, e.g. US. region: type: string nullable: true description: >- Free text input for the region of the user, e.g. California. timezone: type: string nullable: true description: >- The IANA timezone of the user, e.g. America/Los_Angeles. required: - type description: The user's location required: - type description: >- This tool searches the web for relevant results to use in a response. - type: object properties: display_height: type: integer description: The height of the computer display. display_width: type: integer description: The width of the computer display. environment: type: string enum: - windows - mac - linux - ubuntu - browser description: >- The type of computer environment to control. type: type: string enum: - computer_use_preview description: >- The type of the computer use tool. Always computer_use_preview. required: - display_height - display_width - environment - type description: A tool that controls a virtual computer. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: >- List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string enum: - code_interpreter description: >- The type of the code interpreter tool. Always code_interpreter. container: anyOf: - type: string - type: object properties: type: type: string enum: - auto required: - type description: The container ID. required: - type - container description: >- A tool that runs Python code to help generate a response to a prompt. - type: object properties: type: type: string enum: - local_shell description: >- The type of the local shell tool. Always local_shell. required: - type description: >- A tool that allows the model to execute shell commands in a local environment. - type: object properties: name: type: string description: The name of the function to call. parameters: type: object nullable: true additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: type: boolean nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string nullable: true description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - type - type: object properties: type: type: string enum: - image_generation background: type: string enum: - transparent - opaque - auto input_image_mask: type: object properties: file_id: type: string image_url: type: string model: type: string enum: - gpt-image-1 moderation: type: string enum: - auto - low output_compression: type: number output_format: type: string enum: - png - webp - jpeg partial_images: type: integer minimum: 0 maximum: 3 quality: type: string enum: - low - medium - high - auto size: type: string enum: - 1024x1024 - 1024x1536 - 1536x1024 - auto required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. example: null top_p: type: number nullable: true 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. We generally recommend altering this or temperature but not both. example: null truncation: type: string nullable: true enum: - auto - disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. example: null usage: type: object properties: input_tokens: type: integer description: The number of input tokens. example: 137 input_tokens_details: type: object nullable: true properties: cached_tokens: type: integer description: >- The number of tokens that were retrieved from the cache. required: - cached_tokens description: A detailed breakdown of the input tokens. example: null output_tokens: type: integer description: The number of output tokens. example: 914 output_tokens_details: type: object nullable: true properties: reasoning_tokens: type: integer description: The number of reasoning tokens. required: - reasoning_tokens description: A detailed breakdown of the output tokens. example: null total_tokens: type: integer description: The total number of tokens used. example: 1051 required: - input_tokens - output_tokens - total_tokens description: >- Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. citations: type: array items: type: string format: uri server_side_tool_usage: type: object additionalProperties: type: integer minimum: 0 meta: type: object nullable: true properties: usage: type: object nullable: true 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: - created_at - id - model - object - parallel_tool_calls description: The response that in progress. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.in_progress description: The type of the event. required: - response - sequence_number - type - type: object properties: response: type: object properties: background: type: boolean nullable: true description: >- Whether to run the model response in the background. example: false created_at: type: number description: >- Unix timestamp (in seconds) of when this Response was created. example: 1762343744 error: type: object nullable: true properties: code: type: string description: The error code for the response. message: type: string description: A human-readable description of the error. required: - code - message description: >- An error object returned when the model fails to generate a Response. example: null id: type: string description: Unique identifier for this Response. example: >- resp_68963fb142d08197b4d3ae3ad852542c054845c6ea84caa2 incomplete_details: type: object nullable: true properties: reason: type: string description: The reason why the response is incomplete. description: Details about why the response is incomplete. example: null instructions: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the developer role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: >- The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: >- The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: >- The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: >- The unique ID of the local shell tool call generated by the model. output: type: string description: >- A JSON string of the output of the local shell tool call. type: type: string enum: - local_shell_call_output description: >- The type of the local shell tool call output. Always local_shell_call_output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - id - output - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- A list of one or many input items to the model, containing different content types. - nullable: true description: >- A system (or developer) message inserted into the model's context. example: null max_output_tokens: type: integer nullable: true description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. example: null metadata: type: object nullable: true additionalProperties: nullable: true description: >- Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. example: {} model: type: string description: Model ID used to generate the response. example: gpt-5-chat-latest object: type: string enum: - response description: >- The object type of this resource - always set to response. example: response output: type: array nullable: true items: oneOf: - type: object properties: role: type: string enum: - assistant description: >- The role of the output message. Always assistant. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - role - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: >- The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: >- The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: >- The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: type: type: string enum: - x_search_call required: - type description: > An array of content items generated by the model. - The length and order of items in the output array is dependent on the model's response. - Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs. example: null output_text: type: string nullable: true description: >- SDK-only convenience property that contains the aggregated text output from all output_text items in the output array, if any are present. Supported in the Python and JavaScript SDKs. example: Hi! How’s your day going? parallel_tool_calls: type: boolean description: >- Whether to allow the model to run tool calls in parallel. example: false previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. example: null prompt: type: object nullable: true properties: id: type: string description: >- The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: nullable: true description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. example: null reasoning: type: object nullable: true properties: effort: type: string nullable: true enum: - none - low - medium - high description: >- Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. summary: type: string nullable: true enum: - auto - concise - detailed description: >- A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. description: Configuration options for reasoning models. example: null service_tier: type: string nullable: true description: >- Specifies the processing type used for serving the request. example: null status: type: string enum: - completed - failed - in_progress - cancelled - queued - incomplete description: The status of the response generation. example: completed temperature: type: number nullable: true minimum: 0 maximum: 2 description: >- What sampling temperature to use, between 0 and 2. 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. example: null text: type: object nullable: true properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp - file_search - image_generation required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- Use this option to force the model to call a specific function. - nullable: true description: >- How the model should select which tool (or tools) to use when generating a response. example: null tools: type: array nullable: true items: oneOf: - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: >- The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11. 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 nullable: true properties: type: type: string enum: - approximate description: >- The type of location approximation. Always approximate. city: type: string nullable: true description: >- Free text input for the city of the user, e.g. San Francisco. country: type: string nullable: true description: >- The two-letter ISO country code of the user, e.g. US. region: type: string nullable: true description: >- Free text input for the region of the user, e.g. California. timezone: type: string nullable: true description: >- The IANA timezone of the user, e.g. America/Los_Angeles. required: - type description: The user's location required: - type description: >- This tool searches the web for relevant results to use in a response. - type: object properties: display_height: type: integer description: The height of the computer display. display_width: type: integer description: The width of the computer display. environment: type: string enum: - windows - mac - linux - ubuntu - browser description: >- The type of computer environment to control. type: type: string enum: - computer_use_preview description: >- The type of the computer use tool. Always computer_use_preview. required: - display_height - display_width - environment - type description: A tool that controls a virtual computer. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: >- List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string enum: - code_interpreter description: >- The type of the code interpreter tool. Always code_interpreter. container: anyOf: - type: string - type: object properties: type: type: string enum: - auto required: - type description: The container ID. required: - type - container description: >- A tool that runs Python code to help generate a response to a prompt. - type: object properties: type: type: string enum: - local_shell description: >- The type of the local shell tool. Always local_shell. required: - type description: >- A tool that allows the model to execute shell commands in a local environment. - type: object properties: name: type: string description: The name of the function to call. parameters: type: object nullable: true additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: type: boolean nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string nullable: true description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - type - type: object properties: type: type: string enum: - image_generation background: type: string enum: - transparent - opaque - auto input_image_mask: type: object properties: file_id: type: string image_url: type: string model: type: string enum: - gpt-image-1 moderation: type: string enum: - auto - low output_compression: type: number output_format: type: string enum: - png - webp - jpeg partial_images: type: integer minimum: 0 maximum: 3 quality: type: string enum: - low - medium - high - auto size: type: string enum: - 1024x1024 - 1024x1536 - 1536x1024 - auto required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. example: null top_p: type: number nullable: true 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. We generally recommend altering this or temperature but not both. example: null truncation: type: string nullable: true enum: - auto - disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. example: null usage: type: object properties: input_tokens: type: integer description: The number of input tokens. example: 137 input_tokens_details: type: object nullable: true properties: cached_tokens: type: integer description: >- The number of tokens that were retrieved from the cache. required: - cached_tokens description: A detailed breakdown of the input tokens. example: null output_tokens: type: integer description: The number of output tokens. example: 914 output_tokens_details: type: object nullable: true properties: reasoning_tokens: type: integer description: The number of reasoning tokens. required: - reasoning_tokens description: A detailed breakdown of the output tokens. example: null total_tokens: type: integer description: The total number of tokens used. example: 1051 required: - input_tokens - output_tokens - total_tokens description: >- Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. citations: type: array items: type: string format: uri server_side_tool_usage: type: object additionalProperties: type: integer minimum: 0 meta: type: object nullable: true properties: usage: type: object nullable: true 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: - created_at - id - model - object - parallel_tool_calls description: The response that failed. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.failed description: The type of the event. required: - response - sequence_number - type - type: object properties: response: type: object properties: background: type: boolean nullable: true description: >- Whether to run the model response in the background. example: false created_at: type: number description: >- Unix timestamp (in seconds) of when this Response was created. example: 1762343744 error: type: object nullable: true properties: code: type: string description: The error code for the response. message: type: string description: A human-readable description of the error. required: - code - message description: >- An error object returned when the model fails to generate a Response. example: null id: type: string description: Unique identifier for this Response. example: >- resp_68963fb142d08197b4d3ae3ad852542c054845c6ea84caa2 incomplete_details: type: object nullable: true properties: reason: type: string description: The reason why the response is incomplete. description: Details about why the response is incomplete. example: null instructions: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the developer role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: >- The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: >- The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: >- The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: >- The unique ID of the local shell tool call generated by the model. output: type: string description: >- A JSON string of the output of the local shell tool call. type: type: string enum: - local_shell_call_output description: >- The type of the local shell tool call output. Always local_shell_call_output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - id - output - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- A list of one or many input items to the model, containing different content types. - nullable: true description: >- A system (or developer) message inserted into the model's context. example: null max_output_tokens: type: integer nullable: true description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. example: null metadata: type: object nullable: true additionalProperties: nullable: true description: >- Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. example: {} model: type: string description: Model ID used to generate the response. example: gpt-5-chat-latest object: type: string enum: - response description: >- The object type of this resource - always set to response. example: response output: type: array nullable: true items: oneOf: - type: object properties: role: type: string enum: - assistant description: >- The role of the output message. Always assistant. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - role - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: >- The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: >- The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: >- The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: type: type: string enum: - x_search_call required: - type description: > An array of content items generated by the model. - The length and order of items in the output array is dependent on the model's response. - Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs. example: null output_text: type: string nullable: true description: >- SDK-only convenience property that contains the aggregated text output from all output_text items in the output array, if any are present. Supported in the Python and JavaScript SDKs. example: Hi! How’s your day going? parallel_tool_calls: type: boolean description: >- Whether to allow the model to run tool calls in parallel. example: false previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. example: null prompt: type: object nullable: true properties: id: type: string description: >- The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: nullable: true description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. example: null reasoning: type: object nullable: true properties: effort: type: string nullable: true enum: - none - low - medium - high description: >- Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. summary: type: string nullable: true enum: - auto - concise - detailed description: >- A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. description: Configuration options for reasoning models. example: null service_tier: type: string nullable: true description: >- Specifies the processing type used for serving the request. example: null status: type: string enum: - completed - failed - in_progress - cancelled - queued - incomplete description: The status of the response generation. example: completed temperature: type: number nullable: true minimum: 0 maximum: 2 description: >- What sampling temperature to use, between 0 and 2. 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. example: null text: type: object nullable: true properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp - file_search - image_generation required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- Use this option to force the model to call a specific function. - nullable: true description: >- How the model should select which tool (or tools) to use when generating a response. example: null tools: type: array nullable: true items: oneOf: - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: >- The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11. 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 nullable: true properties: type: type: string enum: - approximate description: >- The type of location approximation. Always approximate. city: type: string nullable: true description: >- Free text input for the city of the user, e.g. San Francisco. country: type: string nullable: true description: >- The two-letter ISO country code of the user, e.g. US. region: type: string nullable: true description: >- Free text input for the region of the user, e.g. California. timezone: type: string nullable: true description: >- The IANA timezone of the user, e.g. America/Los_Angeles. required: - type description: The user's location required: - type description: >- This tool searches the web for relevant results to use in a response. - type: object properties: display_height: type: integer description: The height of the computer display. display_width: type: integer description: The width of the computer display. environment: type: string enum: - windows - mac - linux - ubuntu - browser description: >- The type of computer environment to control. type: type: string enum: - computer_use_preview description: >- The type of the computer use tool. Always computer_use_preview. required: - display_height - display_width - environment - type description: A tool that controls a virtual computer. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: >- List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string enum: - code_interpreter description: >- The type of the code interpreter tool. Always code_interpreter. container: anyOf: - type: string - type: object properties: type: type: string enum: - auto required: - type description: The container ID. required: - type - container description: >- A tool that runs Python code to help generate a response to a prompt. - type: object properties: type: type: string enum: - local_shell description: >- The type of the local shell tool. Always local_shell. required: - type description: >- A tool that allows the model to execute shell commands in a local environment. - type: object properties: name: type: string description: The name of the function to call. parameters: type: object nullable: true additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: type: boolean nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string nullable: true description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - type - type: object properties: type: type: string enum: - image_generation background: type: string enum: - transparent - opaque - auto input_image_mask: type: object properties: file_id: type: string image_url: type: string model: type: string enum: - gpt-image-1 moderation: type: string enum: - auto - low output_compression: type: number output_format: type: string enum: - png - webp - jpeg partial_images: type: integer minimum: 0 maximum: 3 quality: type: string enum: - low - medium - high - auto size: type: string enum: - 1024x1024 - 1024x1536 - 1536x1024 - auto required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. example: null top_p: type: number nullable: true 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. We generally recommend altering this or temperature but not both. example: null truncation: type: string nullable: true enum: - auto - disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. example: null usage: type: object properties: input_tokens: type: integer description: The number of input tokens. example: 137 input_tokens_details: type: object nullable: true properties: cached_tokens: type: integer description: >- The number of tokens that were retrieved from the cache. required: - cached_tokens description: A detailed breakdown of the input tokens. example: null output_tokens: type: integer description: The number of output tokens. example: 914 output_tokens_details: type: object nullable: true properties: reasoning_tokens: type: integer description: The number of reasoning tokens. required: - reasoning_tokens description: A detailed breakdown of the output tokens. example: null total_tokens: type: integer description: The total number of tokens used. example: 1051 required: - input_tokens - output_tokens - total_tokens description: >- Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. citations: type: array items: type: string format: uri server_side_tool_usage: type: object additionalProperties: type: integer minimum: 0 meta: type: object nullable: true properties: usage: type: object nullable: true 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: - created_at - id - model - object - parallel_tool_calls description: The response that was incomplete. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.incomplete description: The type of the event. required: - response - sequence_number - type - type: object properties: item: oneOf: - type: object properties: role: type: string enum: - assistant description: >- The role of the output message. Always assistant. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - role - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: >- The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: type: type: string enum: - x_search_call required: - type description: The output item that was added. output_index: type: number description: The index of the output item that was added. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.output_item.added description: The type of the event. required: - item - output_index - sequence_number - type - type: object properties: item: oneOf: - type: object properties: role: type: string enum: - assistant description: >- The role of the output message. Always assistant. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - role - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: >- The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: type: type: string enum: - x_search_call required: - type description: The output item that was marked done. output_index: type: number description: The index of the output item that was marked done. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.output_item.done description: The type of the event. required: - item - output_index - sequence_number - type - type: object properties: delta: type: string description: The text delta that was added to the summary. item_id: type: string description: >- The ID of the item this summary text delta is associated with. output_index: type: number description: >- The index of the output item this summary text delta is associated with. sequence_number: type: number description: The sequence number of this event. summary_index: type: number description: >- The index of the summary part within the reasoning summary. type: type: string enum: - response.reasoning_summary_text.delta description: The type of the event. required: - delta - item_id - output_index - sequence_number - summary_index - type - type: object properties: item_id: type: string description: >- The ID of the item this summary text is associated with. output_index: type: number description: >- The index of the output item this summary text is associated with. sequence_number: type: number description: The sequence number of this event. summary_index: type: number description: >- The index of the summary part within the reasoning summary. text: type: string description: The full text of the completed reasoning summary. type: type: string enum: - response.reasoning_summary_text.done description: The type of the event. required: - item_id - output_index - sequence_number - summary_index - text - type - type: object properties: content_index: type: number description: >- The index of the reasoning content part this delta is associated with. delta: type: string description: >- The text delta that was added to the reasoning content. item_id: type: string description: >- The ID of the item this reasoning text delta is associated with. output_index: type: number description: >- The index of the output item this reasoning text delta is associated with. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.reasoning_text.delta description: The type of the event. required: - content_index - delta - item_id - output_index - sequence_number - type - type: object properties: content_index: type: number description: The index of the reasoning content part. item_id: type: string description: >- The ID of the item this reasoning text is associated with. output_index: type: number description: >- The index of the output item this reasoning text is associated with. sequence_number: type: number description: The sequence number of this event. text: type: string description: The full text of the completed reasoning content. type: type: string enum: - response.reasoning_text.done description: The type of the event. required: - content_index - item_id - output_index - sequence_number - text - type - type: object properties: content_index: type: number description: >- The index of the content part that the refusal text is added to. delta: type: string description: The refusal text that is added. item_id: type: string description: >- The ID of the output item that the refusal text is added to. output_index: type: number description: >- The index of the output item that the refusal text is added to. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.refusal.delta description: The type of the event. required: - content_index - delta - item_id - output_index - sequence_number - type - type: object properties: content_index: type: number description: >- The index of the content part that the refusal text is finalized. item_id: type: string description: >- The ID of the output item that the refusal text is finalized. output_index: type: number description: >- The index of the output item that the refusal text is finalized. refusal: type: string description: The refusal text that is finalized. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.refusal.done description: The type of the event. required: - content_index - item_id - output_index - refusal - sequence_number - type - type: object properties: item_id: type: string description: >- Unique ID for the output item associated with the web search call. output_index: type: number description: >- The index of the output item that the web search call is associated with. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.web_search_call.completed description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: >- Unique ID for the output item associated with the web search call. output_index: type: number description: >- The index of the output item that the web search call is associated with. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.web_search_call.in_progress description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: >- Unique ID for the output item associated with the web search call. output_index: type: number description: >- The index of the output item that the web search call is associated with. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.web_search_call.searching description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: >- The unique identifier of the image generation item being processed. output_index: type: number description: >- The index of the output item in the response's output array. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.image_generation_call.completed description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: >- The unique identifier of the image generation item being processed. output_index: type: number description: >- The index of the output item in the response's output array. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.image_generation_call.generating description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: >- The unique identifier of the image generation item being processed. output_index: type: number description: >- The index of the output item in the response's output array. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.image_generation_call.in_progress description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: >- The unique identifier of the image generation item being processed. output_index: type: number description: >- The index of the output item in the response's output array. partial_image_b64: type: string description: >- Base64-encoded partial image data, suitable for rendering as an image. partial_image_index: type: number description: >- 0-based index for the partial image (backend is 1-based, but this is 0-based for the user). sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.image_generation_call.partial_image description: The type of the event. required: - item_id - output_index - partial_image_b64 - partial_image_index - sequence_number - type - type: object properties: delta: type: string description: >- A JSON string containing the partial update to the arguments for the MCP tool call. item_id: type: string description: >- The unique identifier of the MCP tool call item being processed. output_index: type: number description: >- The index of the output item in the response's output array. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.mcp_call_arguments.delta description: The type of the event. required: - delta - item_id - output_index - sequence_number - type - type: object properties: arguments: type: string description: >- A JSON string containing the finalized arguments for the MCP tool call. item_id: type: string description: >- The unique identifier of the MCP tool call item being processed. output_index: type: number description: >- The index of the output item in the response's output array. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.mcp_call_arguments.done description: The type of the event. required: - arguments - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: The ID of the MCP tool call item that completed. output_index: type: number description: The index of the output item that completed. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.mcp_call.completed description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: The ID of the MCP tool call item that failed. output_index: type: number description: The index of the output item that failed. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.mcp_call.failed description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: >- The unique identifier of the MCP tool call item being processed. output_index: type: number description: >- The index of the output item in the response's output array. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.mcp_call.in_progress description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: >- The ID of the MCP tool call item that produced this output. output_index: type: number description: The index of the output item that was processed. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.mcp_list_tools.completed description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: The ID of the MCP tool call item that failed. output_index: type: number description: The index of the output item that failed. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.mcp_list_tools.failed description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: >- The ID of the MCP tool call item that is being processed. output_index: type: number description: The index of the output item that is being processed. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.mcp_list_tools.in_progress description: The type of the event. required: - item_id - output_index - sequence_number - type - type: object properties: annotation: nullable: true description: The annotation object being added. annotation_index: type: number description: The index of the annotation within the content part. content_index: type: number description: The index of the content part within the output item. item_id: type: string description: >- The unique identifier of the item to which the annotation is being added. output_index: type: number description: >- The index of the output item in the response's output array. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.output_text.annotation.added description: The type of the event. required: - annotation_index - content_index - item_id - output_index - sequence_number - type - type: object properties: response: type: object properties: background: type: boolean nullable: true description: >- Whether to run the model response in the background. example: false created_at: type: number description: >- Unix timestamp (in seconds) of when this Response was created. example: 1762343744 error: type: object nullable: true properties: code: type: string description: The error code for the response. message: type: string description: A human-readable description of the error. required: - code - message description: >- An error object returned when the model fails to generate a Response. example: null id: type: string description: Unique identifier for this Response. example: >- resp_68963fb142d08197b4d3ae3ad852542c054845c6ea84caa2 incomplete_details: type: object nullable: true properties: reason: type: string description: The reason why the response is incomplete. description: Details about why the response is incomplete. example: null instructions: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the developer role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: >- The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: >- The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: >- The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: >- The unique ID of the local shell tool call generated by the model. output: type: string description: >- A JSON string of the output of the local shell tool call. type: type: string enum: - local_shell_call_output description: >- The type of the local shell tool call output. Always local_shell_call_output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - id - output - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- A list of one or many input items to the model, containing different content types. - nullable: true description: >- A system (or developer) message inserted into the model's context. example: null max_output_tokens: type: integer nullable: true description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. example: null metadata: type: object nullable: true additionalProperties: nullable: true description: >- Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. example: {} model: type: string description: Model ID used to generate the response. example: gpt-5-chat-latest object: type: string enum: - response description: >- The object type of this resource - always set to response. example: response output: type: array nullable: true items: oneOf: - type: object properties: role: type: string enum: - assistant description: >- The role of the output message. Always assistant. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - role - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: >- The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: >- The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: >- The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: type: type: string enum: - x_search_call required: - type description: > An array of content items generated by the model. - The length and order of items in the output array is dependent on the model's response. - Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs. example: null output_text: type: string nullable: true description: >- SDK-only convenience property that contains the aggregated text output from all output_text items in the output array, if any are present. Supported in the Python and JavaScript SDKs. example: Hi! How’s your day going? parallel_tool_calls: type: boolean description: >- Whether to allow the model to run tool calls in parallel. example: false previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. example: null prompt: type: object nullable: true properties: id: type: string description: >- The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: nullable: true description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. example: null reasoning: type: object nullable: true properties: effort: type: string nullable: true enum: - none - low - medium - high description: >- Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. summary: type: string nullable: true enum: - auto - concise - detailed description: >- A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. description: Configuration options for reasoning models. example: null service_tier: type: string nullable: true description: >- Specifies the processing type used for serving the request. example: null status: type: string enum: - completed - failed - in_progress - cancelled - queued - incomplete description: The status of the response generation. example: completed temperature: type: number nullable: true minimum: 0 maximum: 2 description: >- What sampling temperature to use, between 0 and 2. 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. example: null text: type: object nullable: true properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp - file_search - image_generation required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- Use this option to force the model to call a specific function. - nullable: true description: >- How the model should select which tool (or tools) to use when generating a response. example: null tools: type: array nullable: true items: oneOf: - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: >- The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11. 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 nullable: true properties: type: type: string enum: - approximate description: >- The type of location approximation. Always approximate. city: type: string nullable: true description: >- Free text input for the city of the user, e.g. San Francisco. country: type: string nullable: true description: >- The two-letter ISO country code of the user, e.g. US. region: type: string nullable: true description: >- Free text input for the region of the user, e.g. California. timezone: type: string nullable: true description: >- The IANA timezone of the user, e.g. America/Los_Angeles. required: - type description: The user's location required: - type description: >- This tool searches the web for relevant results to use in a response. - type: object properties: display_height: type: integer description: The height of the computer display. display_width: type: integer description: The width of the computer display. environment: type: string enum: - windows - mac - linux - ubuntu - browser description: >- The type of computer environment to control. type: type: string enum: - computer_use_preview description: >- The type of the computer use tool. Always computer_use_preview. required: - display_height - display_width - environment - type description: A tool that controls a virtual computer. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: >- List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string enum: - code_interpreter description: >- The type of the code interpreter tool. Always code_interpreter. container: anyOf: - type: string - type: object properties: type: type: string enum: - auto required: - type description: The container ID. required: - type - container description: >- A tool that runs Python code to help generate a response to a prompt. - type: object properties: type: type: string enum: - local_shell description: >- The type of the local shell tool. Always local_shell. required: - type description: >- A tool that allows the model to execute shell commands in a local environment. - type: object properties: name: type: string description: The name of the function to call. parameters: type: object nullable: true additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: type: boolean nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string nullable: true description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - type - type: object properties: type: type: string enum: - image_generation background: type: string enum: - transparent - opaque - auto input_image_mask: type: object properties: file_id: type: string image_url: type: string model: type: string enum: - gpt-image-1 moderation: type: string enum: - auto - low output_compression: type: number output_format: type: string enum: - png - webp - jpeg partial_images: type: integer minimum: 0 maximum: 3 quality: type: string enum: - low - medium - high - auto size: type: string enum: - 1024x1024 - 1024x1536 - 1536x1024 - auto required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. example: null top_p: type: number nullable: true 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. We generally recommend altering this or temperature but not both. example: null truncation: type: string nullable: true enum: - auto - disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. example: null usage: type: object properties: input_tokens: type: integer description: The number of input tokens. example: 137 input_tokens_details: type: object nullable: true properties: cached_tokens: type: integer description: >- The number of tokens that were retrieved from the cache. required: - cached_tokens description: A detailed breakdown of the input tokens. example: null output_tokens: type: integer description: The number of output tokens. example: 914 output_tokens_details: type: object nullable: true properties: reasoning_tokens: type: integer description: The number of reasoning tokens. required: - reasoning_tokens description: A detailed breakdown of the output tokens. example: null total_tokens: type: integer description: The total number of tokens used. example: 1051 required: - input_tokens - output_tokens - total_tokens description: >- Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. citations: type: array items: type: string format: uri server_side_tool_usage: type: object additionalProperties: type: integer minimum: 0 meta: type: object nullable: true properties: usage: type: object nullable: true 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: - created_at - id - model - object - parallel_tool_calls description: The full response object that is queued. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.queued description: The type of the event. required: - response - sequence_number - type - type: object properties: delta: type: string description: >- The incremental input data (delta) for the custom tool call. item_id: type: string description: >- Unique identifier for the API item associated with this event. output_index: type: number description: The index of the output this delta applies to. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.custom_tool_call_input.delta description: The type of the event. required: - delta - item_id - output_index - sequence_number - type - type: object properties: input: type: string description: The complete input data for the custom tool call. item_id: type: string description: >- Unique identifier for the API item associated with this event. output_index: type: number description: The index of the output this event applies to. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.custom_tool_call_input.done description: The type of the event. required: - input - item_id - output_index - sequence_number - type - type: object properties: item_id: type: string description: >- The ID of the item this summary part is associated with. output_index: type: number description: >- The index of the output item this summary part is associated with. part: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: The type of the event. required: - text - type description: The completed summary part. sequence_number: type: number description: The sequence number of this event. summary_index: type: number description: >- The index of the summary part within the reasoning summary. type: type: string enum: - response.reasoning_summary_part.done description: The type of the event. required: - item_id - output_index - part - sequence_number - summary_index - type - type: object properties: content_index: type: number description: >- The index of the content part that the text content is finalized. item_id: type: string description: >- The ID of the output item that the text content is finalized. logprobs: type: array items: type: object properties: token: type: string bytes: type: array items: type: number logprob: type: number top_logprobs: type: array items: type: object properties: token: type: string bytes: type: array items: type: number logprob: type: number required: - token - bytes - logprob required: - token - bytes - logprob - top_logprobs description: The log probabilities of the tokens in the delta. output_index: type: number description: >- The index of the output item that the text content is finalized. sequence_number: type: number description: The sequence number of this event. text: type: string description: The text content that is finalized. type: type: string enum: - response.output_text.done description: The type of the event. required: - content_index - item_id - logprobs - output_index - sequence_number - text - type - type: object properties: item_id: type: string description: >- The ID of the item this summary part is associated with. output_index: type: number description: >- The index of the output item this summary part is associated with. part: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: The type of the event. required: - text - type description: The summary part that was added. sequence_number: type: number description: The sequence number of this event. summary_index: type: number description: >- The index of the summary part within the reasoning summary. type: type: string enum: - response.reasoning_summary_part.added description: The type of the event. required: - item_id - output_index - part - sequence_number - summary_index - type - type: object properties: content_index: type: number description: >- The index of the content part that the text delta was added to. delta: type: string description: The text delta that was added. item_id: type: string description: >- The ID of the output item that the text delta was added to. logprobs: type: array items: type: object properties: token: type: string bytes: type: array items: type: number logprob: type: number top_logprobs: type: array items: type: object properties: token: type: string bytes: type: array items: type: number logprob: type: number required: - token - bytes - logprob required: - token - bytes - logprob - top_logprobs description: The log probabilities of the tokens in the delta. output_index: type: number description: >- The index of the output item that the text delta was added to. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.output_text.delta description: The type of the event. required: - content_index - delta - item_id - logprobs - output_index - sequence_number - type - type: object properties: content_index: type: number description: The index of the content part that is done. item_id: type: string description: >- The ID of the output item that the content part was added to. output_index: type: number description: >- The index of the output item that the content part was added to. part: anyOf: - type: object properties: annotations: type: array items: anyOf: - type: object properties: file_id: type: string filename: type: string index: type: number type: type: string enum: - file_citation description: The type of the event. required: - file_id - filename - index - type - type: object properties: end_index: type: number description: >- The index of the last character of the URL citation in the message. start_index: type: number description: >- The index of the first character of the URL citation in the message. title: type: string description: The title of the web resource. type: type: string enum: - url_citation description: The type of the event. url: type: string description: The URL of the web resource. required: - end_index - start_index - title - type - url - type: object properties: container_id: type: string end_index: type: number file_id: type: string filename: type: string start_index: type: number type: type: string enum: - container_file_citation description: The type of the event. required: - container_id - end_index - file_id - filename - start_index - type - type: object properties: file_id: type: string index: type: number type: type: string enum: - file_path description: The type of the event. required: - file_id - index - type text: type: string type: type: string enum: - output_text description: The type of the event. logprobs: type: array items: type: object properties: token: type: string bytes: type: array items: type: number logprob: type: number top_logprobs: type: array items: type: object properties: token: type: string bytes: type: array items: type: number logprob: type: number required: - token - bytes - logprob required: - token - bytes - logprob - top_logprobs required: - annotations - text - type - logprobs - type: object properties: refusal: type: string description: The refusal text that is finalized. type: type: string enum: - refusal description: The type of the event. required: - refusal - type - type: object properties: text: type: string description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. type: type: string enum: - reasoning_text description: The type of the event. required: - text - type description: The content part that is done. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.content_part.done description: The type of the event. required: - content_index - item_id - output_index - part - sequence_number - type - type: object properties: response: type: object properties: background: type: boolean nullable: true description: >- Whether to run the model response in the background. example: false created_at: type: number description: >- Unix timestamp (in seconds) of when this Response was created. example: 1762343744 error: type: object nullable: true properties: code: type: string description: The error code for the response. message: type: string description: A human-readable description of the error. required: - code - message description: >- An error object returned when the model fails to generate a Response. example: null id: type: string description: Unique identifier for this Response. example: >- resp_68963fb142d08197b4d3ae3ad852542c054845c6ea84caa2 incomplete_details: type: object nullable: true properties: reason: type: string description: The reason why the response is incomplete. description: Details about why the response is incomplete. example: null instructions: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the developer role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: >- The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: >- The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: >- The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: >- The unique ID of the local shell tool call generated by the model. output: type: string description: >- A JSON string of the output of the local shell tool call. type: type: string enum: - local_shell_call_output description: >- The type of the local shell tool call output. Always local_shell_call_output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - id - output - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: >- An internal identifier for an item to reference. description: >- A list of one or many input items to the model, containing different content types. - nullable: true description: >- A system (or developer) message inserted into the model's context. example: null max_output_tokens: type: integer nullable: true description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. example: null metadata: type: object nullable: true additionalProperties: nullable: true description: >- Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. example: {} model: type: string description: Model ID used to generate the response. example: gpt-5-chat-latest object: type: string enum: - response description: >- The object type of this resource - always set to response. example: response output: type: array nullable: true items: oneOf: - type: object properties: role: type: string enum: - assistant description: >- The role of the output message. Always assistant. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - role - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: >- The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: >- The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: >- The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: >- The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: type: type: string enum: - x_search_call required: - type description: > An array of content items generated by the model. - The length and order of items in the output array is dependent on the model's response. - Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs. example: null output_text: type: string nullable: true description: >- SDK-only convenience property that contains the aggregated text output from all output_text items in the output array, if any are present. Supported in the Python and JavaScript SDKs. example: Hi! How’s your day going? parallel_tool_calls: type: boolean description: >- Whether to allow the model to run tool calls in parallel. example: false previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. example: null prompt: type: object nullable: true properties: id: type: string description: >- The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: nullable: true description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. example: null reasoning: type: object nullable: true properties: effort: type: string nullable: true enum: - none - low - medium - high description: >- Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. summary: type: string nullable: true enum: - auto - concise - detailed description: >- A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. description: Configuration options for reasoning models. example: null service_tier: type: string nullable: true description: >- Specifies the processing type used for serving the request. example: null status: type: string enum: - completed - failed - in_progress - cancelled - queued - incomplete description: The status of the response generation. example: completed temperature: type: number nullable: true minimum: 0 maximum: 2 description: >- What sampling temperature to use, between 0 and 2. 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. example: null text: type: object nullable: true properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp - file_search - image_generation required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: >- For function calling, the type is always function. required: - name - type description: >- Use this option to force the model to call a specific function. - nullable: true description: >- How the model should select which tool (or tools) to use when generating a response. example: null tools: type: array nullable: true items: oneOf: - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: >- The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11. 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 nullable: true properties: type: type: string enum: - approximate description: >- The type of location approximation. Always approximate. city: type: string nullable: true description: >- Free text input for the city of the user, e.g. San Francisco. country: type: string nullable: true description: >- The two-letter ISO country code of the user, e.g. US. region: type: string nullable: true description: >- Free text input for the region of the user, e.g. California. timezone: type: string nullable: true description: >- The IANA timezone of the user, e.g. America/Los_Angeles. required: - type description: The user's location required: - type description: >- This tool searches the web for relevant results to use in a response. - type: object properties: display_height: type: integer description: The height of the computer display. display_width: type: integer description: The width of the computer display. environment: type: string enum: - windows - mac - linux - ubuntu - browser description: >- The type of computer environment to control. type: type: string enum: - computer_use_preview description: >- The type of the computer use tool. Always computer_use_preview. required: - display_height - display_width - environment - type description: A tool that controls a virtual computer. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: >- List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string enum: - code_interpreter description: >- The type of the code interpreter tool. Always code_interpreter. container: anyOf: - type: string - type: object properties: type: type: string enum: - auto required: - type description: The container ID. required: - type - container description: >- A tool that runs Python code to help generate a response to a prompt. - type: object properties: type: type: string enum: - local_shell description: >- The type of the local shell tool. Always local_shell. required: - type description: >- A tool that allows the model to execute shell commands in a local environment. - type: object properties: name: type: string description: The name of the function to call. parameters: type: object nullable: true additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: type: boolean nullable: true description: >- Whether to enforce strict parameter validation. type: type: string enum: - function description: >- The type of the function tool. Always function. description: type: string nullable: true description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - type - type: object properties: type: type: string enum: - image_generation background: type: string enum: - transparent - opaque - auto input_image_mask: type: object properties: file_id: type: string image_url: type: string model: type: string enum: - gpt-image-1 moderation: type: string enum: - auto - low output_compression: type: number output_format: type: string enum: - png - webp - jpeg partial_images: type: integer minimum: 0 maximum: 3 quality: type: string enum: - low - medium - high - auto size: type: string enum: - 1024x1024 - 1024x1536 - 1536x1024 - auto required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. example: null top_p: type: number nullable: true 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. We generally recommend altering this or temperature but not both. example: null truncation: type: string nullable: true enum: - auto - disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. example: null usage: type: object properties: input_tokens: type: integer description: The number of input tokens. example: 137 input_tokens_details: type: object nullable: true properties: cached_tokens: type: integer description: >- The number of tokens that were retrieved from the cache. required: - cached_tokens description: A detailed breakdown of the input tokens. example: null output_tokens: type: integer description: The number of output tokens. example: 914 output_tokens_details: type: object nullable: true properties: reasoning_tokens: type: integer description: The number of reasoning tokens. required: - reasoning_tokens description: A detailed breakdown of the output tokens. example: null total_tokens: type: integer description: The total number of tokens used. example: 1051 required: - input_tokens - output_tokens - total_tokens description: >- Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. citations: type: array items: type: string format: uri server_side_tool_usage: type: object additionalProperties: type: integer minimum: 0 meta: type: object nullable: true properties: usage: type: object nullable: true 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: - created_at - id - model - object - parallel_tool_calls description: The response that was created. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.created description: The type of the event. required: - response - sequence_number - type - type: object properties: content_index: type: number description: The index of the content part that was added. item_id: type: string description: >- The ID of the output item that the content part was added to. output_index: type: number description: >- The index of the output item that the content part was added to. part: anyOf: - type: object properties: annotations: type: array items: anyOf: - type: object properties: file_id: type: string filename: type: string index: type: number type: type: string enum: - file_citation description: The type of the event. required: - file_id - filename - index - type - type: object properties: end_index: type: number description: >- The index of the last character of the URL citation in the message. start_index: type: number description: >- The index of the first character of the URL citation in the message. title: type: string description: The title of the web resource. type: type: string enum: - url_citation description: The type of the event. url: type: string description: The URL of the web resource. required: - end_index - start_index - title - type - url - type: object properties: container_id: type: string end_index: type: number file_id: type: string filename: type: string start_index: type: number type: type: string enum: - container_file_citation description: The type of the event. required: - container_id - end_index - file_id - filename - start_index - type - type: object properties: file_id: type: string index: type: number type: type: string enum: - file_path description: The type of the event. required: - file_id - index - type text: type: string type: type: string enum: - output_text description: The type of the event. logprobs: type: array items: type: object properties: token: type: string bytes: type: array items: type: number logprob: type: number top_logprobs: type: array items: type: object properties: token: type: string bytes: type: array items: type: number logprob: type: number required: - token - bytes - logprob required: - token - bytes - logprob - top_logprobs required: - annotations - text - type - logprobs - type: object properties: refusal: type: string description: The refusal text that is finalized. type: type: string enum: - refusal description: The type of the event. required: - refusal - type - type: object properties: text: type: string description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. type: type: string enum: - reasoning_text description: The type of the event. required: - text - type description: The content part that was added. sequence_number: type: number description: The sequence number of this event. type: type: string enum: - response.content_part.added description: The type of the event. required: - content_index - item_id - output_index - part - sequence_number - type /v1/responses/:response_id: get: operationId: _v1_responses_:response_id requestBody: required: true content: application/json: schema: 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-4 - openai/gpt-4 - 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-4-turbo - openai/gpt-4-turbo - gpt-4-turbo-2024-04-09 - openai/gpt-4-turbo-2024-04-09 - 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 - 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 - o4-mini-2025-04-16 - openai/o4-mini-2025-04-16 - gpt-5-nano-2025-08-07 - openai/gpt-5-nano-2025-08-07 - gpt-5-pro - openai/gpt-5-pro - gpt-5.1-2025-11-13 - openai/gpt-5.1-2025-11-13 - gpt-5.1-codex - openai/gpt-5.1-codex - gpt-5.1-codex-mini - openai/gpt-5.1-codex-mini - gpt-5.2-2025-12-11 - openai/gpt-5.2-2025-12-11 - gpt-5.2-chat-latest - openai/gpt-5.2-chat-latest - gpt-5.2-pro-2025-12-11 - openai/gpt-5.2-pro-2025-12-11 - gpt-5.2-codex - openai/gpt-5.2-codex - gpt-5.3-codex - openai/gpt-5.3-codex - gpt-5.4-2026-03-05 - openai/gpt-5.4-2026-03-05 - gpt-5.4-pro-2026-03-05 - openai/gpt-5.4-pro-2026-03-05 - gpt-5.5-2026-04-23 - openai/gpt-5.5-2026-04-23 - gpt-5.5-pro-2026-04-23 - openai/gpt-5.5-pro-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 - o3-pro - openai/o3-pro - o3-2025-04-16 - openai/o3-2025-04-16 - gpt-5-2025-08-07 - openai/gpt-5-2025-08-07 - gpt-5-mini-2025-08-07 - openai/gpt-5-mini-2025-08-07 - gpt-5 - openai/gpt-5 - gpt-5-mini - openai/gpt-5-mini - gpt-5-nano - openai/gpt-5-nano - openai/gpt-5-1 - openai/gpt-5-1-codex - openai/gpt-5-1-codex-mini - openai/gpt-5-2 - openai/gpt-5-2-chat-latest - openai/gpt-5-2-pro - openai/gpt-5-2-codex - openai/gpt-5-3-codex - openai/gpt-5-4 - openai/gpt-5-4-pro - openai/gpt-5-5 - openai/gpt-5-5-pro - test/dummy-responses id: type: string required: - model - id 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-4, openai/gpt-4, 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-4-turbo, openai/gpt-4-turbo, gpt-4-turbo-2024-04-09, openai/gpt-4-turbo-2024-04-09, 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, 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, o4-mini-2025-04-16, openai/o4-mini-2025-04-16, gpt-5-nano-2025-08-07, openai/gpt-5-nano-2025-08-07, gpt-5-pro, openai/gpt-5-pro, gpt-5.1-2025-11-13, openai/gpt-5.1-2025-11-13, gpt-5.1-codex, openai/gpt-5.1-codex, gpt-5.1-codex-mini, openai/gpt-5.1-codex-mini, gpt-5.2-2025-12-11, openai/gpt-5.2-2025-12-11, gpt-5.2-chat-latest, openai/gpt-5.2-chat-latest, gpt-5.2-pro-2025-12-11, openai/gpt-5.2-pro-2025-12-11, gpt-5.2-codex, openai/gpt-5.2-codex, gpt-5.3-codex, openai/gpt-5.3-codex, gpt-5.4-2026-03-05, openai/gpt-5.4-2026-03-05, gpt-5.4-pro-2026-03-05, openai/gpt-5.4-pro-2026-03-05, gpt-5.5-2026-04-23, openai/gpt-5.5-2026-04-23, gpt-5.5-pro-2026-04-23, openai/gpt-5.5-pro-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, o3-pro, openai/o3-pro, o3-2025-04-16, openai/o3-2025-04-16, gpt-5-2025-08-07, openai/gpt-5-2025-08-07, gpt-5-mini-2025-08-07, openai/gpt-5-mini-2025-08-07, gpt-5, openai/gpt-5, gpt-5-mini, openai/gpt-5-mini, gpt-5-nano, openai/gpt-5-nano, openai/gpt-5-1, openai/gpt-5-1-codex, openai/gpt-5-1-codex-mini, openai/gpt-5-2, openai/gpt-5-2-chat-latest, openai/gpt-5-2-pro, openai/gpt-5-2-codex, openai/gpt-5-3-codex, openai/gpt-5-4, openai/gpt-5-4-pro, openai/gpt-5-5, openai/gpt-5-5-pro, test/dummy-responses responses: '200': content: application/json: schema: type: object properties: background: type: boolean nullable: true description: Whether to run the model response in the background. example: false created_at: type: number description: >- Unix timestamp (in seconds) of when this Response was created. example: 1762343744 error: type: object nullable: true properties: code: type: string description: The error code for the response. message: type: string description: A human-readable description of the error. required: - code - message description: >- An error object returned when the model fails to generate a Response. example: null id: type: string description: Unique identifier for this Response. example: resp_68963fb142d08197b4d3ae3ad852542c054845c6ea84caa2 incomplete_details: type: object nullable: true properties: reason: type: string description: The reason why the response is incomplete. description: Details about why the response is incomplete. example: null instructions: anyOf: - type: string description: >- A text input to the model, equivalent to a text input with the developer role. - type: array items: anyOf: - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - assistant - system - developer description: The role of the message input. content: anyOf: - type: string description: A text input to the model. - type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. description: >- Text, image, or audio input to the model, used to generate a response. Can also contain previous assistant responses. required: - role - content description: >- A message input to the model with a role indicating instruction following hierarchy. Instructions given with the developer or system role take precedence over instructions given with the user role. Messages with the assistant role are presumed to have been generated by the model in previous interactions. - type: object properties: type: type: string enum: - message description: >- The type of the message input. Always message. role: type: string enum: - user - system - developer description: The role of the message input. status: type: string enum: - in_progress - completed - incomplete description: The status of item. content: type: array items: oneOf: - type: object properties: type: type: string enum: - input_text description: >- The type of the input item. Always input_text. text: type: string description: The text input to the model. required: - type - text description: A text input to the model. - type: object properties: type: type: string enum: - input_image description: >- The type of the input item. Always input_image. detail: type: string enum: - high - low - auto default: auto description: >- The detail level of the image to be sent to the model. One of high, low, or auto. image_url: type: string nullable: true description: >- The URL of the image to be sent to the model. A fully qualified URL or base64 encoded image in a data URL. required: - type - type: object properties: type: type: string enum: - input_file description: >- The type of the input item. Always input_file. file_data: type: string description: >- The content of the file to be sent to the model. filename: type: string description: >- The name of the file to be sent to the model. required: - type description: >- A list of one or many input items to the model, containing different content types. required: - role - content - type: object properties: id: type: string description: The unique ID of the output message. role: type: string enum: - assistant description: >- The role of the output message. Always assistant. status: type: string enum: - in_progress - completed - incomplete description: The status of the message input. type: type: string enum: - message description: >- The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - id - role - status - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: >- The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: call_id: type: string description: >- The unique ID of the function tool call generated by the model. output: type: string description: >- A JSON string of the output of the function tool call. type: type: string enum: - function_call_output description: >- The type of the function tool call output. Always function_call_output. id: type: string nullable: true description: >- The unique ID of the function tool call output. Populated when this item is returned via API. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - call_id - output - type - type: object properties: id: type: string description: >- The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: The code to run, or null if not available. id: type: string description: >- The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: >- The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: >- The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: >- The unique ID of the local shell tool call generated by the model. output: type: string description: >- A JSON string of the output of the local shell tool call. type: type: string enum: - local_shell_call_output description: >- The type of the local shell tool call output. Always local_shell_call_output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the item. required: - id - output - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: approval_request_id: type: string description: >- The ID of the approval request being answered. approve: type: boolean description: Whether the request was approved. type: type: string enum: - mcp_approval_response description: >- The type of the item. Always mcp_approval_response. id: type: string nullable: true description: The unique ID of the approval response. reason: type: string nullable: true description: Optional reason for the decision. required: - approval_request_id - approve - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: >- The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: id: type: string description: The ID of the item to reference. type: type: string nullable: true enum: - item_reference description: >- The type of item to reference. Always item_reference. required: - id description: An internal identifier for an item to reference. description: >- A list of one or many input items to the model, containing different content types. - nullable: true description: >- A system (or developer) message inserted into the model's context. example: null max_output_tokens: type: integer nullable: true description: >- An upper bound for the number of tokens that can be generated for a response, including visible output tokens and reasoning tokens. example: null metadata: type: object nullable: true additionalProperties: nullable: true description: >- Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format, and querying for objects via API or the dashboard. Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters. example: {} model: type: string description: Model ID used to generate the response. example: gpt-5-chat-latest object: type: string enum: - response description: The object type of this resource - always set to response. example: response output: type: array nullable: true items: oneOf: - type: object properties: role: type: string enum: - assistant description: >- The role of the output message. Always assistant. type: type: string enum: - message description: The type of the output message. Always message. content: type: array items: oneOf: - type: object properties: annotations: type: array items: oneOf: - 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. type: type: string enum: - url_citation description: >- The type of the URL citation. Always url_citation. url: type: string format: uri description: The URL of the web resource. required: - end_index - start_index - title - type - url description: >- A citation for a web resource used to generate a model response. - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_citation required: - file_id - index - type - type: object properties: container_id: type: string start_index: type: integer end_index: type: integer file_id: type: string type: type: string enum: - container_file_citation required: - container_id - start_index - end_index - file_id - type - type: object properties: file_id: type: string index: type: integer type: type: string enum: - file_path required: - file_id - index - type description: The annotations of the text output. text: type: string description: The text output from the model. type: type: string enum: - output_text description: >- The type of the output text. Always output_text. logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string top_logprobs: type: array items: type: object properties: bytes: type: array items: type: integer logprob: type: number token: type: string required: - bytes - logprob - token required: - bytes - logprob - token - top_logprobs required: - annotations - text - type - type: object properties: refusal: type: string description: The refusal explanationfrom the model. type: type: string enum: - refusal description: The type of the refusal. Always refusal. required: - refusal - type description: The content of the output message. required: - role - type - content - type: object properties: id: type: string queries: type: array items: type: string status: type: string enum: - in_progress - searching - incomplete - failed - completed type: type: string enum: - file_search_call results: type: array nullable: true items: type: object properties: attributes: type: object nullable: true additionalProperties: anyOf: - type: string - type: number - type: boolean file_id: type: string filename: type: string score: type: number text: type: string required: - id - queries - status - type - type: object properties: action: oneOf: - type: object properties: button: type: string enum: - left - right - wheel - back - forward description: >- Indicates which mouse button was pressed during the click. type: type: string enum: - click description: >- Specifies the event type. For a click action, this property is always set to click. x: type: integer description: >- The x-coordinate where the click occurred. 'y': type: integer description: >- The y-coordinate where the click occurred. required: - button - type - x - 'y' description: A click action. - type: object properties: type: type: string enum: - double_click description: >- Specifies the event type. For a double click action, this property is always set to double_click. x: type: integer description: >- The x-coordinate where the double click occurred. 'y': type: integer description: >- The y-coordinate where the double click occurred. required: - type - x - 'y' description: A double click action. - type: object properties: path: type: array items: type: object properties: x: type: integer description: The y-coordinate. 'y': type: integer description: The y-coordinate. required: - x - 'y' description: >- An array of coordinates representing the path of the drag action. Coordinates will appear as an array of objects, eg type: type: string enum: - drag description: >- Specifies the event type. For a drag action, this property is always set to drag. required: - path - type description: A drag action. - type: object properties: keys: type: array items: type: string description: >- The combination of keys the model is requesting to be pressed. This is an array of strings, each representing a key. type: type: string enum: - keypress description: >- Specifies the event type. For a keypress action, this property is always set to keypress. required: - keys - type description: >- A collection of keypresses the model would like to perform. - type: object properties: type: type: string enum: - move description: >- Specifies the event type. For a move action, this property is always set to move. x: type: integer description: The x-coordinate to move to. 'y': type: integer description: The y-coordinate to move to. required: - type - x - 'y' description: A mouse move action. - type: object properties: type: type: string enum: - screenshot description: >- Specifies the event type. For a screenshot action, this property is always set to screenshot. required: - type description: A screenshot action. - type: object properties: type: type: string enum: - scroll description: >- Specifies the event type. For a scroll action, this property is always set to scroll. scroll_x: type: integer description: The horizontal scroll distance. scroll_y: type: integer description: The vertical scroll distance. x: type: integer description: >- The x-coordinate where the scroll occurred. 'y': type: integer description: >- The y-coordinate where the scroll occurred. required: - type - scroll_x - scroll_y - x - 'y' description: A scroll action. - type: object properties: type: type: string enum: - type description: >- Specifies the event type. For a type action, this property is always set to type. text: type: string description: The text to type. required: - type - text description: An action to type in text. - type: object properties: type: type: string enum: - wait description: >- Specifies the event type. For a wait action, this property is always set to wait. required: - type description: A wait action. call_id: type: string description: >- An identifier used when responding to the tool call with output. id: type: string description: The unique ID of the computer call. pending_safety_checks: type: array items: type: object properties: code: type: string description: The type of the pending safety check. id: type: string description: The ID of the pending safety check. message: type: string description: Details about the pending safety check. required: - code - id - message description: The pending safety checks for the computer call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. type: type: string enum: - computer_call description: >- The type of the computer call. Always computer_call. required: - action - call_id - id - pending_safety_checks - status - type - type: object properties: call_id: type: string description: >- The ID of the computer tool call that produced the output. output: type: object properties: type: type: string enum: - computer_screenshot description: >- Specifies the event type. For a computer screenshot, this property is always set to computer_screenshot. image_url: type: string format: uri description: The URL of the screenshot image. required: - type description: >- A computer screenshot image used with the computer use tool. type: type: string enum: - computer_call_output description: >- The type of the computer tool call output. Always computer_call_output. acknowledged_safety_checks: type: array nullable: true items: type: object properties: id: type: string description: The ID of the pending safety check. code: type: string nullable: true description: The type of the pending safety check. message: type: string nullable: true description: Details about the pending safety check. required: - id description: >- The safety checks reported by the API that have been acknowledged by the developer. id: type: string nullable: true description: The ID of the computer tool call output. status: type: string nullable: true enum: - in_progress - completed - incomplete description: The status of the message input. required: - call_id - output - type - type: object properties: id: type: string description: The unique ID of the web search tool call. status: type: string enum: - in_progress - completed - searching - failed description: The status of the web search tool call. type: type: string enum: - web_search_call description: >- The type of the web search tool call. Always web_search_call. required: - id - status - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments to pass to the function. call_id: type: string description: >- The unique ID of the function tool call generated by the model. name: type: string description: The name of the function to run. type: type: string enum: - function_call description: >- The type of the function tool call. Always function_call. id: type: string description: The unique ID of the function tool call. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - arguments - call_id - name - type - type: object properties: id: type: string description: The unique identifier of the reasoning content. summary: type: array items: type: object properties: text: type: string description: >- A short summary of the reasoning used by the model when generating the response. type: type: string enum: - summary_text description: >- The type of the object. Always summary_text. required: - text - type description: Reasoning text contents. type: type: string enum: - reasoning description: The type of the object. Always reasoning. encrypted_content: type: string nullable: true description: >- The encrypted content of the reasoning item - populated when a response is generated with reasoning.encrypted_content in the include parameter. status: type: string enum: - in_progress - completed - incomplete description: The status of the item. required: - id - summary - type - type: object properties: id: type: string result: type: string nullable: true status: type: string enum: - in_progress - completed - failed - generating type: type: string enum: - image_generation_call required: - id - result - status - type - type: object properties: code: type: string nullable: true description: The code to run, or null if not available. id: type: string description: The unique ID of the code interpreter tool call. outputs: type: array nullable: true items: oneOf: - type: object properties: logs: type: string description: >- The logs output from the code interpreter. type: type: string enum: - logs description: The type of the output. Always 'logs'. required: - logs - type - type: object properties: type: type: string enum: - image url: type: string required: - type - url description: >- The outputs generated by the code interpreter, such as logs or images. Can be null if no outputs are available. status: type: string enum: - in_progress - completed - incomplete - interpreting - failed description: The status of the code interpreter tool call. type: type: string enum: - code_interpreter_call description: >- The type of the code interpreter tool call. Always code_interpreter_call. container_id: type: string description: The ID of the container used to run the code. required: - id - status - type - container_id - type: object properties: action: type: object properties: command: type: array items: type: string description: The command to run. env: type: object additionalProperties: type: string description: >- Environment variables to set for the command. type: type: string enum: - exec description: >- The type of the local shell action. Always exec. timeout_ms: type: integer nullable: true description: >- Optional timeout in milliseconds for the command. user: type: string nullable: true description: Optional user to run the command as. working_directory: type: string nullable: true description: >- Optional working directory to run the command in. required: - command - env - type description: Execute a shell command on the server. call_id: type: string description: >- The unique ID of the local shell tool call generated by the model. id: type: string description: The unique ID of the local shell call. status: type: string enum: - in_progress - completed - incomplete description: The status of the local shell call. type: type: string enum: - local_shell_call description: >- The type of the local shell call. Always local_shell_call. required: - action - call_id - id - status - type - type: object properties: id: type: string description: The unique ID of the list. server_label: type: string description: The label of the MCP server. tools: type: array items: type: object properties: input_schema: nullable: true name: type: string description: The name of the tool. annotations: nullable: true description: type: string nullable: true description: The description of the tool. required: - name type: type: string enum: - mcp_list_tools description: The type of the item. Always mcp_list_tools. error: type: string nullable: true description: >- Error message if the server could not list tools. required: - id - server_label - tools - type - type: object properties: arguments: type: string description: A JSON string of arguments for the tool. id: type: string description: The unique ID of the approval request. name: type: string server_label: type: string description: The name of the tool to run. type: type: string enum: - mcp_approval_request description: >- The type of the item. Always mcp_approval_request. required: - arguments - id - name - server_label - type - type: object properties: arguments: type: string description: >- A JSON string of the arguments passed to the tool. id: type: string description: The unique ID of the tool call. name: type: string description: The name of the tool that was run. server_label: type: string description: The label of the MCP server running the tool. type: type: string enum: - mcp_call description: The type of the item. Always mcp_call. error: type: string nullable: true description: The error from the tool call, if any. output: type: string nullable: true description: The output from the tool call. required: - arguments - id - name - server_label - type - type: object properties: type: type: string enum: - x_search_call required: - type description: > An array of content items generated by the model. - The length and order of items in the output array is dependent on the model's response. - Rather than accessing the first item in the output array and assuming it's an assistant message with the content generated by the model, you might consider using the output_text property where supported in SDKs. example: null output_text: type: string nullable: true description: >- SDK-only convenience property that contains the aggregated text output from all output_text items in the output array, if any are present. Supported in the Python and JavaScript SDKs. example: Hi! How’s your day going? parallel_tool_calls: type: boolean description: Whether to allow the model to run tool calls in parallel. example: false previous_response_id: type: string nullable: true description: >- The unique ID of the previous response to the model. Use this to create multi-turn conversations. example: null prompt: type: object nullable: true properties: id: type: string description: The unique identifier of the prompt template to use. variables: type: object nullable: true additionalProperties: nullable: true description: >- Optional map of values to substitute in for variables in your prompt. The substitution values can either be strings, or other Response input types like images or files. version: type: string nullable: true description: Optional version of the prompt template. required: - id description: Reference to a prompt template and its variables. example: null reasoning: type: object nullable: true properties: effort: type: string nullable: true enum: - none - low - medium - high description: >- Constrains effort on reasoning for reasoning models. Reducing reasoning effort can result in faster responses and fewer tokens used on reasoning in a response. summary: type: string nullable: true enum: - auto - concise - detailed description: >- A summary of the reasoning performed by the model. This can be useful for debugging and understanding the model's reasoning process. description: Configuration options for reasoning models. example: null service_tier: type: string nullable: true description: >- Specifies the processing type used for serving the request. example: null status: type: string enum: - completed - failed - in_progress - cancelled - queued - incomplete description: The status of the response generation. example: completed temperature: type: number nullable: true minimum: 0 maximum: 2 description: >- What sampling temperature to use, between 0 and 2. 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. example: null text: type: object nullable: true properties: 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: 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: nullable: true description: >- The schema for the response format, described as a JSON Schema object. type: type: string enum: - json_schema strict: type: boolean nullable: true 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 - schema - type description: >- JSON Schema response format. Used to generate structured JSON responses. description: >- An object specifying the format that the model must output. description: >- Configuration options for a text response from the model. Can be plain text or structured JSON data. tool_choice: anyOf: - type: string enum: - none - auto - required 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. - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 - computer_use_preview - code_interpreter - mcp - file_search - image_generation required: - type description: >- Indicates that the model should use a built-in tool to generate a response. - type: object properties: name: type: string description: The name of the function to call. type: type: string enum: - function description: For function calling, the type is always function. required: - name - type description: >- Use this option to force the model to call a specific function. - nullable: true description: >- How the model should select which tool (or tools) to use when generating a response. example: null tools: type: array nullable: true items: oneOf: - type: object properties: type: type: string enum: - web_search_preview - web_search_preview_2025_03_11 description: >- The type of the web search tool. One of web_search_preview or web_search_preview_2025_03_11. 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 nullable: true properties: type: type: string enum: - approximate description: >- The type of location approximation. Always approximate. city: type: string nullable: true description: >- Free text input for the city of the user, e.g. San Francisco. country: type: string nullable: true description: >- The two-letter ISO country code of the user, e.g. US. region: type: string nullable: true description: >- Free text input for the region of the user, e.g. California. timezone: type: string nullable: true description: >- The IANA timezone of the user, e.g. America/Los_Angeles. required: - type description: The user's location required: - type description: >- This tool searches the web for relevant results to use in a response. - type: object properties: display_height: type: integer description: The height of the computer display. display_width: type: integer description: The width of the computer display. environment: type: string enum: - windows - mac - linux - ubuntu - browser description: The type of computer environment to control. type: type: string enum: - computer_use_preview description: >- The type of the computer use tool. Always computer_use_preview. required: - display_height - display_width - environment - type description: A tool that controls a virtual computer. - type: object properties: server_label: type: string description: >- A label for this MCP server, used to identify it in tool calls. server_url: type: string description: The URL for the MCP server. type: type: string enum: - mcp description: The type of the MCP tool. Always mcp. allowed_tools: anyOf: - type: array items: type: string description: A string array of allowed tool names. - type: object properties: tool_names: type: array items: type: string description: List of allowed tool names. description: >- A filter object to specify which tools are allowed. - nullable: true description: List of allowed tool names or a filter object. headers: type: object nullable: true additionalProperties: type: string description: >- Optional HTTP headers to send to the MCP server. Use for authentication or other purposes. require_approval: anyOf: - type: string enum: - always - never - type: object properties: always: type: object properties: tool_names: type: array items: type: string description: List of tools that require approval. description: >- A list of tools that always require approval. never: type: object properties: tool_names: type: array items: type: string description: >- List of tools that do not require approval. description: >- A list of tools that never require approval. - nullable: true description: >- Specify which of the MCP server's tools require approval. required: - server_label - server_url - type description: >- Give the model access to additional tools via remote Model Context Protocol (MCP) servers. - type: object properties: type: type: string enum: - code_interpreter description: >- The type of the code interpreter tool. Always code_interpreter. container: anyOf: - type: string - type: object properties: type: type: string enum: - auto required: - type description: The container ID. required: - type - container description: >- A tool that runs Python code to help generate a response to a prompt. - type: object properties: type: type: string enum: - local_shell description: >- The type of the local shell tool. Always local_shell. required: - type description: >- A tool that allows the model to execute shell commands in a local environment. - type: object properties: name: type: string description: The name of the function to call. parameters: type: object nullable: true additionalProperties: nullable: true description: >- A JSON schema object describing the parameters of the function. strict: type: boolean nullable: true description: Whether to enforce strict parameter validation. type: type: string enum: - function description: The type of the function tool. Always function. description: type: string nullable: true description: >- A description of the function. Used by the model to determine whether or not to call the function. required: - name - type - type: object properties: type: type: string enum: - image_generation background: type: string enum: - transparent - opaque - auto input_image_mask: type: object properties: file_id: type: string image_url: type: string model: type: string enum: - gpt-image-1 moderation: type: string enum: - auto - low output_compression: type: number output_format: type: string enum: - png - webp - jpeg partial_images: type: integer minimum: 0 maximum: 3 quality: type: string enum: - low - medium - high - auto size: type: string enum: - 1024x1024 - 1024x1536 - 1536x1024 - auto required: - type description: >- An array of tools the model may call while generating a response. You can specify which tool to use by setting the tool_choice parameter. example: null top_p: type: number nullable: true 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. We generally recommend altering this or temperature but not both. example: null truncation: type: string nullable: true enum: - auto - disabled description: > The truncation strategy to use for the model response. - auto: If the context of this response and previous ones exceeds the model's context window size, the model will truncate the response to fit the context window by dropping input items in the middle of the conversation. - disabled (default): If a model response will exceed the context window size for a model, the request will fail with a 400 error. example: null usage: type: object properties: input_tokens: type: integer description: The number of input tokens. example: 137 input_tokens_details: type: object nullable: true properties: cached_tokens: type: integer description: >- The number of tokens that were retrieved from the cache. required: - cached_tokens description: A detailed breakdown of the input tokens. example: null output_tokens: type: integer description: The number of output tokens. example: 914 output_tokens_details: type: object nullable: true properties: reasoning_tokens: type: integer description: The number of reasoning tokens. required: - reasoning_tokens description: A detailed breakdown of the output tokens. example: null total_tokens: type: integer description: The total number of tokens used. example: 1051 required: - input_tokens - output_tokens - total_tokens description: >- Represents token usage details including input tokens, output tokens, a breakdown of output tokens, and the total tokens used. citations: type: array items: type: string format: uri server_side_tool_usage: type: object additionalProperties: type: integer minimum: 0 meta: type: object nullable: true properties: usage: type: object nullable: true 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: - created_at - id - model - object - parallel_tool_calls /v1/embeddings: post: operationId: _v1_embeddings requestBody: required: true content: application/json: schema: anyOf: - type: object properties: model: type: string enum: - text-embedding-3-small - openai/text-embedding-3-small - text-embedding-3-large - openai/text-embedding-3-large input: anyOf: - type: string minLength: 1 - type: array items: type: string minItems: 1 description: >- Input text to embed, encoded as a string or array of tokens. encoding_format: type: string enum: - float - base64 default: float description: The format in which to return the embeddings. dimensions: type: number nullable: true minimum: 1 maximum: 3072 description: >- The number of dimensions for the embedding. Default is 1024. required: - model - input title: >- text-embedding-3-small, openai/text-embedding-3-small, text-embedding-3-large, openai/text-embedding-3-large - type: object properties: model: type: string enum: - text-embedding-ada-002 - openai/text-embedding-ada-002 input: anyOf: - type: string minLength: 1 - type: array items: type: string minItems: 1 description: >- Input text to embed, encoded as a string or array of tokens. encoding_format: type: string enum: - float - base64 default: float description: The format in which to return the embeddings. required: - model - input title: text-embedding-ada-002, openai/text-embedding-ada-002 - type: object properties: model: type: string enum: - voyage-large-2-instruct - anthropic/voyage-large-2-instruct - voyage-finance-2 - anthropic/voyage-finance-2 - voyage-multilingual-2 - anthropic/voyage-multilingual-2 - voyage-law-2 - anthropic/voyage-law-2 - voyage-code-2 - anthropic/voyage-code-2 - voyage-large-2 - anthropic/voyage-large-2 - voyage-2 - anthropic/voyage-2 input: anyOf: - type: string minLength: 1 maxLength: 8000 - type: array items: type: string maxLength: 800 description: >- Input text to embed, encoded as a string or array of tokens. input_type: type: string enum: - document default: document description: The type of input data for the model. required: - model - input title: >- voyage-large-2-instruct, anthropic/voyage-large-2-instruct, voyage-finance-2, anthropic/voyage-finance-2, voyage-multilingual-2, anthropic/voyage-multilingual-2, voyage-law-2, anthropic/voyage-law-2, voyage-code-2, anthropic/voyage-code-2, voyage-large-2, anthropic/voyage-large-2, voyage-2, anthropic/voyage-2 - type: object properties: model: type: string enum: - text-multilingual-embedding-002 - google/text-multilingual-embedding-002 input: anyOf: - type: string minLength: 1 - type: array items: type: string minItems: 1 description: >- Input text to embed, encoded as a string or array of tokens. dimensions: type: number nullable: true minimum: 1 maximum: 768 description: >- The number of dimensions for the embedding. Default is 1024. auto_truncate: type: boolean default: true description: >- If enabled, this parameter automatically truncates the input text to fit within the model’s maximum token limit. It helps ensure that longer texts are processed without errors. task_type: type: string enum: - RETRIEVAL_QUERY - RETRIEVAL_DOCUMENT - SEMANTIC_SIMILARITY - CLASSIFICATION - CLUSTERING - QUESTION_ANSWERING - FACT_VERIFICATION description: >- Optional task type for which the embeddings will be used. title: type: string description: >- An optional title for the text. Only applicable when task_type is RETRIEVAL_DOCUMENT. Note: Specifying a title for RETRIEVAL_DOCUMENT provides better quality embeddings for retrieval. required: - model - input title: >- text-multilingual-embedding-002, google/text-multilingual-embedding-002 - type: object properties: model: type: string enum: - text-embedding-v4 - alibaba/text-embedding-v4 - text-embedding-v3 - alibaba/text-embedding-v3 - alibaba/qwen-text-embedding-v4 - alibaba/qwen-text-embedding-v3 input: anyOf: - type: string minLength: 1 - type: array items: type: string minItems: 1 description: >- Input text to embed, encoded as a string or array of tokens. dimensions: type: integer minimum: 64 maximum: 2048 default: 1024 description: >- The number of dimensions for the embedding. Default is 1024. required: - model - input title: >- text-embedding-v4, alibaba/text-embedding-v4, text-embedding-v3, alibaba/text-embedding-v3, alibaba/qwen-text-embedding-v4, alibaba/qwen-text-embedding-v3 - type: object properties: model: type: string enum: - test/dummy-embeddings input: anyOf: - type: string minLength: 1 - type: array items: type: string minItems: 1 encoding_format: type: string enum: - float - base64 dimensions: type: number minimum: 1 maximum: 3072 test: type: object properties: credits: type: number delay: type: number errorStatus: type: number required: - model - input title: test/dummy-embeddings responses: '200': content: application/json: schema: type: object properties: object: type: string enum: - object data: type: array items: type: object properties: object: type: string enum: - embedding index: type: number embedding: type: array items: type: number required: - object - index - embedding model: type: string usage: type: object properties: total_tokens: type: number nullable: true meta: type: object nullable: true properties: usage: type: object nullable: true 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 required: - object - data - model - usage /v2/video/generations: post: operationId: _v2_video_generations requestBody: required: true content: application/json: schema: anyOf: - type: object properties: model: type: string enum: - sora-2-t2v - openai/sora-2-t2v - sora-2 - openai/sora-2 prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. resolution: type: string enum: - 720p default: 720p description: >- The resolution of the output video, where the number refers to the short side in pixels. aspect_ratio: type: string enum: - '16:9' - '9:16' default: '16:9' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 4 - 8 - 12 default: '4' required: - model - prompt title: sora-2-t2v, openai/sora-2-t2v, sora-2, openai/sora-2 - type: object properties: model: type: string enum: - sora-2-i2v - openai/sora-2-i2v prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A URL or a Base64-encoded image file used as the initial frame for video generation. The image dimensions must match the selected video resolution and aspect ratio. Supported configurations include: 720p with aspect ratios: - 16:9 — 1280x720 - 9:16 — 720x1280 1080p with aspect ratios: - 16:9 — 1792x1024 - 9:16 — 1024x1792 resolution: type: string enum: - 720p default: 720p description: >- The resolution of the output video, where the number refers to the short side in pixels. aspect_ratio: type: string enum: - '16:9' - '9:16' default: '16:9' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 4 - 8 - 12 default: '4' required: - model - prompt - image_url title: sora-2-i2v, openai/sora-2-i2v - type: object properties: model: type: string enum: - sora-2-pro-t2v - openai/sora-2-pro-t2v - sora-2-pro - openai/sora-2-pro prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. resolution: type: string enum: - 720p - 1080p default: 1080p description: >- The resolution of the output video, where the number refers to the short side in pixels. aspect_ratio: type: string enum: - '16:9' - '9:16' default: '16:9' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 4 - 8 - 12 default: '4' required: - model - prompt title: >- sora-2-pro-t2v, openai/sora-2-pro-t2v, sora-2-pro, openai/sora-2-pro - type: object properties: model: type: string enum: - sora-2-pro-i2v - openai/sora-2-pro-i2v prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A URL or a Base64-encoded image file used as the initial frame for video generation. The image dimensions must match the selected video resolution and aspect ratio. Supported configurations include: 720p with aspect ratios: - 16:9 — 1280x720 - 9:16 — 720x1280 1080p with aspect ratios: - 16:9 — 1792x1024 - 9:16 — 1024x1792 resolution: type: string enum: - 720p - 1080p default: 1080p description: >- The resolution of the output video, where the number refers to the short side in pixels. aspect_ratio: type: string enum: - '16:9' - '9:16' default: '16:9' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 4 - 8 - 12 default: '4' required: - model - prompt - image_url title: sora-2-pro-i2v, openai/sora-2-pro-i2v - type: object properties: model: type: string enum: - bytedance/seedance-1-0-pro - bytedance/seedance-1-0-pro-fast - bytedance/seedance-1-0-pro-t2v - bytedance/seedance-1-0-pro-i2v image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. resolution: type: string enum: - 480p - 720p - 1080p default: 1080p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 watermark: type: boolean default: false description: Whether the video contains a watermark. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. camerafixed: type: boolean default: false description: >- Whether to fix the camera position. - true: Fix the camera position. The platform will append instructions to fix the camera position in the user's prompt, but the actual effect is not guaranteed. - false: Do not fix the camera position. last_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. required: - model - prompt title: >- bytedance/seedance-1-0-pro, bytedance/seedance-1-0-pro-fast, bytedance/seedance-1-0-pro-t2v, bytedance/seedance-1-0-pro-i2v - type: object properties: model: type: string enum: - bytedance/seedance-1-5-pro prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. last_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. aspect_ratio: type: string enum: - '16:9' - '4:3' - '1:1' - '3:4' - '9:16' - '21:9' - adaptive default: '16:9' description: The aspect ratio of the generated video. resolution: type: string enum: - 480p - 720p - 1080p default: 720p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: The length of the output video in seconds. enum: - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 seed: type: integer default: -1 description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. camera_fixed: type: boolean default: false description: >- Whether to fix the camera position. - true: Fix the camera position. The platform will append instructions to fix the camera position in the user's prompt, but the actual effect is not guaranteed. - false: Do not fix the camera position. watermark: type: boolean default: false description: Whether the video contains a watermark. generate_audio: type: boolean default: true description: Whether to generate audio for the video. required: - model - prompt title: bytedance/seedance-1-5-pro - type: object properties: model: type: string enum: - bytedance/dreamina-seedance-2-0 - bytedance/seedance-2-0 - bytedance/seedance-2.0/image-to-video - bytedance/seedance-2.0/reference-to-video - bytedance/seedance-2.0/text-to-video provider: type: string description: >- Provider routing override, pinning the request to one provider and disabling fallback. `auto` (default) uses the full Tencent Cloud VOD -> native ByteDance -> fal.ai chain. `tencent_vod` is the only provider that accepts reference images containing real people (it registers them as assets first); pinning `bytedance` or `fal` sends the images straight to a provider that rejects them with "the input image may contain real person". Case-insensitive. example: auto prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. last_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. audio_url: type: string format: uri description: >- URL, Base64-encoded string or asset ID of the audio. The duration of the audio file specified in the parameter must not exceed 15.2 seconds. If audio is provided, at least one reference image or video is required. video_url: type: string format: uri description: >- The public URL of the video. Only video URLs are supported. image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 9 description: >- Reference images to guide video generation. Refer to them in the prompt as @Image1, @Image2, etc. audio_urls: type: array items: type: string format: uri minItems: 1 maxItems: 3 description: >- Reference audio to guide video generation. Refer to them in the prompt as @Audio1, @Audio2, etc. Supported formats: MP3, WAV. Up to 3 files, combined duration must not exceed 15 seconds. If audio is provided, at least one reference image (image_urls) or video (video_urls) is required. video_urls: type: array items: type: string format: uri minItems: 1 maxItems: 3 description: >- Reference videos to guide video generation. Refer to them in the prompt as @Video1, @Video2, etc. Supported formats: MP4, MOV. Each video must be between ~480p (640x640) and ~720p (834x1112) in resolution. aspect_ratio: type: string enum: - '21:9' - '16:9' - '4:3' - '1:1' - '3:4' - '9:16' default: '16:9' description: >- The aspect ratio of the generated video. Defaults to 16:9 for text-to-video and reference-to-video requests. Must be omitted for first-frame / first-last-frame generation (`image_url`): the output aspect ratio follows the input image. resolution: type: string enum: - 480p - 720p - 1080p - 4k default: 720p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: The length of the output video in seconds. enum: - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 default: '5' generate_audio: type: boolean default: true description: Whether to generate audio for the video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. watermark: type: boolean default: false description: Whether the video contains a watermark. required: - model - prompt title: >- bytedance/dreamina-seedance-2-0, bytedance/seedance-2-0, bytedance/seedance-2.0/image-to-video, bytedance/seedance-2.0/reference-to-video, bytedance/seedance-2.0/text-to-video - type: object properties: model: type: string enum: - bytedance/dreamina-seedance-2-0-fast - bytedance/dreamina-seedance-2-0-mini - bytedance/seedance-2-0-fast - bytedance/seedance-2.0/fast/image-to-video - bytedance/seedance-2.0/fast/reference-to-video - bytedance/seedance-2.0/fast/text-to-video - bytedance/seedance-2-0-mini provider: type: string description: >- Provider routing override, pinning the request to one provider and disabling fallback. `auto` (default) uses the full Tencent Cloud VOD -> native ByteDance -> fal.ai chain. `tencent_vod` is the only provider that accepts reference images containing real people (it registers them as assets first); pinning `bytedance` or `fal` sends the images straight to a provider that rejects them with "the input image may contain real person". Case-insensitive. example: auto prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. last_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. audio_url: type: string format: uri description: >- URL, Base64-encoded string or asset ID of the audio. The duration of the audio file specified in the parameter must not exceed 15.2 seconds. If audio is provided, at least one reference image or video is required. video_url: type: string format: uri description: >- The public URL of the video. Only video URLs are supported. image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 9 description: >- Reference images to guide video generation. Refer to them in the prompt as @Image1, @Image2, etc. audio_urls: type: array items: type: string format: uri minItems: 1 maxItems: 3 description: >- Reference audio to guide video generation. Refer to them in the prompt as @Audio1, @Audio2, etc. Supported formats: MP3, WAV. Up to 3 files, combined duration must not exceed 15 seconds. If audio is provided, at least one reference image (image_urls) or video (video_urls) is required. video_urls: type: array items: type: string format: uri minItems: 1 maxItems: 3 description: >- Reference videos to guide video generation. Refer to them in the prompt as @Video1, @Video2, etc. Supported formats: MP4, MOV. Each video must be between ~480p (640x640) and ~720p (834x1112) in resolution. aspect_ratio: type: string enum: - '21:9' - '16:9' - '4:3' - '1:1' - '3:4' - '9:16' default: '16:9' description: >- The aspect ratio of the generated video. Defaults to 16:9 for text-to-video and reference-to-video requests. Must be omitted for first-frame / first-last-frame generation (`image_url`): the output aspect ratio follows the input image. resolution: type: string enum: - 480p - 720p default: 720p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: The length of the output video in seconds. enum: - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 default: '5' generate_audio: type: boolean default: true description: Whether to generate audio for the video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. watermark: type: boolean default: false description: Whether the video contains a watermark. required: - model - prompt title: >- bytedance/dreamina-seedance-2-0-fast, bytedance/dreamina-seedance-2-0-mini, bytedance/seedance-2-0-fast, bytedance/seedance-2.0/fast/image-to-video, bytedance/seedance-2.0/fast/reference-to-video, bytedance/seedance-2.0/fast/text-to-video, bytedance/seedance-2-0-mini - type: object properties: model: type: string enum: - bytedance/dreamina-seedance-2-5 - bytedance/seedance-2-5 - bytedance/seedance-2.5 provider: type: string description: >- Provider routing override, pinning the request to one provider and disabling fallback. Seedance 2.5 runs on native ByteDance only, so `auto` (default) and `bytedance` behave identically today. Unlike Seedance 2.0 there is no Tencent Cloud VOD link, so reference images containing real people are rejected upstream. Case-insensitive. example: auto prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. last_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. audio_url: type: string format: uri description: >- URL, Base64-encoded string or asset ID of the audio. The duration of the audio file specified in the parameter must not exceed 15.2 seconds. If audio is provided, at least one reference image or video is required. video_url: type: string format: uri description: >- The public URL of the video. Only video URLs are supported. image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 9 description: >- Reference images to guide video generation. Refer to them in the prompt as @Image1, @Image2, etc. audio_urls: type: array items: type: string format: uri minItems: 1 maxItems: 3 description: >- Reference audio to guide video generation. Refer to them in the prompt as @Audio1, @Audio2, etc. Supported formats: MP3, WAV. Up to 3 files, combined duration must not exceed 15 seconds. If audio is provided, at least one reference image (image_urls) or video (video_urls) is required. video_urls: type: array items: type: string format: uri minItems: 1 maxItems: 3 description: >- Reference videos to guide video generation. Refer to them in the prompt as @Video1, @Video2, etc. Supported formats: MP4, MOV. Each video must be between ~480p (640x640) and ~720p (834x1112) in resolution. aspect_ratio: type: string enum: - '21:9' - '16:9' - '4:3' - '1:1' - '3:4' - '9:16' default: '16:9' description: >- The aspect ratio of the generated video. Defaults to 16:9 for text-to-video and reference-to-video requests. Must be omitted for first-frame / first-last-frame generation (`image_url`): the output aspect ratio follows the input image. resolution: type: string enum: - 480p - 720p default: 720p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: The length of the output video in seconds. enum: - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 - 16 - 17 - 18 - 19 - 20 - 21 - 22 - 23 - 24 - 25 - 26 - 27 - 28 - 29 - 30 default: '5' generate_audio: type: boolean default: true description: Whether to generate audio for the video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. watermark: type: boolean default: false description: Whether the video contains a watermark. required: - model - prompt title: >- bytedance/dreamina-seedance-2-5, bytedance/seedance-2-5, bytedance/seedance-2.5 - type: object properties: model: type: string enum: - veo-2.0-generate-001 - google/veo-2.0-generate-001 - veo2 - google/veo2 prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 6 - 7 - 8 default: '5' aspect_ratio: type: string enum: - '16:9' - '9:16' description: The aspect ratio of the generated video. negative_prompt: type: string description: >- The description of elements to avoid in the generated video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. enhance_prompt: type: boolean default: true description: Whether to enhance the video generation. required: - model - prompt title: >- veo-2.0-generate-001, google/veo-2.0-generate-001, veo2, google/veo2 - type: object properties: model: type: string enum: - veo-3.0-fast-generate-001 - google/veo-3.0-fast-generate-001 - veo-3.0-generate-001 - google/veo-3.0-generate-001 - google/veo3 - google/veo-3.0-fast prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. duration: type: integer description: The length of the output video in seconds. enum: - 4 - 6 - 8 default: '8' aspect_ratio: type: string enum: - '16:9' - '9:16' description: The aspect ratio of the generated video. resolution: type: string enum: - 720P - 1080P default: 720P description: >- The resolution of the output video, where the number refers to the short side in pixels. negative_prompt: type: string description: >- The description of elements to avoid in the generated video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. enhance_prompt: type: boolean default: true description: Whether to enhance the video generation. generate_audio: type: boolean default: true description: Whether to generate audio for the video. required: - model - prompt title: >- veo-3.0-fast-generate-001, google/veo-3.0-fast-generate-001, veo-3.0-generate-001, google/veo-3.0-generate-001, google/veo3, google/veo-3.0-fast - type: object properties: model: type: string enum: - veo-3.1-lite-generate-001 - google/veo-3.1-lite-generate-001 - google/veo-3-1-lite-generate-preview provider: type: string description: >- Provider routing override. `google` runs native Google with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Google -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the first frame of the video. Should be 720p or higher resolution. last_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. Should be 720p or higher resolution. aspect_ratio: type: string enum: - '16:9' - '9:16' default: '16:9' description: The aspect ratio of the generated video. resolution: type: string enum: - 720P - 1080P default: 720P description: >- The resolution of the output video, where the number refers to the short side in pixels. duration: type: integer description: The length of the output video in seconds. enum: - 4 - 6 - 8 default: '8' generate_audio: type: boolean default: true description: Whether to generate audio for the video. person_generation: type: string enum: - dont_allow - allow_adult default: allow_adult description: Allow generation of people. required: - model - prompt title: >- veo-3.1-lite-generate-001, google/veo-3.1-lite-generate-001, google/veo-3-1-lite-generate-preview - type: object properties: model: type: string enum: - veo-3.1-generate-001 - google/veo-3.1-generate-001 - veo-3.1-fast-generate-001 - google/veo-3.1-fast-generate-001 - google/veo-3.1-t2v - google/veo-3.1-i2v - google/veo-3.1-t2v-fast - google/veo-3.1-i2v-fast - google/veo-3.1-first-last-image-to-video - google/veo-3.1-first-last-image-to-video-fast - google/veo3-1-extend-video - google/veo3-1-fast-extend-video provider: type: string description: >- Provider routing override. `google` runs native Google with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Google -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the first frame of the video. Should be 720p or higher resolution. last_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. Should be 720p or higher resolution. video_url: type: string format: uri description: >- URL of a Veo-generated MP4 to extend. Extension output is always 7 seconds; `duration` is forced to 7 when this field is set. aspect_ratio: type: string enum: - '16:9' - '9:16' default: '16:9' description: The aspect ratio of the generated video. resolution: type: string enum: - 720P - 1080P - 4K default: 720P description: >- The resolution of the output video, where the number refers to the short side in pixels. duration: type: integer description: >- The length of the output video in seconds. When `video_url` is set (video extension), Google always returns a fixed 7-second extension; `duration` is forced to 7 and other values are ignored. enum: - 4 - 6 - 8 default: '8' generate_audio: type: boolean default: true description: Whether to generate audio for the video. person_generation: type: string enum: - dont_allow - allow_adult default: allow_adult description: Allow generation of people. required: - model - prompt title: >- veo-3.1-generate-001, google/veo-3.1-generate-001, veo-3.1-fast-generate-001, google/veo-3.1-fast-generate-001, google/veo-3.1-t2v, google/veo-3.1-i2v, google/veo-3.1-t2v-fast, google/veo-3.1-i2v-fast, google/veo-3.1-first-last-image-to-video, google/veo-3.1-first-last-image-to-video-fast, google/veo3-1-extend-video, google/veo3-1-fast-extend-video - type: object properties: model: type: string enum: - gemini-omni-flash-preview - google/gemini-omni-flash-preview prompt: type: string minLength: 1 description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- Image URL, gs:// URI, or base64 data URI. Used as the first frame for image_to_video unless the prompt tags it as a reference. image_urls: type: array items: type: string format: uri maxItems: 6 description: >- Reference image URLs, gs:// URIs, or base64 data URIs. Use prompt tags such as to bind image roles. video_url: type: string format: uri description: >- Video URL, gs:// URI, or base64 data URI for edit workflows. audio_url: type: string format: uri description: >- Audio URL, gs:// URI, or base64 data URI for multimodal prompting. previous_interaction_id: type: string description: >- Gemini Interactions API id from a previous Omni generation, used for conversational edits. task: type: string enum: - text_to_video - image_to_video - reference_to_video - edit description: >- Gemini Omni video task. Defaults are inferred from the supplied media inputs. aspect_ratio: type: string enum: - '16:9' - '9:16' description: The aspect ratio of the generated video. delivery: type: string enum: - uri default: uri description: Gemini Omni video response delivery mode. required: - model - prompt title: gemini-omni-flash-preview, google/gemini-omni-flash-preview - type: object properties: model: type: string enum: - gemini-omni-1.1-flash - google/gemini-omni-1.1-flash prompt: type: string minLength: 1 description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- Image URL, gs:// URI, or base64 data URI. Used as the first frame for image_to_video unless the prompt tags it as a reference. image_urls: type: array items: type: string format: uri maxItems: 6 description: >- Reference image URLs, gs:// URIs, or base64 data URIs. Use prompt tags such as to bind image roles. Pass exactly two images with task=image_to_video for first/last frame interpolation. video_url: type: string format: uri description: >- Video URL, gs:// URI, or base64 data URI for edit and extend workflows. audio_url: type: string format: uri description: >- Audio URL, gs:// URI, or base64 data URI for multimodal prompting. previous_interaction_id: type: string description: >- Gemini Interactions API id from a previous Omni generation, used for conversational edits. task: type: string enum: - text_to_video - image_to_video - reference_to_video - edit - extend description: >- Gemini Omni video task. Defaults are inferred from the supplied media inputs. aspect_ratio: type: string enum: - '16:9' - '9:16' description: The aspect ratio of the generated video. resolution: type: string enum: - 360p - 720p - 1080p - 4k description: >- The resolution of the output video, where the number refers to the short side in pixels. duration: type: integer description: The length of the output video in seconds. enum: - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 default: '8' delivery: type: string enum: - uri default: uri description: Gemini Omni video response delivery mode. required: - model - prompt title: gemini-omni-1.1-flash, google/gemini-omni-1.1-flash - type: object properties: model: type: string enum: - google/veo-3.1-reference-to-video - veo3.1/reference-to-video prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 3 description: >- URL of the input image to animate. Should be 720p or higher resolution. duration: type: integer description: The length of the output video in seconds. enum: - 8 provider: type: string description: >- Provider routing override. `google` runs native Google with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Google -> fal.ai fallback chain. Case-insensitive. example: auto resolution: type: string enum: - 720p - 1080p default: 1080p description: >- The resolution of the output video, where the number refers to the short side in pixels. generate_audio: type: boolean default: true description: Whether to generate audio for the video. required: - model - prompt - image_urls title: google/veo-3.1-reference-to-video, veo3.1/reference-to-video - type: object properties: model: type: string enum: - veo2/image-to-video - google/veo2-image-to-video prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. tail_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 6 - 7 - 8 default: '5' aspect_ratio: type: string enum: - '16:9' - '9:16' description: The aspect ratio of the generated video. negative_prompt: type: string description: >- The description of elements to avoid in the generated video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. enhance_prompt: type: boolean default: true description: Whether to enhance the video generation. required: - model - prompt - image_url title: veo2/image-to-video, google/veo2-image-to-video - type: object properties: model: type: string enum: - google/veo-3.0-i2v - google/veo-3.0-i2v-fast prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. duration: type: integer description: The length of the output video in seconds. enum: - 4 - 6 - 8 default: '8' aspect_ratio: type: string enum: - '16:9' - '9:16' description: The aspect ratio of the generated video. resolution: type: string enum: - 720P - 1080P default: 720P description: >- The resolution of the output video, where the number refers to the short side in pixels. negative_prompt: type: string description: >- The description of elements to avoid in the generated video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. enhance_prompt: type: boolean default: true description: Whether to enhance the video generation. generate_audio: type: boolean default: true description: Whether to generate audio for the video. required: - model - prompt - image_url title: google/veo-3.0-i2v, google/veo-3.0-i2v-fast - type: object properties: model: type: string enum: - wan2.1-t2v-plus - alibaba/wan2.1-t2v-plus prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. resolution: type: string enum: - 720P default: 720P description: >- An enumeration where the short side of the video frame determines the resolution. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' - '4:3' - '3:4' default: '16:9' description: The aspect ratio of the generated video. negative_prompt: type: string description: >- The description of elements to avoid in the generated video. watermark: type: boolean default: false description: Whether the video contains a watermark. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. enhance_prompt: type: boolean default: true description: Whether to enable prompt expansion. required: - model - prompt title: wan2.1-t2v-plus, alibaba/wan2.1-t2v-plus - type: object properties: model: type: string enum: - wan2.1-t2v-turbo - alibaba/wan2.1-t2v-turbo prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. resolution: type: string enum: - 480P - 720P default: 720P description: >- An enumeration where the short side of the video frame determines the resolution. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' - '4:3' - '3:4' default: '16:9' description: The aspect ratio of the generated video. negative_prompt: type: string description: >- The description of elements to avoid in the generated video. watermark: type: boolean default: false description: Whether the video contains a watermark. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. enhance_prompt: type: boolean default: true description: Whether to enable prompt expansion. required: - model - prompt title: wan2.1-t2v-turbo, alibaba/wan2.1-t2v-turbo - type: object properties: model: type: string enum: - wan2.2-i2v-plus - alibaba/wan2.2-i2v-plus prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. resolution: type: string enum: - 480P - 1080P default: 1080P description: >- An enumeration where the short side of the video frame determines the resolution. negative_prompt: type: string description: >- The description of elements to avoid in the generated video. watermark: type: boolean default: false description: Whether the video contains a watermark. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. enhance_prompt: type: boolean default: true description: Whether to enable prompt expansion. required: - model - prompt - image_url title: wan2.2-i2v-plus, alibaba/wan2.2-i2v-plus - type: object properties: model: type: string enum: - wan2.2-t2v-plus - alibaba/wan2.2-t2v-plus prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. resolution: type: string enum: - 480P - 1080P default: 1080P description: >- An enumeration where the short side of the video frame determines the resolution. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' - '4:3' - '3:4' default: '16:9' description: The aspect ratio of the generated video. negative_prompt: type: string description: >- The description of elements to avoid in the generated video. watermark: type: boolean default: false description: Whether the video contains a watermark. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. enhance_prompt: type: boolean default: true description: Whether to enable prompt expansion. required: - model - prompt title: wan2.2-t2v-plus, alibaba/wan2.2-t2v-plus - type: object properties: model: type: string enum: - wan2.5-t2v-preview - alibaba/wan2.5-t2v-preview prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. resolution: type: string enum: - 480p - 720p - 1080p default: 1080p description: >- An enumeration where the short side of the video frame determines the resolution. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' default: '16:9' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '10' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. enhance_prompt: type: boolean default: true description: Whether to enable prompt expansion. required: - model - prompt title: wan2.5-t2v-preview, alibaba/wan2.5-t2v-preview - type: object properties: model: type: string enum: - wan2.5-i2v-preview - alibaba/wan2.5-i2v-preview prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. resolution: type: string enum: - 480p - 720p - 1080p default: 1080p description: >- An enumeration where the short side of the video frame determines the resolution. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' default: '16:9' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '10' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. enhance_prompt: type: boolean default: true description: Whether to enable prompt expansion. required: - model - prompt - image_url title: wan2.5-i2v-preview, alibaba/wan2.5-i2v-preview - type: object properties: model: type: string enum: - wan2.6-t2v - alibaba/wan2.6-t2v - wan2.7-t2v - alibaba/wan2.7-t2v - alibaba/wan-2-6-t2v - alibaba/wan-2-7-t2v prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. audio_url: type: string format: uri description: >- The URL of the audio file. The model will use this audio to generate the video. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' - '4:3' - '3:4' default: '16:9' description: The aspect ratio of the generated video. resolution: type: string enum: - 720p - 1080p default: 1080p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 - 15 default: '10' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. shot_type: type: string enum: - single - multi default: single description: >- Specifies the shot type of the generated video, that is, whether the video consists of a single continuous shot or multiple switched shots. This parameter takes effect only when "prompt_extend" is set to 'true': - single: (default) Outputs a single-shot video. - multi: Outputs a multi-shot video. generate_audio: type: boolean default: true description: >- Specifies whether to automatically add audio to the generated video. This parameter takes effect only when 'audio_url' is not provided. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. enhance_prompt: type: boolean default: true description: Whether to enable prompt expansion. required: - model - prompt title: >- wan2.6-t2v, alibaba/wan2.6-t2v, wan2.7-t2v, alibaba/wan2.7-t2v, alibaba/wan-2-6-t2v, alibaba/wan-2-7-t2v - type: object properties: model: type: string enum: - wan2.6-i2v - alibaba/wan2.6-i2v - alibaba/wan-2-6-i2v prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. audio_url: type: string format: uri description: >- The URL of the audio file. The model will use this audio to generate the video. resolution: type: string enum: - 720p - 1080p default: 1080p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 - 15 default: '10' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. shot_type: type: string enum: - single - multi default: single description: >- Specifies the shot type of the generated video, that is, whether the video consists of a single continuous shot or multiple switched shots. This parameter takes effect only when "prompt_extend" is set to 'true': - single: (default) Outputs a single-shot video. - multi: Outputs a multi-shot video. generate_audio: type: boolean default: true description: >- Specifies whether to automatically add audio to the generated video. This parameter takes effect only when 'audio_url' is not provided. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. enhance_prompt: type: boolean default: true description: Whether to enable prompt expansion. required: - model - prompt - image_url title: wan2.6-i2v, alibaba/wan2.6-i2v, alibaba/wan-2-6-i2v - type: object properties: model: type: string enum: - wan2.6-i2v-flash - alibaba/wan2.6-i2v-flash - alibaba/wan-2-6-image-to-video-flash prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. audio_url: type: string format: uri description: >- The URL of the audio file. The model will use this audio to generate the video. resolution: type: string enum: - 720p - 1080p default: 720p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: >- Duration of the generated video in seconds (up to 15 seconds for Flash model). enum: - 5 - 10 - 15 default: '10' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. shot_type: type: string enum: - single - multi default: single description: >- Specifies the shot type of the generated video, that is, whether the video consists of a single continuous shot or multiple switched shots. This parameter takes effect only when "prompt_extend" is set to 'true': - single: (default) Outputs a single-shot video. - multi: Outputs a multi-shot video. generate_audio: type: boolean default: true description: >- Specifies whether to automatically add audio to the generated video. This parameter takes effect only when 'audio_url' is not provided. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. enhance_prompt: type: boolean default: true description: Whether to enable prompt expansion. required: - model - prompt - image_url title: >- wan2.6-i2v-flash, alibaba/wan2.6-i2v-flash, alibaba/wan-2-6-image-to-video-flash - type: object properties: model: type: string enum: - wan2.6-r2v - alibaba/wan2.6-r2v - alibaba/wan-2-6-r2v prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. video_urls: type: array items: type: string format: uri minItems: 1 maxItems: 3 description: >- An array of URLs for the uploaded reference video files. This parameter is used to extract the character's appearance and voice (if any) to generate a video that matches the reference features. Each reference video must contain only one character. For example, character1 is a little girl and character2 is an alarm clock. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' - '4:3' - '3:4' default: '16:9' description: The aspect ratio of the generated video. resolution: type: string enum: - 720p - 1080p default: 1080p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 - 15 default: '10' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. shot_type: type: string enum: - single - multi default: single description: >- Specifies the shot type of the generated video, that is, whether the video consists of a single continuous shot or multiple switched shots. This parameter takes effect only when "prompt_extend" is set to 'true': - single: (default) Outputs a single-shot video. - multi: Outputs a multi-shot video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. enhance_prompt: type: boolean default: true description: Whether to enable prompt expansion. required: - model - prompt - video_urls title: wan2.6-r2v, alibaba/wan2.6-r2v, alibaba/wan-2-6-r2v - type: object properties: model: type: string enum: - wan2.7-i2v - alibaba/wan2.7-i2v - alibaba/wan-2-7-i2v prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. audio_url: type: string format: uri description: >- The URL of the audio file. The model will use this audio to generate the video. resolution: type: string enum: - 720p - 1080p default: 1080p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 - 15 default: '10' enable_prompt_expansion: type: boolean default: true description: Whether to enable prompt expansion. enhance_prompt: type: boolean default: true description: Whether to enable prompt expansion. negative_prompt: type: string maxLength: 500 description: >- The description of elements to avoid in the generated video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. watermark: type: boolean default: false description: Whether the video contains a watermark. required: - model - prompt - image_url title: wan2.7-i2v, alibaba/wan2.7-i2v, alibaba/wan-2-7-i2v - type: object properties: model: type: string enum: - wan2.7-r2v - alibaba/wan2.7-r2v - alibaba/wan-2-7-r2v prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. first_frame_image: type: string format: uri description: Optional first frame image URL. image_urls: type: array items: type: string format: uri maxItems: 5 description: Reference image URLs. video_urls: type: array items: type: string format: uri maxItems: 5 description: Reference video URLs. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' - '4:3' - '3:4' default: '16:9' description: The aspect ratio of the generated video. resolution: type: string enum: - 720p - 1080p default: 1080p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 - 15 default: '10' enhance_prompt: type: boolean default: true description: Whether to enable prompt expansion. negative_prompt: type: string maxLength: 500 description: >- The description of elements to avoid in the generated video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. watermark: type: boolean default: false description: Whether the video contains a watermark. required: - model - prompt title: wan2.7-r2v, alibaba/wan2.7-r2v, alibaba/wan-2-7-r2v - type: object properties: model: type: string enum: - wan3.0-video - alibaba/wan3.0-video - alibaba/wan-3-0-video prompt: type: string maxLength: 20000 description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- The URL of the image strictly used as the first frame of the video. Cannot be used together with reference media, file_url, or link_url. last_image_url: type: string format: uri description: >- The URL of the image strictly used as the last frame of the video. Requires image_url. reference_image_urls: type: array items: type: string format: uri maxItems: 10 description: Array of image URLs for multi-image-to-video generation. video_urls: type: array items: type: string format: uri maxItems: 5 description: >- Reference video URLs. Up to 5 clips with a total duration of no more than 15 seconds. audio_urls: type: array items: type: string format: uri maxItems: 5 description: >- Reference audio URLs. Up to 5 clips with a total duration of no more than 15 seconds. file_url: type: string format: uri description: >- The URL of a document (docx, doc, xlsx, xls, pptx, ppt, pdf, txt, key, pages, numbers, md) the model uses to generate the video. Cannot be used together with link_url. link_url: type: string format: uri description: >- The URL of a publicly accessible web page the model uses to generate the video. Cannot be used together with file_url. aspect_ratio: type: string enum: - adaptive - '16:9' - '4:3' - '1:1' - '3:4' - '9:16' default: adaptive description: The aspect ratio of the generated video. resolution: type: string enum: - 480p - 720p - 1080p default: 1080p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: >- The length of the output video in seconds, from 2 to 30. When reference videos are provided, the total input video duration plus the output video duration must not exceed 30 seconds. default: 5 generate_audio: type: boolean default: true description: Specifies whether the output video contains audio. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. watermark: type: boolean default: false description: Whether the video contains a watermark. required: - model - prompt title: wan3.0-video, alibaba/wan3.0-video, alibaba/wan-3-0-video - type: object properties: model: type: string enum: - custom:happyhorse-1.0 - alibaba/custom:happyhorse-1.0 - happyhorse-1.0-t2v - alibaba/happyhorse-1.0-t2v - happyhorse-1.0-i2v - alibaba/happyhorse-1.0-i2v - happyhorse-1.0-r2v - alibaba/happyhorse-1.0-r2v - happyhorse-1.0-video-edit - alibaba/happyhorse-1.0-video-edit - alibaba/happyhorse-1-0 prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. reference_image_urls: type: array items: type: string format: uri maxItems: 9 description: Array of image URLs for multi-image-to-video generation. video_url: type: string format: uri description: >- A HTTPS URL pointing to a video or a data URI containing a video. This video will be used as a reference during generation. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' - '4:3' - '3:4' default: '16:9' description: The aspect ratio of the generated video. resolution: type: string enum: - 720p - 1080p default: 1080p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: >- The length of the output video in seconds. The option does not work if a video reference is provided. - If the input video is 15 seconds or shorter, the output video has the same duration as the input. - If the input video is longer than 15 seconds, the system automatically uses only the first 15 seconds, so the maximum output duration is 15 seconds. enum: - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 default: '10' audio_setting: type: string enum: - auto - origin default: auto description: >- Audio control. Works only if a video reference is provided. - auto (default): Determined by the model. - origin: Preserves the original audio from the input video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. watermark: type: boolean default: false description: Whether the video contains a watermark. required: - model - prompt title: >- custom:happyhorse-1.0, alibaba/custom:happyhorse-1.0, happyhorse-1.0-t2v, alibaba/happyhorse-1.0-t2v, happyhorse-1.0-i2v, alibaba/happyhorse-1.0-i2v, happyhorse-1.0-r2v, alibaba/happyhorse-1.0-r2v, happyhorse-1.0-video-edit, alibaba/happyhorse-1.0-video-edit, alibaba/happyhorse-1-0 - type: object properties: model: type: string enum: - happyhorse-1.1-t2v - alibaba/happyhorse-1.1-t2v - alibaba/happyhorse-1-1 - alibaba/happyhorse-1-1-t2v prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' - '4:3' - '3:4' default: '16:9' description: The aspect ratio of the generated video. resolution: type: string enum: - 720p - 1080p default: 1080p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: The length of the output video in seconds. enum: - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 default: '10' seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. watermark: type: boolean default: false description: Whether the video contains a watermark. required: - model - prompt title: >- happyhorse-1.1-t2v, alibaba/happyhorse-1.1-t2v, alibaba/happyhorse-1-1, alibaba/happyhorse-1-1-t2v - type: object properties: model: type: string enum: - happyhorse-1.1-i2v - alibaba/happyhorse-1.1-i2v - alibaba/happyhorse-1-1-i2v prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' - '4:3' - '3:4' default: '16:9' description: The aspect ratio of the generated video. resolution: type: string enum: - 720p - 1080p default: 1080p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: The length of the output video in seconds. enum: - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 default: '10' seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. watermark: type: boolean default: false description: Whether the video contains a watermark. required: - model - prompt - image_url title: >- happyhorse-1.1-i2v, alibaba/happyhorse-1.1-i2v, alibaba/happyhorse-1-1-i2v - type: object properties: model: type: string enum: - happyhorse-1.1-r2v - alibaba/happyhorse-1.1-r2v - alibaba/happyhorse-1-1-r2v prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. reference_image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 9 description: Array of image URLs for multi-image-to-video generation. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' - '4:3' - '3:4' default: '16:9' description: The aspect ratio of the generated video. resolution: type: string enum: - 720p - 1080p default: 1080p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: The length of the output video in seconds. enum: - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 default: '10' seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. watermark: type: boolean default: false description: Whether the video contains a watermark. required: - model - prompt - reference_image_urls title: >- happyhorse-1.1-r2v, alibaba/happyhorse-1.1-r2v, alibaba/happyhorse-1-1-r2v - type: object properties: model: type: string enum: - custom:happyhorse-1.1 - alibaba/custom:happyhorse-1.1 prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. reference_image_urls: type: array items: type: string format: uri maxItems: 9 description: Array of image URLs for multi-image-to-video generation. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' - '4:3' - '3:4' default: '16:9' description: The aspect ratio of the generated video. resolution: type: string enum: - 720p - 1080p default: 1080p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: The length of the output video in seconds. enum: - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 default: '10' seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. watermark: type: boolean default: false description: Whether the video contains a watermark. required: - model - prompt title: custom:happyhorse-1.1, alibaba/custom:happyhorse-1.1 - type: object properties: model: type: string enum: - alibaba/wan2.2-vace-fun-a14b-depth - alibaba/wan2.2-vace-fun-a14b-pose - wan-22-vace-fun-a14b/depth - wan-22-vace-fun-a14b/pose prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. video_url: type: string format: uri description: >- A HTTPS URL pointing to a video or a data URI containing a video. This video will be used as a reference during generation. negative_prompt: type: string default: >- letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards description: >- The description of elements to avoid in the generated video. match_input_num_frames: type: boolean num_frames: type: integer minimum: 17 maximum: 241 default: 81 description: Number of frames to generate. match_input_frames_per_second: type: boolean description: >- Whether to match the input video's frames per second (FPS). frames_per_second: type: integer minimum: 5 maximum: 30 default: 16 description: Frames per second of the generated video. resolution: type: string enum: - 480p - 580p - 720p default: 480p description: >- The resolution of the output video, where the number refers to the short side in pixels. aspect_ratio: type: string enum: - auto - '16:9' - '1:1' - '9:16' default: auto description: The aspect ratio of the generated video. num_inference_steps: type: integer default: 30 description: >- Number of inference steps for sampling. Higher values give better quality but take longer. guidance_scale: type: number default: 5 description: >- Classifier-free guidance scale. Controls prompt adherence / creativity. shift: type: number default: 5 description: >- Noise schedule shift parameter. Affects temporal dynamics. enable_safety_checker: type: boolean description: If set to true, the safety checker will be enabled. enable_prompt_expansion: type: boolean description: Whether to enable prompt expansion. preprocess: type: boolean description: Whether to preprocess the input video. acceleration: type: string enum: - none - regular default: regular description: Acceleration to use for inference. video_quality: type: string enum: - low - medium - high - maximum default: high description: The quality of the generated video. video_write_mode: type: string enum: - fast - balanced - small default: balanced description: The method used to write the video. num_interpolated_frames: type: integer description: >- Number of frames to interpolate between the original frames. temporal_downsample_factor: type: integer description: Temporal downsample factor for the video. enable_auto_downsample: type: boolean description: >- The minimum frames per second to downsample the video to. auto_downsample_min_fps: type: number default: 15 description: >- The minimum frames per second to downsample the video to. interpolator_model: type: string enum: - rife - film default: film description: >- The model to use for interpolation. Rife, or film are available. sync_mode: type: boolean description: >- The synchronization mode for audio and video. Loose or tight are available. required: - model - prompt - video_url title: >- alibaba/wan2.2-vace-fun-a14b-depth, alibaba/wan2.2-vace-fun-a14b-pose, wan-22-vace-fun-a14b/depth, wan-22-vace-fun-a14b/pose - type: object properties: model: type: string enum: - alibaba/wan2.2-vace-fun-a14b-inpainting - wan-22-vace-fun-a14b/inpainting prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. video_url: type: string format: uri description: >- A HTTPS URL pointing to a video or a data URI containing a video. This video will be used as a reference during generation. negative_prompt: type: string default: >- letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards description: >- The description of elements to avoid in the generated video. match_input_num_frames: type: boolean num_frames: type: integer minimum: 17 maximum: 241 default: 81 description: Number of frames to generate. match_input_frames_per_second: type: boolean description: >- Whether to match the input video's frames per second (FPS). frames_per_second: type: integer minimum: 5 maximum: 30 default: 16 description: Frames per second of the generated video. resolution: type: string enum: - 480p - 580p - 720p default: 480p description: >- The resolution of the output video, where the number refers to the short side in pixels. aspect_ratio: type: string enum: - auto - '16:9' - '1:1' - '9:16' default: auto description: The aspect ratio of the generated video. num_inference_steps: type: integer default: 30 description: >- Number of inference steps for sampling. Higher values give better quality but take longer. guidance_scale: type: number default: 5 description: >- Classifier-free guidance scale. Controls prompt adherence / creativity. shift: type: number default: 5 description: >- Noise schedule shift parameter. Affects temporal dynamics. enable_safety_checker: type: boolean description: If set to true, the safety checker will be enabled. enable_prompt_expansion: type: boolean description: Whether to enable prompt expansion. preprocess: type: boolean description: Whether to preprocess the input video. acceleration: type: string enum: - none - regular default: regular description: Acceleration to use for inference. video_quality: type: string enum: - low - medium - high - maximum default: high description: The quality of the generated video. video_write_mode: type: string enum: - fast - balanced - small default: balanced description: The method used to write the video. num_interpolated_frames: type: integer description: >- Number of frames to interpolate between the original frames. temporal_downsample_factor: type: integer description: Temporal downsample factor for the video. enable_auto_downsample: type: boolean description: >- The minimum frames per second to downsample the video to. auto_downsample_min_fps: type: number default: 15 description: >- The minimum frames per second to downsample the video to. interpolator_model: type: string enum: - rife - film default: film description: >- The model to use for interpolation. Rife, or film are available. sync_mode: type: boolean description: >- The synchronization mode for audio and video. Loose or tight are available. image_list: type: array items: type: string format: uri description: Array of image URLs for multi-image-to-video generation. mask_video_url: type: string format: uri description: URL to the source mask file required: - model - prompt - video_url title: >- alibaba/wan2.2-vace-fun-a14b-inpainting, wan-22-vace-fun-a14b/inpainting - type: object properties: model: type: string enum: - alibaba/wan2.2-vace-fun-a14b-outpainting - wan-22-vace-fun-a14b/outpainting prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. video_url: type: string format: uri description: >- A HTTPS URL pointing to a video or a data URI containing a video. This video will be used as a reference during generation. negative_prompt: type: string default: >- letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards description: >- The description of elements to avoid in the generated video. match_input_num_frames: type: boolean num_frames: type: integer minimum: 17 maximum: 241 default: 81 description: Number of frames to generate. match_input_frames_per_second: type: boolean description: >- Whether to match the input video's frames per second (FPS). frames_per_second: type: integer minimum: 5 maximum: 30 default: 16 description: Frames per second of the generated video. resolution: type: string enum: - 480p - 580p - 720p default: 480p description: >- The resolution of the output video, where the number refers to the short side in pixels. aspect_ratio: type: string enum: - auto - '16:9' - '1:1' - '9:16' default: auto description: The aspect ratio of the generated video. num_inference_steps: type: integer default: 30 description: >- Number of inference steps for sampling. Higher values give better quality but take longer. guidance_scale: type: number default: 5 description: >- Classifier-free guidance scale. Controls prompt adherence / creativity. shift: type: number default: 5 description: >- Noise schedule shift parameter. Affects temporal dynamics. enable_safety_checker: type: boolean description: If set to true, the safety checker will be enabled. enable_prompt_expansion: type: boolean description: Whether to enable prompt expansion. preprocess: type: boolean description: Whether to preprocess the input video. acceleration: type: string enum: - none - regular default: regular description: Acceleration to use for inference. video_quality: type: string enum: - low - medium - high - maximum default: high description: The quality of the generated video. video_write_mode: type: string enum: - fast - balanced - small default: balanced description: The method used to write the video. num_interpolated_frames: type: integer description: >- Number of frames to interpolate between the original frames. temporal_downsample_factor: type: integer description: Temporal downsample factor for the video. enable_auto_downsample: type: boolean description: >- The minimum frames per second to downsample the video to. auto_downsample_min_fps: type: number default: 15 description: >- The minimum frames per second to downsample the video to. interpolator_model: type: string enum: - rife - film default: film description: >- The model to use for interpolation. Rife, or film are available. sync_mode: type: boolean description: >- The synchronization mode for audio and video. Loose or tight are available. expand_left: type: boolean default: true description: Whether to expand the video to the left expand_right: type: boolean default: true description: Whether to expand the video to the right expand_top: type: boolean default: true description: Whether to expand the video to the top expand_bottom: type: boolean default: true description: Whether to expand the video to the bottom expand_ratio: type: number default: 0.25 description: >- Amount of expansion. This is a float value between 0 and 1, where 0.25 adds 25% to the original video size on the specified sides required: - model - prompt - video_url title: >- alibaba/wan2.2-vace-fun-a14b-outpainting, wan-22-vace-fun-a14b/outpainting - type: object properties: model: type: string enum: - alibaba/wan2.2-vace-fun-a14b-reframe - wan-22-vace-fun-a14b/reframe prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. video_url: type: string format: uri description: >- A HTTPS URL pointing to a video or a data URI containing a video. This video will be used as a reference during generation. negative_prompt: type: string default: >- letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwards description: >- The description of elements to avoid in the generated video. match_input_num_frames: type: boolean num_frames: type: integer minimum: 17 maximum: 241 default: 81 description: Number of frames to generate. match_input_frames_per_second: type: boolean description: >- Whether to match the input video's frames per second (FPS). frames_per_second: type: integer minimum: 5 maximum: 30 default: 16 description: Frames per second of the generated video. resolution: type: string enum: - 480p - 580p - 720p default: 480p description: >- The resolution of the output video, where the number refers to the short side in pixels. aspect_ratio: type: string enum: - auto - '16:9' - '1:1' - '9:16' default: auto description: The aspect ratio of the generated video. num_inference_steps: type: integer default: 30 description: >- Number of inference steps for sampling. Higher values give better quality but take longer. guidance_scale: type: number default: 5 description: >- Classifier-free guidance scale. Controls prompt adherence / creativity. shift: type: number default: 5 description: >- Noise schedule shift parameter. Affects temporal dynamics. enable_safety_checker: type: boolean description: If set to true, the safety checker will be enabled. enable_prompt_expansion: type: boolean description: Whether to enable prompt expansion. preprocess: type: boolean description: Whether to preprocess the input video. acceleration: type: string enum: - none - regular default: regular description: Acceleration to use for inference. video_quality: type: string enum: - low - medium - high - maximum default: high description: The quality of the generated video. video_write_mode: type: string enum: - fast - balanced - small default: balanced description: The method used to write the video. num_interpolated_frames: type: integer description: >- Number of frames to interpolate between the original frames. temporal_downsample_factor: type: integer description: Temporal downsample factor for the video. enable_auto_downsample: type: boolean description: >- The minimum frames per second to downsample the video to. auto_downsample_min_fps: type: number default: 15 description: >- The minimum frames per second to downsample the video to. interpolator_model: type: string enum: - rife - film default: film description: >- The model to use for interpolation. Rife, or film are available. sync_mode: type: boolean description: >- The synchronization mode for audio and video. Loose or tight are available. zoom_factor: type: number description: >- Zoom factor for the video. When this value is greater than 0, the video will be zoomed in by this factor (in relation to the canvas size,) cutting off the edges of the video. A value of 0 means no zoom trim_borders: type: boolean default: true description: Whether to trim borders from the video required: - model - video_url title: >- alibaba/wan2.2-vace-fun-a14b-reframe, wan-22-vace-fun-a14b/reframe - type: object properties: model: type: string enum: - alibaba/wan2.2-14b-animate-move - alibaba/wan2.2-14b-animate-replace - wan/v2.2-14b/animate/move - wan/v2.2-14b/animate/replace video_url: type: string format: uri description: >- A HTTPS URL pointing to a video or a data URI containing a video. This video will be used as a reference during generation. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image. If the input image does not match the chosen aspect ratio, it is resized and center cropped resolution: type: string enum: - 480p - 580p - 720p default: 480p description: >- The resolution of the output video, where the number refers to the short side in pixels. num_inference_steps: type: integer default: 20 description: >- Number of inference steps for sampling. Higher values give better quality but take longer enable_safety_checker: type: boolean description: If set to true, the safety checker will be enabled. shift: type: number default: 5 description: Shift value for the video. video_quality: type: string enum: - low - medium - high - maximum default: high description: The quality of the generated video. video_write_mode: type: string enum: - fast - balanced - small default: balanced description: >- The write mode of the output video. Faster write mode means faster results but larger file size, balanced write mode is a good compromise between speed and quality, and small write mode is the slowest but produces the smallest file size required: - model - video_url - image_url title: >- alibaba/wan2.2-14b-animate-move, alibaba/wan2.2-14b-animate-replace, wan/v2.2-14b/animate/move, wan/v2.2-14b/animate/replace - type: object properties: model: type: string enum: - test/dummy-video prompt: type: string minLength: 1 duration: type: integer minimum: 1 maximum: 10 default: 5 test: type: object properties: delay: type: number runningPolls: type: number errorStatus: type: number submitErrorStatus: type: number required: - model - prompt title: test/dummy-video - type: object properties: model: type: string enum: - video-01 prompt: type: string maxLength: 2000 description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the first frame for the video. Image specifications: - format must be JPG, JPEG, or PNG; - aspect ratio should be greater than 2:5 and less than 5:2; - the shorter side must exceed 300 pixels; - file size must not exceed 20MB. enhance_prompt: type: boolean default: true description: >- If True, the incoming prompt will be automatically optimized to improve generation quality when needed. For more precise control, set it to False — the model will then follow the instructions more strictly. required: - model - prompt title: video-01 - type: object properties: model: type: string enum: - video-01-live2d prompt: type: string maxLength: 2000 description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the first frame for the video. Image specifications: - format must be JPG, JPEG, or PNG; - aspect ratio should be greater than 2:5 and less than 5:2; - the shorter side must exceed 300 pixels; - file size must not exceed 20MB. required: true enhance_prompt: type: boolean default: true description: >- If True, the incoming prompt will be automatically optimized to improve generation quality when needed. For more precise control, set it to False — the model will then follow the instructions more strictly. required: - model - prompt - image_url title: video-01-live2d - type: object properties: model: type: string enum: - minimax/hailuo-02 prompt: type: string maxLength: 2000 description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the first frame for the video. Image specifications: - format must be JPG, JPEG, or PNG; - aspect ratio should be greater than 2:5 and less than 5:2; - the shorter side must exceed 300 pixels; - file size must not exceed 20MB. last_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. resolution: type: string enum: - 768P - 1080P default: 768P description: >- The dimensions of the video display. 1080p corresponds to 1920 x 1080 pixels, 768p corresponds to 1366 x 768 pixels. duration: type: integer description: >- The length of the output video in seconds. For 1080p resolution, only a duration of 6 seconds is supported enum: - 6 - 10 enhance_prompt: type: boolean default: true description: >- If True, the incoming prompt will be automatically optimized to improve generation quality when needed. For more precise control, set it to False — the model will then follow the instructions more strictly. fast_pretreatment: type: boolean default: false description: >- Reduces optimization time when enhance_prompt is enabled. required: - model - prompt title: minimax/hailuo-02 - type: object properties: model: type: string enum: - minimax/hailuo-2.3 prompt: type: string maxLength: 2000 description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the first frame for the video. Image specifications: - format must be JPG, JPEG, or PNG; - aspect ratio should be greater than 2:5 and less than 5:2; - the shorter side must exceed 300 pixels; - file size must not exceed 20MB. resolution: type: string enum: - 768P - 1080P default: 768P description: >- The dimensions of the video display. 1080p corresponds to 1920 x 1080 pixels, 768p corresponds to 1366 x 768 pixels. duration: type: integer description: >- The length of the output video in seconds. For 1080p resolution, only a duration of 6 seconds is supported enum: - 6 - 10 enhance_prompt: type: boolean default: true description: >- If True, the incoming prompt will be automatically optimized to improve generation quality when needed. For more precise control, set it to False — the model will then follow the instructions more strictly. fast_pretreatment: type: boolean default: false description: >- Reduces optimization time when enhance_prompt is enabled. required: - model - prompt title: minimax/hailuo-2.3 - type: object properties: model: type: string enum: - minimax/hailuo-2.3-fast prompt: type: string maxLength: 2000 description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the first frame for the video. Image specifications: - format must be JPG, JPEG, or PNG; - aspect ratio should be greater than 2:5 and less than 5:2; - the shorter side must exceed 300 pixels; - file size must not exceed 20MB. resolution: type: string enum: - 768P - 1080P default: 768P description: >- The dimensions of the video display. 1080p corresponds to 1920 x 1080 pixels, 768p corresponds to 1366 x 768 pixels. duration: type: integer description: >- The length of the output video in seconds. For 1080p resolution, only a duration of 6 seconds is supported enum: - 6 - 10 enhance_prompt: type: boolean default: true description: >- If True, the incoming prompt will be automatically optimized to improve generation quality when needed. For more precise control, set it to False — the model will then follow the instructions more strictly. fast_pretreatment: type: boolean default: false description: >- Reduces optimization time when enhance_prompt is enabled. required: - model - prompt - image_url title: minimax/hailuo-2.3-fast - type: object properties: model: type: string enum: - minimax/h3 prompt: type: string maxLength: 7000 description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the first frame for the video. Image specifications: - format must be JPG, JPEG, or PNG; - aspect ratio should be greater than 2:5 and less than 5:2; - the shorter side must exceed 300 pixels; - file size must not exceed 20MB. last_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. reference_image_urls: type: array items: type: string format: uri maxItems: 9 description: >- Passing an image reference allows the model to emulate the style or content of the reference in the output. video_urls: type: array items: type: string format: uri maxItems: 3 description: >- Passing a video reference allows the model to emulate the style or content of the reference in the output. audio_urls: type: array items: type: string format: uri maxItems: 3 description: >- Reference audio clips whose voice timbre the generated speech follows. Cannot be the only reference — pass at least one reference image or video alongside. duration: type: integer minimum: 4 maximum: 15 default: 6 description: The length of the output video in seconds. resolution: type: string enum: - 2K default: 2K description: >- The resolution of the output video, where the number refers to the short side in pixels. ratio: type: string enum: - adaptive - '21:9' - '16:9' - '4:3' - '1:1' - '3:4' - '9:16' default: adaptive description: >- The aspect ratio of the generated video. Defaults to `adaptive`, which follows the first/last frame or reference input; text-only generation cannot be `adaptive` and defaults to `16:9` instead. required: - model - prompt title: minimax/h3 - type: object properties: model: type: string enum: - xai/grok-imagine-video - x-ai/grok-imagine-video prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- URL of the source image to animate (image-to-video mode). Omit for text-to-video. Cannot be combined with `reference_images`. reference_images: type: array items: type: string format: uri minItems: 1 maxItems: 7 description: >- Array of reference image URLs (reference-to-video mode). Up to 7 images. Cannot be combined with `image_url`. duration: type: integer description: The length of the output video in seconds. minimum: 1 maximum: 15 default: 10 aspect_ratio: type: string enum: - '1:1' - '16:9' - '9:16' - '4:3' - '3:4' - '3:2' - '2:3' default: '16:9' description: The aspect ratio of the generated video. resolution: type: string enum: - 480p - 720p description: >- Output video resolution. For image-to-video and reference-to-video modes, the value is selected automatically based on the resolution of the input images. required: - model title: xai/grok-imagine-video, x-ai/grok-imagine-video - type: object properties: model: type: string enum: - xai/grok-imagine-video-1.5-preview - x-ai/grok-imagine-video-1.5-preview prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- URL of the source image to animate. Required — this model supports image-to-video only. duration: type: integer description: The length of the output video in seconds. minimum: 1 maximum: 15 default: 10 aspect_ratio: type: string enum: - '1:1' - '16:9' - '9:16' - '4:3' - '3:4' - '3:2' - '2:3' default: '16:9' description: The aspect ratio of the generated video. resolution: type: string enum: - 480p - 720p description: >- Output video resolution. The value is selected automatically based on the resolution of the input image. required: - model - image_url title: >- xai/grok-imagine-video-1.5-preview, x-ai/grok-imagine-video-1.5-preview - type: object properties: model: type: string enum: - kling-video/v1/standard/image-to-video - kling-video/v1/pro/image-to-video - kling-video/v1.5/pro/image-to-video provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. tail_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. cfg_scale: type: number minimum: 0 maximum: 1 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt. static_mask: type: string format: uri description: >- URL of the image for Static Brush Application Area (Mask image created by users using the motion brush). dynamic_masks: type: array items: type: object properties: mask: type: string format: uri trajectories: type: array items: type: object properties: x: type: integer 'y': type: integer required: - x - 'y' minItems: 2 maxItems: 77 required: - mask - trajectories maxItems: 6 description: List of dynamic masks. required: - model - image_url title: >- kling-video/v1/standard/image-to-video, kling-video/v1/pro/image-to-video, kling-video/v1.5/pro/image-to-video - type: object properties: model: type: string enum: - kling-video/v1/standard/text-to-video - kling-video/v1/pro/text-to-video - kling-video/v1.5/pro/text-to-video - klingai/v2-master-text-to-video provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' default: '16:9' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 negative_prompt: type: string description: >- The description of elements to avoid in the generated video. cfg_scale: type: number minimum: 0 maximum: 1 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt. camera_control: type: string enum: - down_back - forward_up - right_turn_forward - left_turn_forward description: Camera control parameters. advanced_camera_control: type: object properties: movement_type: type: string enum: - horizontal - vertical - pan - tilt - roll - zoom default: horizontal description: The type of camera movement. movement_value: type: integer minimum: -10 maximum: 10 default: 0 description: The value of the camera movement. description: Advanced camera control parameters. required: - model - prompt title: >- kling-video/v1/standard/text-to-video, kling-video/v1/pro/text-to-video, kling-video/v1.5/pro/text-to-video, klingai/v2-master-text-to-video - type: object properties: model: type: string enum: - kling-video/v1.6/standard/text-to-video - kling-video/v1.6/pro/text-to-video - klingai/v2.1-master-text-to-video - klingai/v2.5-turbo/pro/text-to-video provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' default: '16:9' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 negative_prompt: type: string description: >- The description of elements to avoid in the generated video. cfg_scale: type: number minimum: 0 maximum: 1 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt. required: - model - prompt title: >- kling-video/v1.6/standard/text-to-video, kling-video/v1.6/pro/text-to-video, klingai/v2.1-master-text-to-video, klingai/v2.5-turbo/pro/text-to-video - type: object properties: model: type: string enum: - kling-video/v1.6/standard/image-to-video - kling-video/v2.1/standard/image-to-video provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. required: - model - image_url title: >- kling-video/v1.6/standard/image-to-video, kling-video/v2.1/standard/image-to-video - type: object properties: model: type: string enum: - kling-video/v1.6/pro/image-to-video - kling-video/v2.1/pro/image-to-video provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. tail_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. required: - model - image_url title: >- kling-video/v1.6/pro/image-to-video, kling-video/v2.1/pro/image-to-video - type: object properties: model: type: string enum: - klingai/kling-video-v1.6-pro-effects - klingai/kling-video-v1.6-standard-effects image_url: anyOf: - type: string format: uri - type: array items: type: string format: uri description: >- For hug, kiss, and heart_gesture effects, pass an array containing exactly two image URLs. For squish or expansion, only one image URL is required. effect_scene: type: string enum: - magic_fireball - pet_moto_rider - media_interview - pet_lion - pet_delivery - pet_chef - santa_gifts - santa_hug - girlfriend - boyfriend - heart_gesture_1 - pet_wizard - smoke_smoke - thumbs_up - instant_kid - dollar_rain - cry_cry - building_collapse - gun_shot - mushroom - double_gun - pet_warrior - lightning_power - jesus_hug - shark_alert - long_hair - lie_flat - polar_bear_hug - brown_bear_hug - jazz_jazz - office_escape_plow - fly_fly - watermelon_bomb - pet_dance - boss_coming - wool_curly - iron_warrior - pet_bee - marry_me - swing_swing - day_to_night - piggy_morph - wig_out - car_explosion - ski_ski - tiger_hug - siblings - construction_worker - let's_ride - snatched - magic_broom - felt_felt - jumpdrop - celebration - splashsplash - hula - surfsurf - fairy_wing - angel_wing - dark_wing - skateskate - plushcut - jelly_press - jelly_slice - jelly_squish - jelly_jiggle - pixelpixel - yearbook - instant_film - anime_figure - rocketrocket - bloombloom - dizzydizzy - fuzzyfuzzy - squish - expansion - hug - kiss - heart_gesture - fight description: Video effect scene type duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' required: - model - image_url - effect_scene title: >- klingai/kling-video-v1.6-pro-effects, klingai/kling-video-v1.6-standard-effects - type: object properties: model: type: string enum: - kling-video/v1.6/standard/multi-image-to-video image_list: type: array items: type: string format: uri minItems: 2 maxItems: 4 description: Array of image URLs for multi-image-to-video generation prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' default: '16:9' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. required: - model - image_list title: kling-video/v1.6/standard/multi-image-to-video - type: object properties: model: type: string enum: - klingai/v2-master-image-to-video - klingai/v2.1-master-image-to-video provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. cfg_scale: type: number minimum: 0 maximum: 1 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt. required: - model - image_url title: >- klingai/v2-master-image-to-video, klingai/v2.1-master-image-to-video - type: object properties: model: type: string enum: - klingai/v2.5-turbo/pro/image-to-video provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. tail_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. cfg_scale: type: number minimum: 0 maximum: 1 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt. required: - model - image_url title: klingai/v2.5-turbo/pro/image-to-video - type: object properties: model: type: string enum: - klingai/avatar-standard - klingai/avatar-pro - kling-video/v1/standard/ai-avatar - kling-video/v1/pro/ai-avatar provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. audio_url: type: string format: uri description: >- The URL of the audio file. Supported formats: MP3, WAV, M4A, AAC. Maximum file size: 5 MB. prompt: type: string maxLength: 2500 description: >- The text description of the scene, subject, or action to generate in the video. required: - model - image_url - audio_url title: >- klingai/avatar-standard, klingai/avatar-pro, kling-video/v1/standard/ai-avatar, kling-video/v1/pro/ai-avatar - type: object properties: model: type: string enum: - klingai/video-o1-image-to-video - kling-video/o1/image-to-video provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string maxLength: 2500 description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. last_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' required: - model - prompt - image_url title: >- klingai/video-o1-image-to-video, kling-video/o1/image-to-video - type: object properties: model: type: string enum: - klingai/video-o1-reference-to-video - kling-video/o1/reference-to-video provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string maxLength: 2500 description: >- The text description of the scene, subject, or action to generate in the video. image_list: type: array items: type: string format: uri minItems: 1 maxItems: 7 description: Array of image URLs for multi-image-to-video generation. elements: type: array items: type: object properties: reference_image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 4 description: Additional reference images from different angles. frontal_image_url: type: string format: uri description: The frontal image of the element (main view). required: - reference_image_urls - frontal_image_url maxItems: 4 description: Elements (characters/objects) to include in the video. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' default: '16:9' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' required: - model - prompt title: >- klingai/video-o1-reference-to-video, kling-video/o1/reference-to-video - type: object properties: model: type: string enum: - klingai/video-o1-video-to-video-edit - kling-video/o1/video-to-video/edit provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string maxLength: 2500 description: >- The text description of the scene, subject, or action to generate in the video. video_url: type: string format: uri description: >- A HTTPS URL pointing to a video or a data URI containing a video. This video will be used as a reference during generation. image_list: type: array items: type: string format: uri minItems: 1 maxItems: 7 description: Array of image URLs for multi-image-to-video generation. elements: type: array items: type: object properties: reference_image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 4 description: Additional reference images from different angles. frontal_image_url: type: string format: uri description: The frontal image of the element (main view). required: - reference_image_urls - frontal_image_url maxItems: 4 description: Elements (characters/objects) to include in the video. keep_audio: type: boolean default: false description: Whether to keep the original audio from the video. required: - model - prompt - video_url title: >- klingai/video-o1-video-to-video-edit, kling-video/o1/video-to-video/edit - type: object properties: model: type: string enum: - klingai/video-o1-video-to-video-reference - kling-video/o1/video-to-video/reference provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string maxLength: 2500 description: >- The text description of the scene, subject, or action to generate in the video. video_url: type: string format: uri description: >- A HTTPS URL pointing to a video or a data URI containing a video. This video will be used as a reference during generation. image_list: type: array items: type: string format: uri minItems: 1 maxItems: 4 description: Array of image URLs for multi-image-to-video generation. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' default: '16:9' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' elements: type: array items: type: object properties: reference_image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 4 description: Additional reference images from different angles. frontal_image_url: type: string format: uri description: The frontal image of the element (main view). required: - reference_image_urls - frontal_image_url maxItems: 4 description: Elements (characters/objects) to include in the video. keep_audio: type: boolean default: false description: Whether to keep the original audio from the video. required: - model - prompt - video_url title: >- klingai/video-o1-video-to-video-reference, kling-video/o1/video-to-video/reference - type: object properties: model: type: string enum: - klingai/video-v2-6-pro-image-to-video - kling-video/v2.6/pro/image-to-video provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string maxLength: 2500 description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. tail_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. generate_audio: type: boolean default: true description: Whether to generate audio for the video. required: - model - prompt - image_url title: >- klingai/video-v2-6-pro-image-to-video, kling-video/v2.6/pro/image-to-video - type: object properties: model: type: string enum: - klingai/video-v2-6-pro-text-to-video - kling-video/v2.6/pro/text-to-video provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string maxLength: 2500 description: >- The text description of the scene, subject, or action to generate in the video. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. cfg_scale: type: number minimum: 0 maximum: 1 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt. generate_audio: type: boolean default: true description: Whether to generate audio for the video. required: - model - prompt title: >- klingai/video-v2-6-pro-text-to-video, kling-video/v2.6/pro/text-to-video - type: object properties: model: type: string enum: - klingai/video-v2-6-pro-motion-control prompt: type: string description: >- Optional instructions that define the background elements, including their appearance, timing in the frame, and behavior, and can also subtly adjust the character’s animation. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that serves as the character reference for animation. The image must contain exactly one clearly visible character, who will be animated using the motion from the reference video provided in the video_url parameter. For optimal results, be sure the character’s proportions in the image match those in the video. video_url: type: string format: uri description: >- A HTTPS URL pointing to a video or a data URI containing a video. The character’s movements from this video will be applied to the character from the image provided in the image_url parameter. For best results, use a video with a single clearly visible character. If the video contains two or more characters, the motion of the character occupying the largest portion of the frame will be used for generation. character_orientation: type: string enum: - image - video default: video description: >- Generate the orientation of the character in the video, which can be selected to match the image or the video: - image: has the same orientation as the person in the picture; At this time, the reference video duration should not exceed 10 seconds; - video: consistent with the orientation of the characters in the video; At this time, the reference video duration should not exceed 30 seconds; keep_audio: type: boolean default: true description: Whether to keep the original audio from the video. required: - model - image_url - video_url title: klingai/video-v2-6-pro-motion-control - type: object properties: model: type: string enum: - klingai/video-v2-6-motion-control - klingai/video-v3-motion-control prompt: type: string description: >- Optional instructions that define the background elements, including their appearance, timing in the frame, and behavior, and can also subtly adjust the character’s animation. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that serves as the character reference for animation. The image must contain exactly one clearly visible character, who will be animated using the motion from the reference video provided in the video_url parameter. For optimal results, be sure the character’s proportions in the image match those in the video. video_url: type: string format: uri description: >- A HTTPS URL pointing to a video or a data URI containing a video. The character’s movements from this video will be applied to the character from the image provided in the image_url parameter. For best results, use a video with a single clearly visible character. If the video contains two or more characters, the motion of the character occupying the largest portion of the frame will be used for generation. character_orientation: type: string enum: - image - video default: video description: >- Generate the orientation of the character in the video, which can be selected to match the image or the video: - image: has the same orientation as the person in the picture; At this time, the reference video duration should not exceed 10 seconds; - video: consistent with the orientation of the characters in the video; At this time, the reference video duration should not exceed 30 seconds; keep_audio: type: boolean default: true description: Whether to keep the original audio from the video. mode: type: string enum: - std - pro default: std description: |- Video generation mode: - std: Standard Mode — basic, cost-effective. - pro: Professional Mode — higher quality, higher cost. required: - model - image_url - video_url title: >- klingai/video-v2-6-motion-control, klingai/video-v3-motion-control - type: object properties: model: type: string enum: - klingai/video-v3-standard-text-to-video - klingai/video-v3-pro-text-to-video - klingai/video-v3-omni-720p-text-to-video - klingai/video-v3-omni-1080p-text-to-video - kling-video/v3/standard/text-to-video - kling-video/v3/pro/text-to-video prompt: type: string description: >- Text prompt for video generation. Either prompt or multi_prompt must be provided, but not both. provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto multi_prompt: type: array items: type: string description: >- List of prompts for multi-shot video generation. If provided, overrides the single prompt and divides the video into multiple shots with specified prompts and durations. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' default: '16:9' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 default: '5' shot_type: type: string enum: - customize - intelligent - intelligence default: customize description: The type of multi-shot video generation generate_audio: type: boolean default: true description: Whether to generate audio for the video. negative_prompt: type: string description: >- The description of elements to avoid in the generated video. cfg_scale: type: number minimum: 0 maximum: 1 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt. required: - model title: >- klingai/video-v3-standard-text-to-video, klingai/video-v3-pro-text-to-video, klingai/video-v3-omni-720p-text-to-video, klingai/video-v3-omni-1080p-text-to-video, kling-video/v3/standard/text-to-video, kling-video/v3/pro/text-to-video - type: object properties: model: type: string enum: - klingai/video-v3-standard-image-to-video - klingai/video-v3-pro-image-to-video - klingai/video-v3-omni-720p-image-to-video - klingai/video-v3-omni-1080p-image-to-video - kling-video/v3/standard/image-to-video - kling-video/v3/pro/image-to-video prompt: type: string description: >- Text prompt for video generation. Either prompt or multi_prompt must be provided, but not both. provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto multi_prompt: type: array items: type: string description: >- List of prompts for multi-shot video generation. If provided, overrides the single prompt and divides the video into multiple shots with specified prompts and durations. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. tail_image_url: type: string format: uri description: >- Last frame image URL. Not supported when generate_audio is enabled — set generate_audio to false to use a tail frame. duration: type: integer description: The length of the output video in seconds. enum: - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 default: '5' elements: type: array items: type: object properties: reference_image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 4 description: Additional reference images from different angles. frontal_image_url: type: string format: uri description: The frontal image of the element (main view). video_url: type: string format: uri description: >- The video URL of the element. A request can only have one element with a video. required: - reference_image_urls maxItems: 4 description: >- Elements (characters/objects) to include in the video. Each example can either be an image set (frontal + reference images) or a video shot_type: type: string enum: - customize - intelligent - intelligence default: customize description: The type of multi-shot video generation generate_audio: type: boolean default: true description: Whether to generate audio for the video. negative_prompt: type: string description: >- The description of elements to avoid in the generated video. cfg_scale: type: number minimum: 0 maximum: 1 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt. required: - model - image_url title: >- klingai/video-v3-standard-image-to-video, klingai/video-v3-pro-image-to-video, klingai/video-v3-omni-720p-image-to-video, klingai/video-v3-omni-1080p-image-to-video, kling-video/v3/standard/image-to-video, kling-video/v3/pro/image-to-video - type: object properties: model: type: string enum: - klingai/video-v3-standard-turbo-text-to-video - klingai/video-v3-turbo-pro-text-to-video - kling-video/v3/turbo/standard/text-to-video - kling-video/v3/turbo/pro/text-to-video prompt: type: string maxLength: 3072 description: >- Optional text prompt. For best results keep the prompt under 2500 characters. Mutually exclusive with multi_prompt. multi_prompt: type: array nullable: true items: type: object properties: prompt: type: string maxLength: 3072 description: Text prompt for this storyboard shot. duration: type: integer description: The length of the output video in seconds. enum: - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 default: '5' required: - prompt minItems: 1 maxItems: 6 description: >- Multi-shot storyboard with 1 to 6 shots. Mutually exclusive with prompt. duration: type: integer description: The length of the output video in seconds. enum: - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 default: '5' aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' default: '16:9' description: The aspect ratio of the generated video. required: - model title: >- klingai/video-v3-standard-turbo-text-to-video, klingai/video-v3-turbo-pro-text-to-video, kling-video/v3/turbo/standard/text-to-video, kling-video/v3/turbo/pro/text-to-video - type: object properties: model: type: string enum: - klingai/video-v3-standard-turbo-image-to-video - klingai/video-v3-turbo-pro-image-to-video - kling-video/v3/turbo/standard/image-to-video - kling-video/v3/turbo/pro/image-to-video prompt: type: string maxLength: 3072 description: >- Optional text prompt. For best results keep the prompt under 2500 characters. Mutually exclusive with multi_prompt. multi_prompt: type: array nullable: true items: type: object properties: prompt: type: string maxLength: 3072 description: Text prompt for this storyboard shot. duration: type: integer description: The length of the output video in seconds. enum: - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 default: '5' required: - prompt minItems: 1 maxItems: 6 description: >- Multi-shot storyboard with 1 to 6 shots. Mutually exclusive with prompt. duration: type: integer description: The length of the output video in seconds. enum: - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - 15 default: '5' image_url: type: string format: uri description: >- First-frame reference image. Formats: .jpg/.jpeg/.png; max 50MB; min 300px per side; aspect ratio within 1:2.5 to 2.5:1. required: - model - image_url title: >- klingai/video-v3-standard-turbo-image-to-video, klingai/video-v3-turbo-pro-image-to-video, kling-video/v3/turbo/standard/image-to-video, kling-video/v3/turbo/pro/image-to-video - type: object properties: model: type: string enum: - pixverse/v5/text-to-video prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. aspect_ratio: type: string enum: - '16:9' - '4:3' - '1:1' - '3:4' - '9:16' default: '16:9' description: The aspect ratio of the generated video. resolution: type: string enum: - 360p - 540p - 720p - 1080p default: 720p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: >- The output video length in seconds. The 1080p quality option does not support 8-second videos. enum: - 5 - 8 default: '5' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. style: type: string enum: - anime - 3d_animation - clay - comic - cyberpunk description: The style of the generated video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. lip_sync_tts_content: type: string description: The text content to be lip-synced in the video. lip_sync_tts_speaker: type: string enum: - Harper - Ava - Isabella - Sophia - Emily - Chloe - Julia - Mason - Jack - Liam - James - Oliver - Adrian - Ethan - Auto description: >- A predefined system voice used for generating speech in the video. required: - model - prompt title: pixverse/v5/text-to-video - type: object properties: model: type: string enum: - pixverse/v5/image-to-video prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- URL of the image to be used as the first frame of the video. resolution: type: string enum: - 360p - 540p - 720p - 1080p default: 720p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: >- The output video length in seconds. The 1080p quality option does not support 8-second videos. enum: - 5 - 8 default: '5' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. style: type: string enum: - anime - 3d_animation - clay - comic - cyberpunk description: The style of the generated video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. lip_sync_tts_content: type: string description: The text content to be lip-synced in the video. lip_sync_tts_speaker: type: string enum: - Harper - Ava - Isabella - Sophia - Emily - Chloe - Julia - Mason - Jack - Liam - James - Oliver - Adrian - Ethan - Auto description: >- A predefined system voice used for generating speech in the video. required: - model - prompt - image_url title: pixverse/v5/image-to-video - type: object properties: model: type: string enum: - pixverse/v5/transition prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- URL of the image to be used as the first frame of the video. tail_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. resolution: type: string enum: - 360p - 540p - 720p - 1080p default: 720p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: >- The output video length in seconds. The 1080p quality option does not support 8-second videos. enum: - 5 - 8 default: '5' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. style: type: string enum: - anime - 3d_animation - clay - comic - cyberpunk description: The style of the generated video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. lip_sync_tts_content: type: string description: The text content to be lip-synced in the video. lip_sync_tts_speaker: type: string enum: - Harper - Ava - Isabella - Sophia - Emily - Chloe - Julia - Mason - Jack - Liam - James - Oliver - Adrian - Ethan - Auto description: >- A predefined system voice used for generating speech in the video. required: - model - prompt - image_url - tail_image_url title: pixverse/v5/transition - type: object properties: model: type: string enum: - pixverse/lip-sync video_url: type: string format: uri description: >- A HTTPS URL pointing to a video or a data URI containing a video. This video will be used as a reference during generation. audio_url: type: string format: uri description: >- A direct link to an online audio file or a Base64-encoded local to an audio file used for lip-syncing in the video. Use either audio_url or (lip_sync_tts_speaker together with lip_sync_tts_content), but not both. lip_sync_tts_content: type: string description: >- The text content to be lip-synced in the video. Use either audio_url or (lip_sync_tts_speaker together with lip_sync_tts_content), but not both. lip_sync_tts_speaker: type: string enum: - Harper - Ava - Isabella - Sophia - Emily - Chloe - Julia - Mason - Jack - Liam - James - Oliver - Adrian - Ethan - Auto description: >- A predefined system voice used for generating speech in the video. Use either audio_url or (lip_sync_tts_speaker together with lip_sync_tts_content), but not both. required: - model - video_url title: pixverse/lip-sync - type: object properties: model: type: string enum: - pixverse/v5.5/text-to-video - pixverse/v5-5-text-to-video prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. aspect_ratio: type: string enum: - '16:9' - '4:3' - '1:1' - '3:4' - '9:16' default: '16:9' description: The aspect ratio of the generated video. resolution: type: string enum: - 360p - 540p - 720p - 1080p default: 720p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: >- The output video length in seconds. The 1080p quality option does not support 8-second videos. enum: - 5 - 8 - 10 default: '5' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. style: type: string enum: - anime - 3d_animation - clay - comic - cyberpunk description: The style of the generated video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. generate_audio_switch: type: boolean default: false description: |- Enable audio generation. - true: Audio on. - false: Audio off. generate_multi_clip_switch: type: boolean default: false description: >- Enable multi-clip generation with dynamic camera changes. - true: Multi-clip. - false: Single-clip. thinking_type: type: string enum: - enabled - disabled - auto default: enabled description: |- Prompt reasoning enhancement mode. - "enabled": Turn on prompt optimization. - "disabled": Turn off prompt optimization. - "auto" or omitted: Let the model decide automatically. required: - model - prompt title: pixverse/v5.5/text-to-video, pixverse/v5-5-text-to-video - type: object properties: model: type: string enum: - pixverse/v5.5/image-to-video - pixverse/v5-5-image-to-video prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- URL of the image to be used as the first frame of the video. resolution: type: string enum: - 360p - 540p - 720p - 1080p default: 720p description: >- An enumeration where the short side of the video frame determines the resolution. duration: type: integer description: >- The output video length in seconds. The 1080p quality option does not support 8-second videos. enum: - 5 - 8 - 10 default: '5' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. style: type: string enum: - anime - 3d_animation - clay - comic - cyberpunk description: The style of the generated video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. generate_audio_switch: type: boolean default: false description: |- Enable audio generation. - true: Audio on. - false: Audio off. generate_multi_clip_switch: type: boolean default: false description: >- Enable multi-clip generation with dynamic camera changes. - true: Multi-clip. - false: Single-clip. thinking_type: type: string enum: - enabled - disabled - auto default: enabled description: |- Prompt reasoning enhancement mode. - "enabled": Turn on prompt optimization. - "disabled": Turn off prompt optimization. - "auto" or omitted: Let the model decide automatically. required: - model - prompt - image_url title: pixverse/v5.5/image-to-video, pixverse/v5-5-image-to-video - type: object properties: model: type: string enum: - ray-2 - luma/ray-2 - ray-flash-2 - luma/ray-flash-2 prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. resolution: type: string enum: - 540p - 720p - 1080p - 4k default: 1080p description: >- The resolution of the output video, where the number refers to the short side in pixels. aspect_ratio: type: string enum: - '1:1' - '16:9' - '9:16' - '4:3' - '3:4' - '21:9' - '9:21' default: '16:9' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 9 default: '5' keyframes: type: object properties: frame0: anyOf: - type: object properties: type: type: string enum: - image url: type: string format: uri required: - type - url - type: object properties: type: type: string enum: - generation id: type: string format: uuid required: - type - id - nullable: true frame1: anyOf: - type: object properties: type: type: string enum: - image url: type: string format: uri required: - type - url - type: object properties: type: type: string enum: - generation id: type: string format: uuid required: - type - id - nullable: true description: Keyframes for image-to-video, extend, or interpolate loop: type: boolean default: false description: Whether to loop the video required: - model - prompt title: ray-2, luma/ray-2, ray-flash-2, luma/ray-flash-2 - type: object properties: model: type: string enum: - luma/ray-3.2 prompt: type: string description: Text description of the video to generate. type: type: string enum: - video - video_edit - video_reframe default: video description: >- Generation kind: "video" (generate / extend), "video_edit", or "video_reframe". resolution: type: string enum: - 360p - 540p - 720p - 1080p default: 720p description: Output resolution. duration: type: integer description: Clip duration in seconds. enum: - 5 - 10 default: '5' aspect_ratio: type: string enum: - '9:16' - '3:4' - '1:1' - '4:3' - '16:9' - '21:9' default: '16:9' description: Output aspect ratio. loop: type: boolean default: false description: Seamlessly loop the video (creation only). hdr: type: boolean default: false description: Generate HDR output (5s, 720p/1080p only). exr_export: type: boolean default: false description: Export EXR frames (requires hdr). image_url: type: string format: uri description: Start-frame image URL for image-to-video / extend. last_image_url: type: string format: uri description: End-frame image URL (first-last-frame). video_url: type: string format: uri description: Source video URL for editing or reframing. required: - model - prompt title: luma/ray-3.2 - type: object properties: model: type: string enum: - gen3a_turbo - runway/gen3a_turbo prompt: type: string maxLength: 1000 description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A HTTPS URL or data URI containing an encoded image to be used as the first frame of the generated video. tail_image_url: type: string format: uri description: >- A HTTPS URL or data URI containing an encoded image to be used as the last frame of the generated video. aspect_ratio: type: string enum: - '16:9' - '9:16' default: '16:9' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' seed: type: integer minimum: 0 maximum: 4294967295 description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. required: - model - image_url title: gen3a_turbo, runway/gen3a_turbo - type: object properties: model: type: string enum: - gen4_turbo - runway/gen4_turbo prompt: type: string maxLength: 1000 description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A HTTPS URL or data URI containing an encoded image to be used as the first frame of the generated video. tail_image_url: type: string format: uri description: >- A HTTPS URL or data URI containing an encoded image to be used as the last frame of the generated video. aspect_ratio: type: string enum: - '16:9' - '9:16' - '4:3' - '3:4' - '1:1' - '21:9' default: '16:9' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' seed: type: integer minimum: 0 maximum: 4294967295 description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. required: - model - image_url title: gen4_turbo, runway/gen4_turbo - type: object properties: model: type: string enum: - gen4_aleph - runway/gen4_aleph prompt: type: string maxLength: 1000 description: >- The text description of the scene, subject, or action to generate in the video. video_url: type: string format: uri description: >- A HTTPS URL pointing to a video or a data URI containing a video. This video will be used as a reference during generation. references: type: array items: type: object properties: type: type: string enum: - image url: type: string format: uri required: - type - url description: >- Passing an image reference allows the model to emulate the style or content of the reference in the output. frame_size: type: string enum: - '1280:720' - '720:1280' - '1104:832' - '832:1104' - '960:960' - '1584:672' - '848:480' - '640:480' default: '1280:720' description: The width and height of the video. duration: type: number enum: - 5 default: 5 description: The length of the output video in seconds. seed: type: integer minimum: 0 maximum: 4294967295 description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. required: - model - prompt - video_url title: gen4_aleph, runway/gen4_aleph - type: object properties: model: type: string enum: - act_two - runway/act_two character: oneOf: - type: object properties: type: type: string enum: - video url: type: string format: uri required: - type - url description: >- A video of your character. In the output, the character will use the reference video performance in its original animated environment and some of the character's own movements. - type: object properties: type: type: string enum: - image url: type: string format: uri required: - type - url description: >- An image of your character. In the output, the character will use the reference video performance in its original static environment. description: >- The character to control. You can either provide a video or an image. A visually recognizable face must be visible and stay within the frame. reference: type: object properties: type: type: string enum: - video url: type: string format: uri required: - type - url description: >- Passing a video reference allows the model to emulate the style or content of the reference in the output. frame_size: type: string enum: - '1280:720' - '720:1280' - '1104:832' - '832:1104' - '960:960' - '1584:672' - '848:480' - '640:480' default: '1280:720' description: The width and height of the video. body_control: type: boolean description: >- A boolean indicating whether to enable body control. When enabled, non-facial movements and gestures will be applied to the character in addition to facial expressions. expression_intensity: type: integer minimum: 1 maximum: 5 default: 3 description: >- An integer between 1 and 5 (inclusive). A larger value increases the intensity of the character's expression. seed: type: integer minimum: 0 maximum: 4294967295 description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. required: - model - character - reference title: act_two, runway/act_two - type: object properties: model: type: string enum: - magic/text-to-video prompt: type: string description: Text that will appear in the video. template: type: string enum: - Shanghai Drone Show default: Shanghai Drone Show description: Video design template. required: - model - prompt title: magic/text-to-video - type: object properties: model: type: string enum: - magic/image-to-video image_url: type: string format: uri description: >- An image (supplied via URL or Base64) that will be inserted into the selected video template as the embedded ad content. template: type: string enum: - Thailand Street - Times Square Billboard - New York Times Square (77) - Phone Social - Art Gallery - New York Times Square (66) - Dubai Museum - Digital Float - Rotating Cards - Desktop Reveal - Egypt Pyramid - Frames Drop - Cappadocia Balloons - Times Square Round Screen - Stockholm Metro - Tokyo Billboard - San Francisco Skyscrapers - Malaysia Shop - Las Vegas LED - Phone App - Paris Eiffel Tower default: Thailand Street description: Video design template. required: - model - image_url title: magic/image-to-video - type: object properties: model: type: string enum: - magic/video-to-video video_url: type: string format: uri description: >- A video (supplied via URL or Base64) that will be inserted into the selected video template as the embedded ad content. template: type: string enum: - Thailand Street - Times Square Billboard - New York Times Square (78) - Phone Social - Art Gallery - New York Times Square (67) - Dubai Museum - Rotating Cards - Desktop Reveal - Egypt Pyramid - Cappadocia Balloons - Times Square Round Screen - Stockholm Metro - Tokyo Billboard - San Francisco Skyscrapers - Malaysia Shop - Las Vegas LED - Phone App - Paris Eiffel Tower default: Thailand Street description: Video design template. required: - model - video_url title: magic/video-to-video - type: object properties: model: type: string enum: - kling-video/v2.5-turbo/pro/image-to-video - kling-video/v2/master/image-to-video - kling-video/v2.1/master/image-to-video image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. cfg_scale: type: number minimum: 0 maximum: 1 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt. required: - model - image_url - prompt title: >- kling-video/v2.5-turbo/pro/image-to-video, kling-video/v2/master/image-to-video, kling-video/v2.1/master/image-to-video - type: object properties: model: type: string enum: - kling-video/v2.5-turbo/pro/text-to-video - kling-video/v2/master/text-to-video - kling-video/v2.1/master/text-to-video provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' negative_prompt: type: string description: >- The description of elements to avoid in the generated video. cfg_scale: type: number minimum: 0 maximum: 1 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt. aspect_ratio: type: string enum: - '16:9' - '9:16' - '1:1' description: The aspect ratio of the generated video. required: - model - prompt title: >- kling-video/v2.5-turbo/pro/text-to-video, kling-video/v2/master/text-to-video, kling-video/v2.1/master/text-to-video - type: object properties: model: type: string enum: - veo3.1 - veo3.1/fast prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. provider: type: string description: >- Provider routing override. `google` runs native Google with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Google -> fal.ai fallback chain. Case-insensitive. example: auto aspect_ratio: type: string enum: - '16:9' - '9:16' description: The aspect ratio of the generated video. resolution: type: string enum: - 720p - 1080p default: 1080p description: >- The resolution of the output video, where the number refers to the short side in pixels. duration: type: integer description: The length of the output video in seconds. enum: - 4 - 6 - 8 default: '8' generate_audio: type: boolean default: true description: Whether to generate audio for the video. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. auto_fix: type: boolean default: true description: >- Whether to automatically attempt to fix prompts that fail content policy or other validation checks by rewriting them. negative_prompt: type: string description: >- The description of elements to avoid in the generated video. enhance_prompt: type: boolean default: true description: Whether to enhance the video generation. required: - model - prompt title: veo3.1, veo3.1/fast - type: object properties: model: type: string enum: - veo3.1/image-to-video - veo3.1/fast/image-to-video prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- URL of the input image to animate. Should be 720p or higher resolution. provider: type: string description: >- Provider routing override. `google` runs native Google with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Google -> fal.ai fallback chain. Case-insensitive. example: auto aspect_ratio: type: string enum: - '16:9' - '9:16' description: The aspect ratio of the generated video. resolution: type: string enum: - 720p - 1080p default: 1080p description: >- The resolution of the output video, where the number refers to the short side in pixels. duration: type: integer description: The length of the output video in seconds. enum: - 4 - 6 - 8 default: '8' generate_audio: type: boolean default: true description: Whether to generate audio for the video. required: - model - prompt - image_url title: veo3.1/image-to-video, veo3.1/fast/image-to-video - type: object properties: model: type: string enum: - veo3.1/first-last-frame-to-video - veo3.1/fast/first-last-frame-to-video prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- URL of the input image to animate. Should be 720p or higher resolution. last_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. When this parameter is provided, the video duration can only be 8s. provider: type: string description: >- Provider routing override. `google` runs native Google with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Google -> fal.ai fallback chain. Case-insensitive. example: auto aspect_ratio: type: string enum: - '16:9' - '9:16' description: The aspect ratio of the generated video. resolution: type: string enum: - 720p - 1080p default: 1080p description: >- The resolution of the output video, where the number refers to the short side in pixels. duration: type: integer description: The length of the output video in seconds. enum: - 4 - 6 - 8 default: '8' generate_audio: type: boolean default: true description: Whether to generate audio for the video. required: - model - prompt - image_url - last_image_url title: >- veo3.1/first-last-frame-to-video, veo3.1/fast/first-last-frame-to-video - type: object properties: model: type: string enum: - veo3.1/extend-video - veo3.1/fast/extend-video prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. video_url: type: string format: uri description: >- A HTTPS URL pointing to a video or a data URI containing a video. This video will be used as a reference during generation. provider: type: string description: >- Provider routing override. `google` runs native Google with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Google -> fal.ai fallback chain. Case-insensitive. example: auto aspect_ratio: type: string enum: - auto - '16:9' - '9:16' default: auto description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 7 default: '7' resolution: type: string enum: - 720p default: 720p description: >- The resolution of the output video, where the number refers to the short side in pixels. generate_audio: type: boolean default: true description: Whether to generate audio for the video. auto_fix: type: boolean default: false description: >- Whether to automatically attempt to fix prompts that fail content policy or other validation checks by rewriting them. required: - model - prompt - video_url title: veo3.1/extend-video, veo3.1/fast/extend-video - type: object properties: model: type: string enum: - veo3.1/lite/image-to-video - veo3.1/lite/first-last-frame-to-video - veo3.1/lite prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the first frame of the video. Should be 720p or higher resolution. last_image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video. Should be 720p or higher resolution. When this parameter is provided, the video duration can only be 8s. provider: type: string description: >- Provider routing override. `google` runs native Google with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Google -> fal.ai fallback chain. Case-insensitive. example: auto aspect_ratio: type: string enum: - '16:9' - '9:16' description: The aspect ratio of the generated video. resolution: type: string enum: - 720p - 1080p default: 1080p description: >- The resolution of the output video, where the number refers to the short side in pixels. duration: type: integer description: The length of the output video in seconds. enum: - 4 - 6 - 8 default: '8' generate_audio: type: boolean default: true description: Whether to generate audio for the video. required: - model - prompt title: >- veo3.1/lite/image-to-video, veo3.1/lite/first-last-frame-to-video, veo3.1/lite - type: object properties: model: type: string enum: - bytedance/omnihuman - bytedance/omnihuman/v1.5 image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. audio_url: type: string format: uri description: >- The URL of the audio file for lip-sync animation. The model detects spoken parts and syncs the character's mouth to them. Audio must be under 30s long. required: - model - image_url - audio_url title: bytedance/omnihuman, bytedance/omnihuman/v1.5 - type: object properties: model: type: string enum: - hunyuan-video-foley - tencent/hunyuan-video-foley video_url: type: string format: uri description: >- A HTTPS URL pointing to a video or a data URI containing a video. This video will be used as a reference during generation. prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. negative_prompt: type: string default: noisy, harsh description: >- The description of elements to avoid in the generated video. guidance_scale: type: number default: 4.5 description: >- Classifier-free guidance scale. Controls prompt adherence / creativity. num_inference_steps: type: integer default: 50 description: >- Number of inference steps for sampling. Higher values give better quality but take longer. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. required: - model - video_url title: hunyuan-video-foley, tencent/hunyuan-video-foley - type: object properties: model: type: string enum: - kandinsky5/text-to-video - kandinsky5/text-to-video/distill - sber-ai/kandinsky5-t2v - sber-ai/kandinsky5-distill-t2v prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. aspect_ratio: type: string enum: - '3:2' - '1:1' - '2:3' default: '3:2' description: The aspect ratio of the generated video. duration: type: integer description: The length of the output video in seconds. enum: - 5 - 10 default: '5' num_inference_steps: type: integer default: 30 description: >- Number of inference steps for sampling. Higher values give better quality but take longer. required: - model - prompt title: >- kandinsky5/text-to-video, kandinsky5/text-to-video/distill, sber-ai/kandinsky5-t2v, sber-ai/kandinsky5-distill-t2v - type: object properties: model: type: string enum: - krea-wan-14b/text-to-video - krea/krea-wan-14b/text-to-video prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. num_frames: type: integer minimum: 18 maximum: 162 default: 78 description: >- Number of frames to generate. Must be a multiple of 12 plus 6, for example 18, 30, 42, etc. enable_prompt_expansion: type: boolean default: true description: Whether to enable prompt expansion. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. required: - model - prompt title: krea-wan-14b/text-to-video, krea/krea-wan-14b/text-to-video - type: object properties: model: type: string enum: - krea-wan-14b/video-to-video - krea/krea-wan-14b/video-to-video prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. video_url: type: string format: uri description: >- A HTTPS URL pointing to a video or a data URI containing a video. This video will be used as a reference during generation. strength: type: number minimum: 0 maximum: 1 default: 0.85 description: >- Denoising strength for the video-to-video generation. 0.0 preserves the original, 1.0 completely remakes the video. enable_prompt_expansion: type: boolean default: true description: Whether to enable prompt expansion. seed: type: integer description: >- Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen. required: - model - prompt - video_url title: >- krea-wan-14b/video-to-video, krea/krea-wan-14b/video-to-video - type: object properties: model: type: string enum: - ltxv-2 - ltxv-2/image-to-video - ltxv-2/text-to-video - ltxv-2/fast - ltxv-2/image-to-video/fast - ltxv-2/text-to-video/fast - ltxv/ltxv-2 - ltxv/ltxv-2-fast prompt: type: string description: >- The text description of the scene, subject, or action to generate in the video. image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. duration: type: integer description: The length of the output video in seconds. enum: - 6 - 8 - 10 resolution: type: string enum: - 1080p - 1440p - 2160p default: 1080p description: >- The resolution of the output video, where the number refers to the short side in pixels. aspect_ratio: type: string enum: - '16:9' default: '16:9' description: The aspect ratio of the generated video. fps: type: integer description: Frames per second of the generated video. enum: - 25 - 50 generate_audio: type: boolean default: true description: Whether to generate audio for the video. required: - model - prompt title: >- ltxv-2, ltxv-2/image-to-video, ltxv-2/text-to-video, ltxv-2/fast, ltxv-2/image-to-video/fast, ltxv-2/text-to-video/fast, ltxv/ltxv-2, ltxv/ltxv-2-fast - type: object properties: model: type: string enum: - veed/fabric-1.0 - veed/fabric-1.0/fast image_url: type: string format: uri description: >- A direct link to an online image or a Base64-encoded local image that will serve as the visual base or the first frame for the video. audio_url: type: string format: uri description: >- The URL of the audio file for lip-sync animation. The model detects spoken parts and syncs the character's mouth to them. Audio must be under 30s long. resolution: type: string enum: - 480p - 720p default: 480p description: The resolution of the generated video. required: - model - image_url - audio_url title: veed/fabric-1.0, veed/fabric-1.0/fast - type: object properties: model: type: string enum: - blackforestlabs/flux-3-video-t2v prompt: type: string minLength: 1 description: The text prompt describing the video to generate. aspect_ratio: type: string enum: - auto - '21:9' - '2:1' - '16:9' - '4:3' - '1:1' - '3:4' - '9:16' default: auto description: >- The aspect ratio of the generated video. `auto` lets the model pick, and image-to-video follows the first keyframe. duration: type: integer minimum: 5 maximum: 20 default: 5 description: The video length in whole seconds, from 5 to 20. generate_audio: type: boolean default: true description: >- Whether to generate a synchronized audio track. Set to `false` for a silent clip. safety_tolerance: type: integer minimum: 0 maximum: 4 default: 2 description: >- The moderation strictness, from 0 (strictest) to 4 (most permissive). resolution: type: string enum: - hd - fhd default: hd description: The output resolution of the generated video. required: - model - prompt title: blackforestlabs/flux-3-video-t2v - type: object properties: model: type: string enum: - blackforestlabs/flux-3-video-i2v prompt: type: string minLength: 1 description: The text prompt describing the video to generate. aspect_ratio: type: string enum: - auto - '21:9' - '2:1' - '16:9' - '4:3' - '1:1' - '3:4' - '9:16' default: auto description: >- The aspect ratio of the generated video. `auto` lets the model pick, and image-to-video follows the first keyframe. duration: type: integer minimum: 5 maximum: 20 default: 5 description: The video length in whole seconds, from 5 to 20. generate_audio: type: boolean default: true description: >- Whether to generate a synchronized audio track. Set to `false` for a silent clip. safety_tolerance: type: integer minimum: 0 maximum: 4 default: 2 description: >- The moderation strictness, from 0 (strictest) to 4 (most permissive). image_url: type: string format: uri description: The image URL that starts the clip. last_image_url: type: string format: uri description: >- An optional image URL that pins the last frame of the clip. Provide it together with `image_url` to interpolate between the two. image_urls: type: array items: type: string format: uri maxItems: 10 description: >- Optional additional image URLs placed between the first and the last keyframe. resolution: type: string enum: - hd - fhd default: hd description: The output resolution of the generated video. required: - model - prompt - image_url title: blackforestlabs/flux-3-video-i2v - type: object properties: model: type: string enum: - blackforestlabs/flux-3-video-v2v prompt: type: string minLength: 1 description: The text prompt describing the video to generate. aspect_ratio: type: string enum: - auto - '21:9' - '2:1' - '16:9' - '4:3' - '1:1' - '3:4' - '9:16' default: auto description: >- The aspect ratio of the generated video. `auto` lets the model pick, and image-to-video follows the first keyframe. duration: type: integer minimum: 5 maximum: 20 default: 5 description: The video length in whole seconds, from 5 to 20. generate_audio: type: boolean default: true description: >- Whether to generate a synchronized audio track. Set to `false` for a silent clip. safety_tolerance: type: integer minimum: 0 maximum: 4 default: 2 description: >- The moderation strictness, from 0 (strictest) to 4 (most permissive). video_url: type: string format: uri description: >- The URL of the video to continue. The generated clip carries on from its final frames. resolution: type: string enum: - hd - fhd default: hd description: The output resolution of the generated video. required: - model - prompt - video_url title: blackforestlabs/flux-3-video-v2v - type: object properties: model: type: string enum: - blackforestlabs/flux-3-video-draft-t2v prompt: type: string minLength: 1 description: The text prompt describing the video to generate. aspect_ratio: type: string enum: - auto - '21:9' - '2:1' - '16:9' - '4:3' - '1:1' - '3:4' - '9:16' default: auto description: >- The aspect ratio of the generated video. `auto` lets the model pick, and image-to-video follows the first keyframe. duration: type: integer minimum: 5 maximum: 20 default: 5 description: The video length in whole seconds, from 5 to 20. generate_audio: type: boolean default: true description: >- Whether to generate a synchronized audio track. Set to `false` for a silent clip. safety_tolerance: type: integer minimum: 0 maximum: 4 default: 2 description: >- The moderation strictness, from 0 (strictest) to 4 (most permissive). resolution: type: string enum: - hd default: hd description: >- The output resolution of the generated video. Draft generations are hd-only; use the non-draft model for `fhd`. required: - model - prompt title: blackforestlabs/flux-3-video-draft-t2v - type: object properties: model: type: string enum: - blackforestlabs/flux-3-video-draft-i2v prompt: type: string minLength: 1 description: The text prompt describing the video to generate. aspect_ratio: type: string enum: - auto - '21:9' - '2:1' - '16:9' - '4:3' - '1:1' - '3:4' - '9:16' default: auto description: >- The aspect ratio of the generated video. `auto` lets the model pick, and image-to-video follows the first keyframe. duration: type: integer minimum: 5 maximum: 20 default: 5 description: The video length in whole seconds, from 5 to 20. generate_audio: type: boolean default: true description: >- Whether to generate a synchronized audio track. Set to `false` for a silent clip. safety_tolerance: type: integer minimum: 0 maximum: 4 default: 2 description: >- The moderation strictness, from 0 (strictest) to 4 (most permissive). image_url: type: string format: uri description: The image URL that starts the clip. last_image_url: type: string format: uri description: >- An optional image URL that pins the last frame of the clip. Provide it together with `image_url` to interpolate between the two. image_urls: type: array items: type: string format: uri maxItems: 10 description: >- Optional additional image URLs placed between the first and the last keyframe. resolution: type: string enum: - hd default: hd description: >- The output resolution of the generated video. Draft generations are hd-only; use the non-draft model for `fhd`. required: - model - prompt - image_url title: blackforestlabs/flux-3-video-draft-i2v - type: object properties: model: type: string enum: - blackforestlabs/flux-3-video-draft-v2v prompt: type: string minLength: 1 description: The text prompt describing the video to generate. aspect_ratio: type: string enum: - auto - '21:9' - '2:1' - '16:9' - '4:3' - '1:1' - '3:4' - '9:16' default: auto description: >- The aspect ratio of the generated video. `auto` lets the model pick, and image-to-video follows the first keyframe. duration: type: integer minimum: 5 maximum: 20 default: 5 description: The video length in whole seconds, from 5 to 20. generate_audio: type: boolean default: true description: >- Whether to generate a synchronized audio track. Set to `false` for a silent clip. safety_tolerance: type: integer minimum: 0 maximum: 4 default: 2 description: >- The moderation strictness, from 0 (strictest) to 4 (most permissive). video_url: type: string format: uri description: >- The URL of the video to continue. The generated clip carries on from its final frames. resolution: type: string enum: - hd default: hd description: >- The output resolution of the generated video. Draft generations are hd-only; use the non-draft model for `fhd`. required: - model - prompt - video_url title: blackforestlabs/flux-3-video-draft-v2v - type: object properties: model: type: string enum: - beeble/switchx-video-to-video - switchx-video-to-video video_url: type: string format: uri description: >- URL of the source video to recomposite. Allowed formats: MP4, MOV (H.264 or HEVC), up to 240 frames. Source must not exceed 2,770,000 total pixels. alpha_url: type: string format: uri description: >- URL of the alpha mask. Required when alpha_mode is "custom" or "select"; ignored for "auto" and "fill". A mask video for video-to-video, a mask image for image-to-image. reference_image_url: type: string format: uri description: >- URL of the reference image defining the target look and lighting for the replaced region. Allowed formats: JPEG, PNG, WEBP. At least one of reference_image_url or prompt must be provided. alpha_mode: type: string enum: - auto - fill - custom - select default: auto description: >- Subject masking strategy: "auto" (AI auto-detects the subject), "fill" (no masking), "select" (propagate a mask from one keyframe), or "custom" (frame-by-frame mask supplied via alpha_url). Defaults to "auto". max_resolution: type: integer description: >- Maximum output resolution (longer side) in pixels: 720 or 1080. Defaults to 1080. 1080 costs more than 720. enum: - 720 - 1080 default: '1080' alpha_keyframe_index: type: integer minimum: 0 description: >- Frame index (0-based) whose mask is propagated when alpha_mode is "select" on a video. Defaults to the first frame. Ignored for image generation and for the auto, fill, and custom modes. seed: type: integer minimum: 0 maximum: 4294967295 description: >- Random seed (0–4294967295) for reproducibility. Omit for a random seed. The seed used is always returned in the response. prompt: type: string maxLength: 2000 description: >- Text description of the desired output to guide the generation (max 2000 characters). At least one of prompt or reference_image_url must be provided. required: - model - video_url title: beeble/switchx-video-to-video, switchx-video-to-video responses: '200': content: application/json: schema: type: object properties: id: type: string description: The ID of the generated video. example: 60ac7c34-3224-4b14-8e7d-0aa0db708325 status: type: string enum: - queued - generating - completed - error description: The current status of the generation task. example: completed video: anyOf: - type: object properties: url: type: string format: uri description: The URL where the file can be downloaded from. example: >- https://cdn.aimlapi.com/generations/hedgehog/1759866285599-0cdfb138-c03a-49d4-a601-4f6413e27b15.mp4 required: - url - type: array items: type: object properties: url: type: string format: uri description: The URL where the file can be downloaded from. example: >- https://cdn.aimlapi.com/generations/hedgehog/1759866285599-0cdfb138-c03a-49d4-a601-4f6413e27b15.mp4 required: - url - nullable: true error: type: object nullable: true properties: name: type: string message: type: string required: - name - message description: Description of the error, if any. meta: type: object nullable: true properties: usage: type: object nullable: true 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 - status get: operationId: _v2_video_generations requestBody: required: true content: application/json: schema: type: object properties: model: type: string enum: - sora-2-t2v - openai/sora-2-t2v - sora-2 - openai/sora-2 - sora-2-i2v - openai/sora-2-i2v - sora-2-pro-t2v - openai/sora-2-pro-t2v - sora-2-pro - openai/sora-2-pro - sora-2-pro-i2v - openai/sora-2-pro-i2v - bytedance/seedance-1-0-pro - bytedance/seedance-1-0-pro-fast - bytedance/seedance-1-5-pro - bytedance/dreamina-seedance-2-0 - bytedance/dreamina-seedance-2-0-fast - bytedance/dreamina-seedance-2-0-mini - bytedance/dreamina-seedance-2-5 - bytedance/seedance-1-0-pro-t2v - bytedance/seedance-1-0-pro-i2v - bytedance/seedance-2-0-fast - bytedance/seedance-2.0/fast/image-to-video - bytedance/seedance-2.0/fast/reference-to-video - bytedance/seedance-2.0/fast/text-to-video - bytedance/seedance-2-0 - bytedance/seedance-2.0/image-to-video - bytedance/seedance-2.0/reference-to-video - bytedance/seedance-2.0/text-to-video - bytedance/seedance-2-0-mini - bytedance/seedance-2-5 - bytedance/seedance-2.5 - veo-2.0-generate-001 - google/veo-2.0-generate-001 - veo-3.0-fast-generate-001 - google/veo-3.0-fast-generate-001 - veo-3.0-generate-001 - google/veo-3.0-generate-001 - veo-3.1-lite-generate-001 - google/veo-3.1-lite-generate-001 - veo-3.1-generate-001 - google/veo-3.1-generate-001 - veo-3.1-fast-generate-001 - google/veo-3.1-fast-generate-001 - gemini-omni-flash-preview - google/gemini-omni-flash-preview - gemini-omni-1.1-flash - google/gemini-omni-1.1-flash - google/veo-3.1-t2v - google/veo-3.1-i2v - google/veo-3.1-t2v-fast - google/veo-3.1-i2v-fast - google/veo-3.1-first-last-image-to-video - google/veo-3.1-reference-to-video - google/veo-3.1-first-last-image-to-video-fast - google/veo3-1-extend-video - google/veo3-1-fast-extend-video - veo2 - google/veo2 - veo2/image-to-video - google/veo2-image-to-video - google/veo3 - google/veo-3.0-i2v - google/veo-3.0-fast - google/veo-3.0-i2v-fast - google/veo-3-1-lite-generate-preview - wan2.1-t2v-plus - alibaba/wan2.1-t2v-plus - wan2.1-t2v-turbo - alibaba/wan2.1-t2v-turbo - wan2.2-i2v-plus - alibaba/wan2.2-i2v-plus - wan2.2-t2v-plus - alibaba/wan2.2-t2v-plus - wan2.5-t2v-preview - alibaba/wan2.5-t2v-preview - wan2.5-i2v-preview - alibaba/wan2.5-i2v-preview - wan2.6-t2v - alibaba/wan2.6-t2v - wan2.6-i2v - alibaba/wan2.6-i2v - wan2.6-i2v-flash - alibaba/wan2.6-i2v-flash - wan2.6-r2v - alibaba/wan2.6-r2v - wan2.7-t2v - alibaba/wan2.7-t2v - wan2.7-i2v - alibaba/wan2.7-i2v - wan2.7-r2v - alibaba/wan2.7-r2v - wan3.0-video - alibaba/wan3.0-video - custom:happyhorse-1.0 - alibaba/custom:happyhorse-1.0 - happyhorse-1.0-t2v - alibaba/happyhorse-1.0-t2v - happyhorse-1.0-i2v - alibaba/happyhorse-1.0-i2v - happyhorse-1.0-r2v - alibaba/happyhorse-1.0-r2v - happyhorse-1.0-video-edit - alibaba/happyhorse-1.0-video-edit - happyhorse-1.1-t2v - alibaba/happyhorse-1.1-t2v - happyhorse-1.1-i2v - alibaba/happyhorse-1.1-i2v - happyhorse-1.1-r2v - alibaba/happyhorse-1.1-r2v - custom:happyhorse-1.1 - alibaba/custom:happyhorse-1.1 - alibaba/wan2.2-vace-fun-a14b-depth - alibaba/wan2.2-vace-fun-a14b-pose - alibaba/wan2.2-vace-fun-a14b-inpainting - alibaba/wan2.2-vace-fun-a14b-outpainting - alibaba/wan2.2-vace-fun-a14b-reframe - alibaba/wan2.2-14b-animate-move - alibaba/wan2.2-14b-animate-replace - alibaba/wan-2-6-t2v - alibaba/wan-2-6-i2v - alibaba/wan-2-6-image-to-video-flash - alibaba/wan-2-6-r2v - alibaba/wan-2-7-t2v - alibaba/wan-2-7-i2v - alibaba/wan-2-7-r2v - alibaba/wan-3-0-video - alibaba/happyhorse-1-0 - alibaba/happyhorse-1-1 - alibaba/happyhorse-1-1-t2v - alibaba/happyhorse-1-1-i2v - alibaba/happyhorse-1-1-r2v - test/dummy-video - video-01 - video-01-live2d - minimax/hailuo-02 - minimax/hailuo-2.3 - minimax/hailuo-2.3-fast - minimax/h3 - xai/grok-imagine-video - x-ai/grok-imagine-video - xai/grok-imagine-video-1.5-preview - x-ai/grok-imagine-video-1.5-preview - kling-video/v1/standard/image-to-video - kling-video/v1/standard/text-to-video - kling-video/v1/pro/image-to-video - kling-video/v1/pro/text-to-video - kling-video/v1.5/pro/image-to-video - kling-video/v1.5/pro/text-to-video - kling-video/v1.6/standard/text-to-video - kling-video/v1.6/standard/image-to-video - kling-video/v1.6/pro/image-to-video - kling-video/v1.6/pro/text-to-video - klingai/kling-video-v1.6-pro-effects - klingai/kling-video-v1.6-standard-effects - kling-video/v1.6/standard/multi-image-to-video - klingai/v2-master-image-to-video - klingai/v2-master-text-to-video - kling-video/v2.1/standard/image-to-video - klingai/v2.1-master-image-to-video - klingai/v2.1-master-text-to-video - kling-video/v2.1/pro/image-to-video - klingai/v2.5-turbo/pro/image-to-video - klingai/v2.5-turbo/pro/text-to-video - klingai/avatar-standard - klingai/avatar-pro - klingai/video-o1-image-to-video - klingai/video-o1-reference-to-video - klingai/video-o1-video-to-video-edit - klingai/video-o1-video-to-video-reference - klingai/video-v2-6-pro-image-to-video - klingai/video-v2-6-pro-text-to-video - klingai/video-v2-6-pro-motion-control - klingai/video-v2-6-motion-control - klingai/video-v3-standard-text-to-video - klingai/video-v3-standard-image-to-video - klingai/video-v3-pro-text-to-video - klingai/video-v3-pro-image-to-video - klingai/video-v3-omni-720p-text-to-video - klingai/video-v3-omni-720p-image-to-video - klingai/video-v3-omni-1080p-text-to-video - klingai/video-v3-omni-1080p-image-to-video - klingai/video-v3-standard-turbo-text-to-video - klingai/video-v3-standard-turbo-image-to-video - klingai/video-v3-turbo-pro-text-to-video - klingai/video-v3-turbo-pro-image-to-video - klingai/video-v3-motion-control - pixverse/v5/text-to-video - pixverse/v5/image-to-video - pixverse/v5/transition - pixverse/lip-sync - pixverse/v5.5/text-to-video - pixverse/v5-5-text-to-video - pixverse/v5.5/image-to-video - pixverse/v5-5-image-to-video - ray-2 - luma/ray-2 - ray-flash-2 - luma/ray-flash-2 - luma/ray-3.2 - gen3a_turbo - runway/gen3a_turbo - gen4_turbo - runway/gen4_turbo - gen4_aleph - runway/gen4_aleph - act_two - runway/act_two - magic/text-to-video - magic/image-to-video - magic/video-to-video - kling-video/v2.5-turbo/pro/image-to-video - kling-video/v2.5-turbo/pro/text-to-video - kling-video/v1/standard/ai-avatar - kling-video/v1/pro/ai-avatar - kling-video/o1/image-to-video - kling-video/o1/reference-to-video - kling-video/o1/video-to-video/edit - kling-video/o1/video-to-video/reference - kling-video/v2.6/pro/text-to-video - kling-video/v2.6/pro/image-to-video - kling-video/v2/master/image-to-video - kling-video/v2/master/text-to-video - kling-video/v2.1/master/image-to-video - kling-video/v2.1/master/text-to-video - kling-video/v3/standard/text-to-video - kling-video/v3/standard/image-to-video - kling-video/v3/pro/text-to-video - kling-video/v3/pro/image-to-video - kling-video/v3/turbo/standard/text-to-video - kling-video/v3/turbo/standard/image-to-video - kling-video/v3/turbo/pro/text-to-video - kling-video/v3/turbo/pro/image-to-video - veo3.1 - veo3.1/image-to-video - veo3.1/first-last-frame-to-video - veo3.1/reference-to-video - veo3.1/fast - veo3.1/fast/image-to-video - veo3.1/fast/first-last-frame-to-video - veo3.1/extend-video - veo3.1/fast/extend-video - veo3.1/lite/image-to-video - veo3.1/lite/first-last-frame-to-video - veo3.1/lite - bytedance/omnihuman - bytedance/omnihuman/v1.5 - hunyuan-video-foley - wan-22-vace-fun-a14b/depth - wan-22-vace-fun-a14b/pose - wan-22-vace-fun-a14b/inpainting - wan-22-vace-fun-a14b/outpainting - wan-22-vace-fun-a14b/reframe - wan/v2.2-14b/animate/move - wan/v2.2-14b/animate/replace - kandinsky5/text-to-video - kandinsky5/text-to-video/distill - krea-wan-14b/text-to-video - krea-wan-14b/video-to-video - ltxv-2 - ltxv-2/image-to-video - ltxv-2/text-to-video - ltxv-2/fast - ltxv-2/image-to-video/fast - ltxv-2/text-to-video/fast - veed/fabric-1.0 - veed/fabric-1.0/fast - tencent/hunyuan-video-foley - sber-ai/kandinsky5-t2v - sber-ai/kandinsky5-distill-t2v - krea/krea-wan-14b/text-to-video - krea/krea-wan-14b/video-to-video - ltxv/ltxv-2 - ltxv/ltxv-2-fast - blackforestlabs/flux-3-video-t2v - blackforestlabs/flux-3-video-i2v - blackforestlabs/flux-3-video-v2v - blackforestlabs/flux-3-video-draft-t2v - blackforestlabs/flux-3-video-draft-i2v - blackforestlabs/flux-3-video-draft-v2v - beeble/switchx-video-to-video - switchx-video-to-video id: type: string required: - model - id title: >- sora-2-t2v, openai/sora-2-t2v, sora-2, openai/sora-2, sora-2-i2v, openai/sora-2-i2v, sora-2-pro-t2v, openai/sora-2-pro-t2v, sora-2-pro, openai/sora-2-pro, sora-2-pro-i2v, openai/sora-2-pro-i2v, bytedance/seedance-1-0-pro, bytedance/seedance-1-0-pro-fast, bytedance/seedance-1-5-pro, bytedance/dreamina-seedance-2-0, bytedance/dreamina-seedance-2-0-fast, bytedance/dreamina-seedance-2-0-mini, bytedance/dreamina-seedance-2-5, bytedance/seedance-1-0-pro-t2v, bytedance/seedance-1-0-pro-i2v, bytedance/seedance-2-0-fast, bytedance/seedance-2.0/fast/image-to-video, bytedance/seedance-2.0/fast/reference-to-video, bytedance/seedance-2.0/fast/text-to-video, bytedance/seedance-2-0, bytedance/seedance-2.0/image-to-video, bytedance/seedance-2.0/reference-to-video, bytedance/seedance-2.0/text-to-video, bytedance/seedance-2-0-mini, bytedance/seedance-2-5, bytedance/seedance-2.5, veo-2.0-generate-001, google/veo-2.0-generate-001, veo-3.0-fast-generate-001, google/veo-3.0-fast-generate-001, veo-3.0-generate-001, google/veo-3.0-generate-001, veo-3.1-lite-generate-001, google/veo-3.1-lite-generate-001, veo-3.1-generate-001, google/veo-3.1-generate-001, veo-3.1-fast-generate-001, google/veo-3.1-fast-generate-001, gemini-omni-flash-preview, google/gemini-omni-flash-preview, gemini-omni-1.1-flash, google/gemini-omni-1.1-flash, google/veo-3.1-t2v, google/veo-3.1-i2v, google/veo-3.1-t2v-fast, google/veo-3.1-i2v-fast, google/veo-3.1-first-last-image-to-video, google/veo-3.1-reference-to-video, google/veo-3.1-first-last-image-to-video-fast, google/veo3-1-extend-video, google/veo3-1-fast-extend-video, veo2, google/veo2, veo2/image-to-video, google/veo2-image-to-video, google/veo3, google/veo-3.0-i2v, google/veo-3.0-fast, google/veo-3.0-i2v-fast, google/veo-3-1-lite-generate-preview, wan2.1-t2v-plus, alibaba/wan2.1-t2v-plus, wan2.1-t2v-turbo, alibaba/wan2.1-t2v-turbo, wan2.2-i2v-plus, alibaba/wan2.2-i2v-plus, wan2.2-t2v-plus, alibaba/wan2.2-t2v-plus, wan2.5-t2v-preview, alibaba/wan2.5-t2v-preview, wan2.5-i2v-preview, alibaba/wan2.5-i2v-preview, wan2.6-t2v, alibaba/wan2.6-t2v, wan2.6-i2v, alibaba/wan2.6-i2v, wan2.6-i2v-flash, alibaba/wan2.6-i2v-flash, wan2.6-r2v, alibaba/wan2.6-r2v, wan2.7-t2v, alibaba/wan2.7-t2v, wan2.7-i2v, alibaba/wan2.7-i2v, wan2.7-r2v, alibaba/wan2.7-r2v, wan3.0-video, alibaba/wan3.0-video, custom:happyhorse-1.0, alibaba/custom:happyhorse-1.0, happyhorse-1.0-t2v, alibaba/happyhorse-1.0-t2v, happyhorse-1.0-i2v, alibaba/happyhorse-1.0-i2v, happyhorse-1.0-r2v, alibaba/happyhorse-1.0-r2v, happyhorse-1.0-video-edit, alibaba/happyhorse-1.0-video-edit, happyhorse-1.1-t2v, alibaba/happyhorse-1.1-t2v, happyhorse-1.1-i2v, alibaba/happyhorse-1.1-i2v, happyhorse-1.1-r2v, alibaba/happyhorse-1.1-r2v, custom:happyhorse-1.1, alibaba/custom:happyhorse-1.1, alibaba/wan2.2-vace-fun-a14b-depth, alibaba/wan2.2-vace-fun-a14b-pose, alibaba/wan2.2-vace-fun-a14b-inpainting, alibaba/wan2.2-vace-fun-a14b-outpainting, alibaba/wan2.2-vace-fun-a14b-reframe, alibaba/wan2.2-14b-animate-move, alibaba/wan2.2-14b-animate-replace, alibaba/wan-2-6-t2v, alibaba/wan-2-6-i2v, alibaba/wan-2-6-image-to-video-flash, alibaba/wan-2-6-r2v, alibaba/wan-2-7-t2v, alibaba/wan-2-7-i2v, alibaba/wan-2-7-r2v, alibaba/wan-3-0-video, alibaba/happyhorse-1-0, alibaba/happyhorse-1-1, alibaba/happyhorse-1-1-t2v, alibaba/happyhorse-1-1-i2v, alibaba/happyhorse-1-1-r2v, test/dummy-video, video-01, video-01-live2d, minimax/hailuo-02, minimax/hailuo-2.3, minimax/hailuo-2.3-fast, minimax/h3, xai/grok-imagine-video, x-ai/grok-imagine-video, xai/grok-imagine-video-1.5-preview, x-ai/grok-imagine-video-1.5-preview, kling-video/v1/standard/image-to-video, kling-video/v1/standard/text-to-video, kling-video/v1/pro/image-to-video, kling-video/v1/pro/text-to-video, kling-video/v1.5/pro/image-to-video, kling-video/v1.5/pro/text-to-video, kling-video/v1.6/standard/text-to-video, kling-video/v1.6/standard/image-to-video, kling-video/v1.6/pro/image-to-video, kling-video/v1.6/pro/text-to-video, klingai/kling-video-v1.6-pro-effects, klingai/kling-video-v1.6-standard-effects, kling-video/v1.6/standard/multi-image-to-video, klingai/v2-master-image-to-video, klingai/v2-master-text-to-video, kling-video/v2.1/standard/image-to-video, klingai/v2.1-master-image-to-video, klingai/v2.1-master-text-to-video, kling-video/v2.1/pro/image-to-video, klingai/v2.5-turbo/pro/image-to-video, klingai/v2.5-turbo/pro/text-to-video, klingai/avatar-standard, klingai/avatar-pro, klingai/video-o1-image-to-video, klingai/video-o1-reference-to-video, klingai/video-o1-video-to-video-edit, klingai/video-o1-video-to-video-reference, klingai/video-v2-6-pro-image-to-video, klingai/video-v2-6-pro-text-to-video, klingai/video-v2-6-pro-motion-control, klingai/video-v2-6-motion-control, klingai/video-v3-standard-text-to-video, klingai/video-v3-standard-image-to-video, klingai/video-v3-pro-text-to-video, klingai/video-v3-pro-image-to-video, klingai/video-v3-omni-720p-text-to-video, klingai/video-v3-omni-720p-image-to-video, klingai/video-v3-omni-1080p-text-to-video, klingai/video-v3-omni-1080p-image-to-video, klingai/video-v3-standard-turbo-text-to-video, klingai/video-v3-standard-turbo-image-to-video, klingai/video-v3-turbo-pro-text-to-video, klingai/video-v3-turbo-pro-image-to-video, klingai/video-v3-motion-control, pixverse/v5/text-to-video, pixverse/v5/image-to-video, pixverse/v5/transition, pixverse/lip-sync, pixverse/v5.5/text-to-video, pixverse/v5-5-text-to-video, pixverse/v5.5/image-to-video, pixverse/v5-5-image-to-video, ray-2, luma/ray-2, ray-flash-2, luma/ray-flash-2, luma/ray-3.2, gen3a_turbo, runway/gen3a_turbo, gen4_turbo, runway/gen4_turbo, gen4_aleph, runway/gen4_aleph, act_two, runway/act_two, magic/text-to-video, magic/image-to-video, magic/video-to-video, kling-video/v2.5-turbo/pro/image-to-video, kling-video/v2.5-turbo/pro/text-to-video, kling-video/v1/standard/ai-avatar, kling-video/v1/pro/ai-avatar, kling-video/o1/image-to-video, kling-video/o1/reference-to-video, kling-video/o1/video-to-video/edit, kling-video/o1/video-to-video/reference, kling-video/v2.6/pro/text-to-video, kling-video/v2.6/pro/image-to-video, kling-video/v2/master/image-to-video, kling-video/v2/master/text-to-video, kling-video/v2.1/master/image-to-video, kling-video/v2.1/master/text-to-video, kling-video/v3/standard/text-to-video, kling-video/v3/standard/image-to-video, kling-video/v3/pro/text-to-video, kling-video/v3/pro/image-to-video, kling-video/v3/turbo/standard/text-to-video, kling-video/v3/turbo/standard/image-to-video, kling-video/v3/turbo/pro/text-to-video, kling-video/v3/turbo/pro/image-to-video, veo3.1, veo3.1/image-to-video, veo3.1/first-last-frame-to-video, veo3.1/reference-to-video, veo3.1/fast, veo3.1/fast/image-to-video, veo3.1/fast/first-last-frame-to-video, veo3.1/extend-video, veo3.1/fast/extend-video, veo3.1/lite/image-to-video, veo3.1/lite/first-last-frame-to-video, veo3.1/lite, bytedance/omnihuman, bytedance/omnihuman/v1.5, hunyuan-video-foley, wan-22-vace-fun-a14b/depth, wan-22-vace-fun-a14b/pose, wan-22-vace-fun-a14b/inpainting, wan-22-vace-fun-a14b/outpainting, wan-22-vace-fun-a14b/reframe, wan/v2.2-14b/animate/move, wan/v2.2-14b/animate/replace, kandinsky5/text-to-video, kandinsky5/text-to-video/distill, krea-wan-14b/text-to-video, krea-wan-14b/video-to-video, ltxv-2, ltxv-2/image-to-video, ltxv-2/text-to-video, ltxv-2/fast, ltxv-2/image-to-video/fast, ltxv-2/text-to-video/fast, veed/fabric-1.0, veed/fabric-1.0/fast, tencent/hunyuan-video-foley, sber-ai/kandinsky5-t2v, sber-ai/kandinsky5-distill-t2v, krea/krea-wan-14b/text-to-video, krea/krea-wan-14b/video-to-video, ltxv/ltxv-2, ltxv/ltxv-2-fast, blackforestlabs/flux-3-video-t2v, blackforestlabs/flux-3-video-i2v, blackforestlabs/flux-3-video-v2v, blackforestlabs/flux-3-video-draft-t2v, blackforestlabs/flux-3-video-draft-i2v, blackforestlabs/flux-3-video-draft-v2v, beeble/switchx-video-to-video, switchx-video-to-video responses: '200': content: application/json: schema: type: object properties: id: type: string description: The ID of the generated video. example: 60ac7c34-3224-4b14-8e7d-0aa0db708325 status: type: string enum: - queued - generating - completed - error description: The current status of the generation task. example: completed video: anyOf: - type: object properties: url: type: string format: uri description: The URL where the file can be downloaded from. example: >- https://cdn.aimlapi.com/generations/hedgehog/1759866285599-0cdfb138-c03a-49d4-a601-4f6413e27b15.mp4 required: - url - type: array items: type: object properties: url: type: string format: uri description: The URL where the file can be downloaded from. example: >- https://cdn.aimlapi.com/generations/hedgehog/1759866285599-0cdfb138-c03a-49d4-a601-4f6413e27b15.mp4 required: - url - nullable: true error: type: object nullable: true properties: name: type: string message: type: string required: - name - message description: Description of the error, if any. meta: type: object nullable: true properties: usage: type: object nullable: true 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 - status /v1/stt/create: post: operationId: _v1_stt_create requestBody: required: true content: application/json: schema: anyOf: - type: object properties: model: type: string enum: - gpt-4o-transcribe - openai/gpt-4o-transcribe - gpt-4o-mini-transcribe - openai/gpt-4o-mini-transcribe url: type: string format: uri description: >- URL of the input audio file. Provide either url or file — exactly one is required, not both. example: https://example.com/audio/sample.mp3 file: type: string description: >- The audio file to transcribe. Provide either url or file — exactly one is required, not both. format: binary language: type: string description: >- The BCP-47 language tag that hints at the primary spoken language. Depending on the Model and API endpoint you choose only certain languages are available prompt: type: string description: >- An optional text to guide the model's style or continue a previous audio segment. The prompt should match the audio language. temperature: type: number minimum: 0 maximum: 1 default: 0 description: >- The sampling temperature, between 0 and 1. Higher values like 0.8 will make the output more random, while lower values like 0.2 will make it more focused and deterministic. required: - model title: >- gpt-4o-transcribe, openai/gpt-4o-transcribe, gpt-4o-mini-transcribe, openai/gpt-4o-mini-transcribe - type: object properties: model: type: string enum: - test/dummy-stt url: type: string minLength: 1 duration: type: integer minimum: 1 maximum: 600 default: 5 language: type: string test: type: object properties: delay: type: number runningPolls: type: number errorStatus: type: number submitErrorStatus: type: number required: - model - url title: test/dummy-stt - type: object properties: model: type: string enum: - nova-2-general - deepgram/nova-2-general - '#g1_nova-2-general' - nova-2-meeting - deepgram/nova-2-meeting - '#g1_nova-2-meeting' - nova-2-phonecall - deepgram/nova-2-phonecall - '#g1_nova-2-phonecall' - nova-2-voicemail - deepgram/nova-2-voicemail - '#g1_nova-2-voicemail' - nova-2-finance - deepgram/nova-2-finance - '#g1_nova-2-finance' - nova-2-conversationalai - deepgram/nova-2-conversationalai - '#g1_nova-2-conversationalai' - nova-2-video - deepgram/nova-2-video - '#g1_nova-2-video' - nova-2-medical - deepgram/nova-2-medical - '#g1_nova-2-medical' - nova-2-drivethru - deepgram/nova-2-drivethru - '#g1_nova-2-drivethru' - nova-2-automotive - deepgram/nova-2-automotive - '#g1_nova-2-automotive' - whisper-large - deepgram/whisper-large - '#g1_whisper-large' - whisper-medium - deepgram/whisper-medium - '#g1_whisper-medium' - whisper-small - deepgram/whisper-small - '#g1_whisper-small' - whisper-tiny - deepgram/whisper-tiny - '#g1_whisper-tiny' - whisper-base - deepgram/whisper-base - '#g1_whisper-base' url: type: string format: uri description: >- URL of the input audio file. Provide either url or audio — exactly one is required, not both. example: https://example.com/audio/sample.mp3 audio: type: string description: >- The audio file to transcribe. Provide either url or audio — exactly one is required, not both. format: binary custom_intent: anyOf: - type: string - type: array items: type: string description: >- A custom intent you want the model to detect within your input audio if present. Submit up to 100. custom_topic: anyOf: - type: string - type: array items: type: string description: >- A custom topic you want the model to detect within your input audio if present. Submit up to 100. custom_intent_mode: type: string enum: - strict - extended description: >- Sets how the model will interpret strings submitted to the custom_intent param. When strict, the model will only return intents submitted using the custom_intent param. When extended, the model will return its own detected intents in addition those submitted using the custom_intents param. custom_topic_mode: type: string enum: - strict - extended description: >- Sets how the model will interpret strings submitted to the custom_topic param. When strict, the model will only return topics submitted using the custom_topic param. When extended, the model will return its own detected topics in addition to those submitted using the custom_topic param. detect_language: anyOf: - type: array items: type: string - type: boolean description: >- Enables language detection to identify the dominant language spoken in the submitted audio. detect_entities: type: boolean description: >- When Entity Detection is enabled, the Punctuation feature will be enabled by default. diarize: type: boolean description: >- Recognizes speaker changes. Each word in the transcript will be assigned a speaker number starting at 0. dictation: type: boolean description: >- Identifies and extracts key entities from content in submitted audio. encoding: type: string enum: - linear16 - flac - mulaw - amr-nb - amr-wb - opus - speex - g729 description: >- Expected encoding of the submitted audio (used mainly for raw audio). One of: linear16, flac, mulaw, amr-nb, amr-wb, opus, speex, g729. extra: anyOf: - type: string - type: array items: type: string description: >- Arbitrary key-value pairs that are attached to the API response for usage in downstream processing. filler_words: type: boolean description: >- Filler Words can help transcribe interruptions in your audio, like “uh” and “um”. intents: type: boolean description: >- Recognizes speaker intent throughout a transcript or text. language: type: string description: >- The BCP-47 language tag that hints at the primary spoken language. Depending on the Model and API endpoint you choose only certain languages are available measurements: type: boolean description: >- Spoken measurements will be converted to their corresponding abbreviations mip_opt_out: type: boolean description: >- Opt out of the Deepgram Model Improvement Program for this request. multichannel: type: boolean description: Enable Multichannel transcription, can be true or false. numerals: type: boolean description: >- Numerals converts numbers from written format to numerical format paragraphs: type: boolean description: >- Splits audio into paragraphs to improve transcript readability profanity_filter: type: boolean description: >- Profanity Filter looks for recognized profanity and converts it to the nearest recognized non-profane word or removes it from the transcript completely punctuate: type: boolean description: Adds punctuation and capitalization to the transcript redact: anyOf: - type: string - type: array items: type: string description: >- Redact sensitive information from the transcript. Common values: pii, pci, numbers. Pass a single value or an array. replace: anyOf: - type: string - type: array items: type: string description: >- Search for terms and replace them in the transcript. Provide "find:replace" pairs as a single value or an array. search: anyOf: - type: string - type: array items: type: string description: Search for terms or phrases in submitted audio sentiment: type: boolean description: Recognizes the sentiment throughout a transcript or text smart_format: type: boolean description: >- Applies formatting to transcript output. When set to true, additional formatting will be applied to transcripts to improve readability summarize: anyOf: - type: string - type: boolean description: >- Summarizes content. For Listen API, supports string version option. For Read API, accepts boolean only. tag: anyOf: - type: string - type: array items: type: string description: >- Labels your requests for the purpose of identification during usage reporting topics: type: boolean description: Detects topics throughout a transcript or text utterances: type: boolean description: Segments speech into meaningful semantic units utt_split: type: number description: >- Seconds to wait before detecting a pause between words in submitted audio version: type: string description: >- Model version to use (e.g. "latest" or a specific version string). Defaults to latest. keywords: anyOf: - type: string - type: array items: type: string description: >- Keywords can boost or suppress specialized terminology and brands. required: - model title: >- nova-2-general, deepgram/nova-2-general, #g1_nova-2-general, nova-2-meeting, deepgram/nova-2-meeting, #g1_nova-2-meeting, nova-2-phonecall, deepgram/nova-2-phonecall, #g1_nova-2-phonecall, nova-2-voicemail, deepgram/nova-2-voicemail, #g1_nova-2-voicemail, nova-2-finance, deepgram/nova-2-finance, #g1_nova-2-finance, nova-2-conversationalai, deepgram/nova-2-conversationalai, #g1_nova-2-conversationalai, nova-2-video, deepgram/nova-2-video, #g1_nova-2-video, nova-2-medical, deepgram/nova-2-medical, #g1_nova-2-medical, nova-2-drivethru, deepgram/nova-2-drivethru, #g1_nova-2-drivethru, nova-2-automotive, deepgram/nova-2-automotive, #g1_nova-2-automotive, whisper-large, deepgram/whisper-large, #g1_whisper-large, whisper-medium, deepgram/whisper-medium, #g1_whisper-medium, whisper-small, deepgram/whisper-small, #g1_whisper-small, whisper-tiny, deepgram/whisper-tiny, #g1_whisper-tiny, whisper-base, deepgram/whisper-base, #g1_whisper-base - type: object properties: model: type: string enum: - nova-3 - deepgram/nova-3 - '#g1_nova-3' - nova-3-general - deepgram/nova-3-general - '#g1_nova-3-general' - nova-3-medical - deepgram/nova-3-medical - '#g1_nova-3-medical' url: type: string format: uri description: >- URL of the input audio file. Provide either url or audio — exactly one is required, not both. example: https://example.com/audio/sample.mp3 audio: type: string description: >- The audio file to transcribe. Provide either url or audio — exactly one is required, not both. format: binary custom_intent: anyOf: - type: string - type: array items: type: string description: >- A custom intent you want the model to detect within your input audio if present. Submit up to 100. custom_topic: anyOf: - type: string - type: array items: type: string description: >- A custom topic you want the model to detect within your input audio if present. Submit up to 100. custom_intent_mode: type: string enum: - strict - extended description: >- Sets how the model will interpret strings submitted to the custom_intent param. When strict, the model will only return intents submitted using the custom_intent param. When extended, the model will return its own detected intents in addition those submitted using the custom_intents param. custom_topic_mode: type: string enum: - strict - extended description: >- Sets how the model will interpret strings submitted to the custom_topic param. When strict, the model will only return topics submitted using the custom_topic param. When extended, the model will return its own detected topics in addition to those submitted using the custom_topic param. detect_language: anyOf: - type: array items: type: string - type: boolean description: >- Enables language detection to identify the dominant language spoken in the submitted audio. detect_entities: type: boolean description: >- When Entity Detection is enabled, the Punctuation feature will be enabled by default. diarize: type: boolean description: >- Recognizes speaker changes. Each word in the transcript will be assigned a speaker number starting at 0. dictation: type: boolean description: >- Identifies and extracts key entities from content in submitted audio. encoding: type: string enum: - linear16 - flac - mulaw - amr-nb - amr-wb - opus - speex - g729 description: >- Expected encoding of the submitted audio (used mainly for raw audio). One of: linear16, flac, mulaw, amr-nb, amr-wb, opus, speex, g729. extra: anyOf: - type: string - type: array items: type: string description: >- Arbitrary key-value pairs that are attached to the API response for usage in downstream processing. filler_words: type: boolean description: >- Filler Words can help transcribe interruptions in your audio, like “uh” and “um”. intents: type: boolean description: >- Recognizes speaker intent throughout a transcript or text. language: type: string description: >- The BCP-47 language tag that hints at the primary spoken language. Depending on the Model and API endpoint you choose only certain languages are available measurements: type: boolean description: >- Spoken measurements will be converted to their corresponding abbreviations mip_opt_out: type: boolean description: >- Opt out of the Deepgram Model Improvement Program for this request. multichannel: type: boolean description: Enable Multichannel transcription, can be true or false. numerals: type: boolean description: >- Numerals converts numbers from written format to numerical format paragraphs: type: boolean description: >- Splits audio into paragraphs to improve transcript readability profanity_filter: type: boolean description: >- Profanity Filter looks for recognized profanity and converts it to the nearest recognized non-profane word or removes it from the transcript completely punctuate: type: boolean description: Adds punctuation and capitalization to the transcript redact: anyOf: - type: string - type: array items: type: string description: >- Redact sensitive information from the transcript. Common values: pii, pci, numbers. Pass a single value or an array. replace: anyOf: - type: string - type: array items: type: string description: >- Search for terms and replace them in the transcript. Provide "find:replace" pairs as a single value or an array. search: anyOf: - type: string - type: array items: type: string description: Search for terms or phrases in submitted audio sentiment: type: boolean description: Recognizes the sentiment throughout a transcript or text smart_format: type: boolean description: >- Applies formatting to transcript output. When set to true, additional formatting will be applied to transcripts to improve readability summarize: anyOf: - type: string - type: boolean description: >- Summarizes content. For Listen API, supports string version option. For Read API, accepts boolean only. tag: anyOf: - type: string - type: array items: type: string description: >- Labels your requests for the purpose of identification during usage reporting topics: type: boolean description: Detects topics throughout a transcript or text utterances: type: boolean description: Segments speech into meaningful semantic units utt_split: type: number description: >- Seconds to wait before detecting a pause between words in submitted audio version: type: string description: >- Model version to use (e.g. "latest" or a specific version string). Defaults to latest. keyterm: anyOf: - type: string - type: array items: type: string description: >- Keyterm Prompting (Nova-3 / Flux only): boost recognition of specialized terms, brands, and proper nouns. Pass a single term or an array of terms. required: - model title: >- nova-3, deepgram/nova-3, #g1_nova-3, nova-3-general, deepgram/nova-3-general, #g1_nova-3-general, nova-3-medical, deepgram/nova-3-medical, #g1_nova-3-medical - type: object properties: model: type: string enum: - slam-1 - aai/slam-1 - universal - aai/universal url: type: string format: uri description: >- URL of the input audio file. Provide either url or audio — exactly one is required, not both. example: https://example.com/audio/sample.mp3 audio: type: string description: >- The audio file to transcribe. Provide either url or audio — exactly one is required, not both. format: binary audio_start_from: type: integer nullable: true description: >- The point in time, in milliseconds, in the file at which the transcription was started. audio_end_at: type: integer nullable: true description: >- The point in time, in milliseconds, in the file at which the transcription was terminated. language_code: type: string description: >- The language of your audio file. Possible values are found in Supported Languages. The default value is 'en_us'. language_confidence_threshold: type: number nullable: true minimum: 0 maximum: 1 description: >- The confidence threshold for the automatically detected language. An error will be returned if the language confidence is below this threshold. Defaults to 0. language_detection: type: boolean description: >- Enable Automatic language detection, either true or false. Available for universal model only. punctuate: type: boolean nullable: true default: null description: Adds punctuation and capitalization to the transcript format_text: type: boolean default: true description: Enable Text Formatting, can be true or false. disfluencies: type: boolean default: false description: >- Transcribe Filler Words, like "umm", in your media file; can be true or false. multichannel: type: boolean default: false description: Enable Multichannel transcription, can be true or false. speaker_labels: type: boolean nullable: true default: null description: Enable Speaker diarization, can be true or false. speakers_expected: type: integer nullable: true default: null description: >- Tell the speaker label model how many speakers it should attempt to identify. See Speaker diarization for more details. content_safety: type: boolean default: false description: Enable Content Moderation, can be true or false. iab_categories: type: boolean default: false description: Enable Topic Detection, can be true or false. custom_spelling: type: array items: type: object properties: from: type: string to: type: string required: - from - to description: >- Customize how words are spelled and formatted using to and from values. auto_highlights: type: boolean default: false description: Enable Key Phrases, either true or false. word_boost: type: array items: type: string description: >- The list of custom vocabulary to boost transcription probability for. boost_param: type: string enum: - low - default - high description: >- How much to boost specified words. Allowed values: low, default, high. filter_profanity: type: boolean default: false description: >- Filter profanity from the transcribed text, can be true or false. redact_pii: type: boolean default: false description: >- Redact PII from the transcribed text using the Redact PII model, can be true or false. redact_pii_audio: type: boolean default: false description: >- Generate a copy of the original media file with spoken PII "beeped" out, can be true or false. See PII redaction for more details. redact_pii_audio_quality: type: string enum: - mp3 - wav description: >- Controls the filetype of the audio created by redact_pii_audio. Currently supports mp3 (default) and wav. See PII redaction for more details. redact_pii_policies: type: array items: type: string enum: - account_number - banking_information - blood_type - credit_card_cvv - credit_card_expiration - credit_card_number - date - date_interval - date_of_birth - drivers_license - drug - duration - email_address - event - filename - gender_sexuality - healthcare_number - injury - ip_address - language - location - marital_status - medical_condition - medical_process - money_amount - nationality - number_sequence - occupation - organization - passport_number - password - person_age - person_name - phone_number - physical_attribute - political_affiliation - religion - statistics - time - url - us_social_security_number - username - vehicle_id - zodiac_sign description: >- The list of PII Redaction policies to enable. See PII redaction for more details. redact_pii_sub: type: string enum: - entity_name - hash description: >- The replacement logic for detected PII, can be `entity_type` or `hash`. See PII redaction for more details. sentiment_analysis: type: boolean default: false description: Enable Sentiment Analysis, can be true or false. entity_detection: type: boolean default: false description: Enable Entity Detection, can be true or false. summarization: type: boolean default: false description: Enable Summarization, can be true or false. summary_model: type: string enum: - informative - conversational - catchy description: >- The model to summarize the transcript. Allowed values: informative, conversational, catchy. summary_type: type: string enum: - bullets - bullets_verbose - gist - headline - paragraph description: >- The type of summary. Allowed values: bullets, bullets_verbose, gist, headline, paragraph. auto_chapters: type: boolean default: false description: Enable Auto Chapters, either true or false. speech_threshold: type: number nullable: true minimum: 0 maximum: 1 description: >- Reject audio files that contain less than this fraction of speech. Valid values are in the range [0, 1] inclusive. required: - model title: slam-1, aai/slam-1, universal, aai/universal responses: '200': content: application/json: schema: type: object properties: generation_id: type: string required: - generation_id /v1/stt/:generation_id: get: operationId: _v1_stt_:generation_id requestBody: required: true content: application/json: schema: type: object properties: model: type: string enum: - gpt-4o-transcribe - openai/gpt-4o-transcribe - gpt-4o-mini-transcribe - openai/gpt-4o-mini-transcribe - test/dummy-stt - nova-2-general - deepgram/nova-2-general - '#g1_nova-2-general' - nova-2-meeting - deepgram/nova-2-meeting - '#g1_nova-2-meeting' - nova-2-phonecall - deepgram/nova-2-phonecall - '#g1_nova-2-phonecall' - nova-2-voicemail - deepgram/nova-2-voicemail - '#g1_nova-2-voicemail' - nova-2-finance - deepgram/nova-2-finance - '#g1_nova-2-finance' - nova-2-conversationalai - deepgram/nova-2-conversationalai - '#g1_nova-2-conversationalai' - nova-2-video - deepgram/nova-2-video - '#g1_nova-2-video' - nova-2-medical - deepgram/nova-2-medical - '#g1_nova-2-medical' - nova-2-drivethru - deepgram/nova-2-drivethru - '#g1_nova-2-drivethru' - nova-2-automotive - deepgram/nova-2-automotive - '#g1_nova-2-automotive' - nova-3 - deepgram/nova-3 - '#g1_nova-3' - nova-3-general - deepgram/nova-3-general - '#g1_nova-3-general' - nova-3-medical - deepgram/nova-3-medical - '#g1_nova-3-medical' - whisper-large - deepgram/whisper-large - '#g1_whisper-large' - whisper-medium - deepgram/whisper-medium - '#g1_whisper-medium' - whisper-small - deepgram/whisper-small - '#g1_whisper-small' - whisper-tiny - deepgram/whisper-tiny - '#g1_whisper-tiny' - whisper-base - deepgram/whisper-base - '#g1_whisper-base' - slam-1 - aai/slam-1 - universal - aai/universal id: type: string required: - model - id title: >- gpt-4o-transcribe, openai/gpt-4o-transcribe, gpt-4o-mini-transcribe, openai/gpt-4o-mini-transcribe, test/dummy-stt, nova-2-general, deepgram/nova-2-general, #g1_nova-2-general, nova-2-meeting, deepgram/nova-2-meeting, #g1_nova-2-meeting, nova-2-phonecall, deepgram/nova-2-phonecall, #g1_nova-2-phonecall, nova-2-voicemail, deepgram/nova-2-voicemail, #g1_nova-2-voicemail, nova-2-finance, deepgram/nova-2-finance, #g1_nova-2-finance, nova-2-conversationalai, deepgram/nova-2-conversationalai, #g1_nova-2-conversationalai, nova-2-video, deepgram/nova-2-video, #g1_nova-2-video, nova-2-medical, deepgram/nova-2-medical, #g1_nova-2-medical, nova-2-drivethru, deepgram/nova-2-drivethru, #g1_nova-2-drivethru, nova-2-automotive, deepgram/nova-2-automotive, #g1_nova-2-automotive, nova-3, deepgram/nova-3, #g1_nova-3, nova-3-general, deepgram/nova-3-general, #g1_nova-3-general, nova-3-medical, deepgram/nova-3-medical, #g1_nova-3-medical, whisper-large, deepgram/whisper-large, #g1_whisper-large, whisper-medium, deepgram/whisper-medium, #g1_whisper-medium, whisper-small, deepgram/whisper-small, #g1_whisper-small, whisper-tiny, deepgram/whisper-tiny, #g1_whisper-tiny, whisper-base, deepgram/whisper-base, #g1_whisper-base, slam-1, aai/slam-1, universal, aai/universal responses: '200': content: application/json: schema: type: object properties: id: type: string status: type: string enum: - queued - generating - completed - error output: anyOf: - type: object properties: metadata: type: object properties: transaction_key: type: string description: >- A unique transaction key; currently always “deprecated”. request_id: type: string description: >- A UUID identifying this specific transcription request. sha256: type: string description: >- The SHA-256 hash of the submitted audio file (for pre-recorded requests). created: type: string format: date-time description: ISO-8601 timestamp. duration: type: number description: Length of the audio in seconds. channels: type: number description: >- The top-level results object containing per-channel transcription alternatives. models: type: array items: type: string description: >- List of model UUIDs used for this transcription model_info: type: object additionalProperties: type: object properties: name: type: string description: >- The human-readable name of the model — identifies which model was used. version: type: string description: The specific version of the model. arch: type: string description: >- The architecture of the model — describes the model family / generation. required: - name - version - arch description: >- Mapping from each model UUID (in 'models') to detailed info: its name, version, and architecture. required: - transaction_key - request_id - sha256 - created - duration - channels - models - model_info description: >- Metadata about the transcription response, including timing, models, and IDs. results: type: object nullable: true properties: channels: type: object properties: alternatives: type: array items: type: object properties: transcript: type: string description: >- The full transcript text for this alternative. confidence: type: number description: >- Overall confidence score (0-1) that assigns to this transcript alternative. words: type: array items: type: object properties: word: type: string description: >- The raw recognized word, without punctuation or capitalization. start: type: number description: >- Start timestamp of the word (in seconds, from beginning of audio). end: type: number description: End timestamp of the word (in seconds). confidence: type: number description: >- Confidence score (0-1) for this individual word. punctuated_word: type: string description: >- The same word but with punctuation/capitalization applied (if smart_format is enabled). required: - word - start - end - confidence - punctuated_word description: >- List of word-level timing, confidence, and punctuation details. paragraphs: type: array items: type: object properties: transcript: type: string description: >- The transcript split into paragraphs (with line breaks), when paragraphing is enabled. paragraphs: type: object properties: sentences: type: array items: type: object properties: text: type: string description: >- Text of a single sentence in the paragraph. start: type: number description: Start time of the sentence (in seconds). end: type: number description: End time of the sentence (in seconds). required: - text - start - end description: >- List of sentences in this paragraph, with start/end times. num_words: type: number description: Number of words in this paragraph. start: type: number description: >- Start time of the paragraph (in seconds). end: type: number description: End time of the paragraph (in seconds). required: - sentences - num_words - start - end description: >- Structure describing each paragraph: its timespan, word count, and sentence breakdown. required: - transcript - paragraphs description: >- An array of paragraph objects, present when the paragraphs feature is enabled. required: - transcript - confidence - words - paragraphs description: >- List of possible transcription hypotheses (“alternatives”) for each channel. required: - alternatives description: >- The top-level results object containing per-channel transcription alternatives. required: - channels required: - metadata - type: object properties: id: type: string format: uuid language_model: type: string acoustic_model: type: string language_code: type: string status: type: string enum: - queued - processing - completed - error language_detection: type: boolean language_confidence_threshold: type: number language_confidence: type: number speech_model: type: string enum: - best - slam-1 - universal text: type: string words: type: array items: type: object properties: confidence: type: number end: type: number speaker: type: string start: type: number text: type: string required: - confidence - end - start - text utterances: type: array items: type: object properties: confidence: type: number end: type: number speaker: type: string start: type: number text: type: string words: type: array items: type: object properties: confidence: type: number end: type: number speaker: type: string start: type: number text: type: string required: - confidence - end - start - text required: - confidence - end - speaker - start - text - words confidence: type: number audio_duration: type: number punctuate: type: boolean format_text: type: boolean disfluencies: type: boolean multichannel: type: boolean webhook_url: type: string webhook_status_code: type: number webhook_auth_header_name: type: string speed_boost: type: boolean auto_highlights_result: type: object properties: status: type: string results: type: array items: type: object properties: count: type: number rank: type: number text: type: string timestamps: type: array items: type: object properties: start: type: number end: type: number required: - start - end required: - count - rank - text - timestamps required: - status - results auto_highlights: type: boolean audio_start_from: type: number audio_end_at: type: number word_boost: type: array items: type: string boost_param: type: string filter_profanity: type: boolean redact_pii: type: boolean redact_pii_audio: type: boolean redact_pii_audio_quality: type: string enum: - mp3 - wav redact_pii_policies: type: array items: type: string redact_pii_sub: type: string enum: - entity_name - hash speaker_labels: type: boolean speakers_expected: type: number content_safety: type: boolean iab_categories: type: boolean content_safety_labels: type: object properties: status: type: string results: type: array items: type: object properties: text: type: string labels: type: array items: type: object properties: label: type: string confidence: type: number severity: type: number required: - label - confidence - severity sentences_idx_start: type: number sentences_idx_end: type: number timestamp: type: object properties: start: type: number end: type: number required: - start - end required: - text - labels - sentences_idx_start - sentences_idx_end - timestamp summary: type: object additionalProperties: type: number required: - status - results - summary iab_categories_result: type: object properties: status: type: string results: type: array items: type: object properties: text: type: string labels: type: array items: type: object properties: relevance: type: number label: type: string required: - relevance - label timestamp: type: object properties: start: type: number end: type: number required: - start - end required: - text - labels - timestamp summary: type: object additionalProperties: type: number required: - status - results - summary custom_spelling: type: array items: type: object properties: from: type: string to: type: string required: - from - to chapters: type: array items: type: object properties: summary: type: string headline: type: string gist: type: string start: type: number end: type: number required: - summary - headline - gist - start - end summarization: type: boolean summary_type: type: string summary_model: type: string summary: type: string auto_chapters: type: boolean sentiment_analysis: type: boolean sentiment_analysis_results: type: array items: type: object properties: text: type: string start: type: number end: type: number sentiment: type: string enum: - POSITIVE - NEUTRAL - NEGATIVE confidence: type: number speaker: type: string required: - text - start - end - sentiment - confidence entity_detection: type: boolean entities: type: array items: type: object properties: entity_type: type: string text: type: string start: type: number end: type: number required: - entity_type - text - start - end speech_threshold: type: number throttled: type: boolean error: type: string required: - id - status - type: object properties: text: type: string usage: type: object properties: type: type: string enum: - tokens input_tokens: type: number input_token_details: type: object properties: text_tokens: type: number audio_tokens: type: number required: - text_tokens - audio_tokens output_tokens: type: number total_tokens: type: number required: - input_tokens - output_tokens - total_tokens required: - text error: type: object nullable: true properties: name: type: string message: type: string required: - name - message required: - id - status - output /v1/tts: post: operationId: _v1_tts requestBody: required: true content: application/json: schema: anyOf: - type: object properties: model: type: string enum: - gpt-4o-mini-tts - openai/gpt-4o-mini-tts - tts-1 - openai/tts-1 - tts-1-hd - openai/tts-1-hd text: type: string minLength: 1 maxLength: 4096 description: The text content to be converted to speech. voice: type: string enum: - alloy - ash - ballad - coral - echo - fable - nova - onyx - sage - shimmer - verse default: alloy description: Name of the voice to be used. style: type: string description: >- Determines the style exaggeration of the voice. This setting attempts to amplify the style of the original speaker. It does consume additional computational resources and might increase latency if set to anything other than 0. response_format: type: string enum: - mp3 - opus - aac - flac - wav - pcm default: mp3 description: >- Format of the output content for non-streaming requests. Controls how the generated audio data is encoded in the response. speed: type: number minimum: 0.25 maximum: 4 default: 1 description: >- Adjusts the speed of the voice. A value of 1.0 is the default speed, while values less than 1.0 slow down the speech, and values greater than 1.0 speed it up. stream: type: boolean enum: - false default: false required: - model - text title: >- gpt-4o-mini-tts, openai/gpt-4o-mini-tts, tts-1, openai/tts-1, tts-1-hd, openai/tts-1-hd - type: object properties: model: type: string enum: - bytedance/seed-audio-1-0 - bytedance/seed-audio-1.0 text: type: string minLength: 1 maxLength: 3000 description: >- Text to synthesize (the TTS prompt). Use @Audio1, @Audio2, etc. to reference audio clips. references: type: array items: type: object properties: speaker: type: string description: BytePlus TTS2.0 voice ID or cloned voice ID. audio_data: type: string description: Base64-encoded reference audio. audio_url: type: string format: uri description: URL of a reference audio file. image_data: type: string description: Base64-encoded reference image. image_url: type: string format: uri description: URL of a reference image. maxItems: 3 description: >- Reference resources. Supports up to three audio references or one image reference. audio_config: type: object properties: format: type: string enum: - wav - mp3 - pcm - ogg_opus default: wav description: The format of the generated music. sample_rate: anyOf: - type: string enum: - '8000' - '16000' - '24000' - '32000' - '44100' - '48000' - type: integer description: The sampling rate of the generated music. enum: - 8000 - 16000 - 24000 - 32000 - 44100 - 48000 speech_rate: type: integer minimum: -50 maximum: 100 default: 0 description: >- Speech rate. 100 means 2.0x speed, -50 means 0.5x speed. loudness_rate: type: integer minimum: -50 maximum: 100 default: 0 description: >- Volume. 100 means 2.0x volume, -50 means 0.5x volume. pitch_rate: type: integer minimum: -12 maximum: 12 default: 0 description: Pitch adjustment. watermark: type: object properties: aigc_watermark: type: boolean default: false description: Adds an explicit audio rhythm marker. aigc_metadata: type: object properties: enable: type: boolean default: false content_producer: type: string produce_id: type: string content_propagator: type: string propagate_id: type: string description: Implicit watermark metadata. required: - model - text title: bytedance/seed-audio-1-0, bytedance/seed-audio-1.0 - type: object properties: model: type: string enum: - elevenlabs/eleven_multilingual_v2 - elevenlabs/eleven_turbo_v2_5 text: type: string description: The text content to be converted to speech. voice: type: string enum: - Rachel - Bella - Roger - Sarah - Laura - Charlie - George - Callum - River - Harry - Liam - Alice - Matilda - Will - Jessica - Eric - Chris - Brian - Daniel - Lily - Adam - Bill - Drew - Clyde - Paul - Aria - Domi - Dave - Fin - Antoni - Thomas - Emily - Elli - Patrick - Dorothy - Josh - Charlotte - James - Joseph - Jeremy - Michael - Ethan - Gigi - Freya - Grace - Serena - Nicole - Jessie - Sam - Glinda - Giovanni - Mimi default: Rachel description: Name of the voice to be used. apply_text_normalization: type: string enum: - auto - 'on' - 'off' description: >- This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. output_format: type: string enum: - mp3_22050_32 - mp3_44100_32 - mp3_44100_64 - mp3_44100_96 - mp3_44100_128 - mp3_44100_192 - pcm_8000 - pcm_16000 - pcm_22050 - pcm_24000 - pcm_44100 - pcm_48000 - ulaw_8000 - alaw_8000 - opus_48000_32 - opus_48000_64 - opus_48000_96 - opus_48000_128 - opus_48000_192 description: >- Format of the output content for non-streaming requests. Controls how the generated audio data is encoded in the response. voice_settings: type: object properties: stability: type: number minimum: 0 maximum: 1 default: 0.5 description: >- Determines how stable the voice is and the randomness between each generation. Lower values introduce broader emotional range for the voice. Higher values can result in a monotonous voice with limited emotion. use_speaker_boost: type: boolean default: true description: >- This setting boosts the similarity to the original speaker. Using this setting requires a slightly higher computational load, which in turn increases latency. similarity_boost: type: number minimum: 0 maximum: 1 default: 0.75 description: >- Determines how closely the AI should adhere to the original voice when attempting to replicate it. style: type: number minimum: 0 maximum: 1 default: 0 description: >- Determines the style exaggeration of the voice. This setting attempts to amplify the style of the original speaker. It does consume additional computational resources and might increase latency if set to anything other than 0. speed: type: number minimum: 0.7 maximum: 1.2 default: 1 description: >- Adjusts the speed of the voice. A value of 1.0 is the default speed, while values less than 1.0 slow down the speech, and values greater than 1.0 speed it up. description: >- Voice settings overriding stored settings for the given voice. They are applied only on the given request. seed: type: integer description: >- 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. Determinism is not guaranteed. stream: type: boolean default: true next_text: type: string description: >- The text that comes after the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. previous_text: type: string description: >- The text that came before the text of the current request. Can be used to improve the speech's continuity when concatenating together multiple generations or to influence the speech's continuity in the current generation. required: - model - text title: >- elevenlabs/eleven_multilingual_v2, elevenlabs/eleven_turbo_v2_5 - type: object properties: model: type: string enum: - elevenlabs/v3_alpha text: type: string description: The text content to be converted to speech. voice: type: string enum: - Rachel - Bella - Roger - Sarah - Laura - Charlie - George - Callum - River - Harry - Liam - Alice - Matilda - Will - Jessica - Eric - Chris - Brian - Daniel - Lily - Adam - Bill - Drew - Clyde - Paul - Aria - Domi - Dave - Fin - Antoni - Thomas - Emily - Elli - Patrick - Dorothy - Josh - Charlotte - James - Joseph - Jeremy - Michael - Ethan - Gigi - Freya - Grace - Serena - Nicole - Jessie - Sam - Glinda - Giovanni - Mimi default: Rachel description: Name of the voice to be used. apply_text_normalization: type: string enum: - auto - 'on' - 'off' description: >- This parameter controls text normalization with three modes: 'auto', 'on', and 'off'. When set to 'auto', the system will automatically decide whether to apply text normalization (e.g., spelling out numbers). With 'on', text normalization will always be applied, while with 'off', it will be skipped. output_format: type: string enum: - mp3_22050_32 - mp3_44100_32 - mp3_44100_64 - mp3_44100_96 - mp3_44100_128 - mp3_44100_192 - pcm_8000 - pcm_16000 - pcm_22050 - pcm_24000 - pcm_44100 - pcm_48000 - ulaw_8000 - alaw_8000 - opus_48000_32 - opus_48000_64 - opus_48000_96 - opus_48000_128 - opus_48000_192 description: >- Format of the output content for non-streaming requests. Controls how the generated audio data is encoded in the response. voice_settings: type: object properties: stability: type: number minimum: 0 maximum: 1 default: 0.5 description: >- Determines how stable the voice is and the randomness between each generation. Lower values introduce broader emotional range for the voice. Higher values can result in a monotonous voice with limited emotion. use_speaker_boost: type: boolean default: true description: >- This setting boosts the similarity to the original speaker. Using this setting requires a slightly higher computational load, which in turn increases latency. similarity_boost: type: number minimum: 0 maximum: 1 default: 0.75 description: >- Determines how closely the AI should adhere to the original voice when attempting to replicate it. style: type: number minimum: 0 maximum: 1 default: 0 description: >- Determines the style exaggeration of the voice. This setting attempts to amplify the style of the original speaker. It does consume additional computational resources and might increase latency if set to anything other than 0. speed: type: number minimum: 0.7 maximum: 1.2 default: 1 description: >- Adjusts the speed of the voice. A value of 1.0 is the default speed, while values less than 1.0 slow down the speech, and values greater than 1.0 speed it up. description: >- Voice settings overriding stored settings for the given voice. They are applied only on the given request. seed: type: integer description: >- 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. Determinism is not guaranteed. stream: type: boolean default: true required: - model - text title: elevenlabs/v3_alpha - type: object properties: model: type: string enum: - qwen3-tts-flash - alibaba/qwen3-tts-flash text: type: string minLength: 1 maxLength: 600 description: The text content to be converted to speech. voice: type: string enum: - Cherry - Ethan - Nofish - Jennifer - Ryan - Katerina - Elias - Jada - Dylan - Sunny - Li - Marcus - Roy - Peter - Rocky - Kiki - Eric default: Cherry description: Name of the voice to be used. stream: type: boolean enum: - false default: false required: - model - text title: qwen3-tts-flash, alibaba/qwen3-tts-flash - type: object properties: model: type: string enum: - test/dummy-tts text: type: string minLength: 1 maxLength: 4096 voice: type: string default: alloy response_format: type: string enum: - mp3 - opus - aac - flac - wav stream: type: boolean enum: - false default: false test: type: object properties: delay: type: number errorStatus: type: number required: - model - text title: test/dummy-tts - type: object properties: model: type: string enum: - minimax/speech-2.5-turbo-preview - minimax/speech-2.5-hd-preview - minimax/speech-2.6-hd - minimax/speech-2.6-turbo - minimax/speech-2.8-turbo - minimax/speech-2.8-hd text: type: string minLength: 1 maxLength: 5000 description: The text content to be converted to speech. voice_setting: type: object properties: voice_id: anyOf: - type: string enum: - Wise_Woman - Friendly_Person - Inspirational_girl - Deep_Voice_Man - Calm_Woman - Casual_Guy - Lively_Girl - Patient_Man - Young_Knight - Determined_Man - Lovely_Girl - Decent_Boy - Imposing_Manner - Elegant_Man - Abbess - Sweet_Girl_2 - Exuberant_Girl - type: string minLength: 1 maxLength: 64 default: Wise_Woman description: >- A predefined system voice for text-to-speech synthesis. speed: type: number minimum: 0.5 maximum: 2 default: 1 description: >- Adjusts the speed of the voice. A value of 1.0 is the default speed, while values less than 1.0 slow down the speech, and values greater than 1.0 speed it up. vol: type: number minimum: 0.01 maximum: 10 default: 1 description: >- The volume of the generated speech. Range: (0, 10]. Larger values indicate larger volumes. pitch: type: integer minimum: -12 maximum: 12 default: 0 description: >- The pitch of the generated speech. Range: [-12, 12]. 0 = default voice output. emotion: type: string enum: - happy - sad - angry - fearful - disgusted - surprised - neutral description: >- Emotional tone to apply to the synthesized speech. Controls the emotional expression of the generated voice output. text_normalization: type: boolean default: false description: >- English text normalization support. Improves number-reading but increases latency. default: voice_id: Wise_Woman description: >- Voice settings overriding stored settings for the given voice. They are applied only on the given request. audio_setting: type: object properties: sample_rate: type: integer description: Audio sample rate in Hz. enum: - 8000 - 16000 - 22050 - 24000 - 32000 - 44100 default: '32000' bitrate: type: integer description: >- Audio bitrate in bits per second. Controls the compression level and audio quality. Higher bitrates provide better quality but larger file sizes. enum: - 32000 - 64000 - 128000 - 256000 default: '128000' format: type: string enum: - mp3 - pcm - flac default: mp3 description: >- Audio output format. MP3 provides good compression and compatibility, PCM offers uncompressed high quality, and FLAC provides lossless compression. channel: type: integer description: >- Number of audio channels. 1 for mono (single channel), 2 for stereo (dual channel) output. enum: - 1 - 2 default: '1' description: Audio output configuration pronunciation_dict: type: object properties: tone: type: array items: type: string description: >- Replacement of text and pronunciations. Format: ["燕少飞/(yan4)(shao3)(fei1)", "达菲/(da2)(fei1)", "omg/oh my god"] required: - tone description: >- Custom pronunciation dictionary for handling specific words or phrases. Allows fine-tuning of how certain text should be pronounced using phonetic representations. timbre_weights: type: array items: type: object properties: voice_id: anyOf: - type: string enum: - Wise_Woman - Friendly_Person - Inspirational_girl - Deep_Voice_Man - Calm_Woman - Casual_Guy - Lively_Girl - Patient_Man - Young_Knight - Determined_Man - Lovely_Girl - Decent_Boy - Imposing_Manner - Elegant_Man - Abbess - Sweet_Girl_2 - Exuberant_Girl - type: string minLength: 1 maxLength: 64 description: >- A predefined system voice for text-to-speech synthesis. weight: type: integer minimum: 1 maximum: 100 description: >- Weight for voice mixing. Range: [1, 100]. Higher weights are sampled more heavily. required: - voice_id - weight maxItems: 4 description: >- Voice mixing configuration allowing combination of up to 4 different voices with specified weights. Each voice contributes to the final output based on its weight value (1-100). language_boost: type: string enum: - Chinese - Chinese,Yue - English - Arabic - Russian - Spanish - French - Portuguese - German - Turkish - Dutch - Ukrainian - Vietnamese - Indonesian - Japanese - Italian - Korean - Thai - Polish - Romanian - Greek - Czech - Finnish - Hindi - Bulgarian - Danish - Hebrew - Malay - Persian - Slovak - Swedish - Croatian - Filipino - Hungarian - Norwegian - Slovenian - Catalan - Nynorsk - Tamil - Afrikaans - auto description: Language recognition enhancement option. voice_modify: type: object properties: pitch: type: integer minimum: -100 maximum: 100 description: Pitch level (-100 to 100) intensity: type: integer minimum: -100 maximum: 100 description: Intensity level (-100 to 100) timbre: type: integer minimum: -100 maximum: 100 description: Timbre level (-100 to 100) sound_effects: type: string enum: - spacious_echo - auditorium_echo - lofi_telephone - robotic description: >- Audio effects to apply to the synthesized speech. Includes options like spacious_echo, auditorium_echo, lofi_telephone, and robotic effects. description: >- Voice modification settings for adjusting pitch, intensity, timbre, and applying sound effects to customize the voice characteristics. subtitle_enable: type: boolean default: false description: >- Enable subtitle generation service. Only available for non-streaming requests. Generates timing information for the synthesized speech. stream: type: boolean enum: - false default: false required: - model - text title: >- minimax/speech-2.5-turbo-preview, minimax/speech-2.5-hd-preview, minimax/speech-2.6-hd, minimax/speech-2.6-turbo, minimax/speech-2.8-turbo, minimax/speech-2.8-hd - type: object properties: model: type: string enum: - aura - deepgram/aura - aura-asteria-en - deepgram/aura-asteria-en - '#g1_aura-asteria-en' - aura-hera-en - deepgram/aura-hera-en - '#g1_aura-hera-en' - aura-luna-en - deepgram/aura-luna-en - '#g1_aura-luna-en' - aura-stella-en - deepgram/aura-stella-en - '#g1_aura-stella-en' - aura-athena-en - deepgram/aura-athena-en - '#g1_aura-athena-en' - aura-zeus-en - deepgram/aura-zeus-en - '#g1_aura-zeus-en' - aura-orion-en - deepgram/aura-orion-en - '#g1_aura-orion-en' - aura-arcas-en - deepgram/aura-arcas-en - '#g1_aura-arcas-en' - aura-perseus-en - deepgram/aura-perseus-en - '#g1_aura-perseus-en' - aura-angus-en - deepgram/aura-angus-en - '#g1_aura-angus-en' - aura-orpheus-en - deepgram/aura-orpheus-en - '#g1_aura-orpheus-en' - aura-helios-en - deepgram/aura-helios-en - '#g1_aura-helios-en' text: type: string description: The text content to be converted to speech. container: type: string description: >- The file format wrapper for the output audio. The available options depend on the encoding type. encoding: type: string enum: - linear16 - mulaw - alaw - mp3 - opus - flac - aac default: linear16 description: Specifies the expected encoding of your audio output sample_rate: type: string description: Audio sample rate in Hz. stream: type: boolean default: true voice: type: string enum: - asteria - hera - luna - stella - athena - zeus - orion - arcas - perseus - angus - orpheus - helios description: Name of the voice to be used. required: - model - text title: >- aura, deepgram/aura, aura-asteria-en, deepgram/aura-asteria-en, #g1_aura-asteria-en, aura-hera-en, deepgram/aura-hera-en, #g1_aura-hera-en, aura-luna-en, deepgram/aura-luna-en, #g1_aura-luna-en, aura-stella-en, deepgram/aura-stella-en, #g1_aura-stella-en, aura-athena-en, deepgram/aura-athena-en, #g1_aura-athena-en, aura-zeus-en, deepgram/aura-zeus-en, #g1_aura-zeus-en, aura-orion-en, deepgram/aura-orion-en, #g1_aura-orion-en, aura-arcas-en, deepgram/aura-arcas-en, #g1_aura-arcas-en, aura-perseus-en, deepgram/aura-perseus-en, #g1_aura-perseus-en, aura-angus-en, deepgram/aura-angus-en, #g1_aura-angus-en, aura-orpheus-en, deepgram/aura-orpheus-en, #g1_aura-orpheus-en, aura-helios-en, deepgram/aura-helios-en, #g1_aura-helios-en - type: object properties: model: type: string enum: - aura-2 - deepgram/aura-2 - aura-2-amalthea-en - deepgram/aura-2-amalthea-en - '#g1_aura-2-amalthea-en' - aura-2-andromeda-en - deepgram/aura-2-andromeda-en - '#g1_aura-2-andromeda-en' - aura-2-apollo-en - deepgram/aura-2-apollo-en - '#g1_aura-2-apollo-en' - aura-2-arcas-en - deepgram/aura-2-arcas-en - '#g1_aura-2-arcas-en' - aura-2-aries-en - deepgram/aura-2-aries-en - '#g1_aura-2-aries-en' - aura-2-asteria-en - deepgram/aura-2-asteria-en - '#g1_aura-2-asteria-en' - aura-2-athena-en - deepgram/aura-2-athena-en - '#g1_aura-2-athena-en' - aura-2-atlas-en - deepgram/aura-2-atlas-en - '#g1_aura-2-atlas-en' - aura-2-aurora-en - deepgram/aura-2-aurora-en - '#g1_aura-2-aurora-en' - aura-2-callista-en - deepgram/aura-2-callista-en - '#g1_aura-2-callista-en' - aura-2-cora-en - deepgram/aura-2-cora-en - '#g1_aura-2-cora-en' - aura-2-cordelia-en - deepgram/aura-2-cordelia-en - '#g1_aura-2-cordelia-en' - aura-2-delia-en - deepgram/aura-2-delia-en - '#g1_aura-2-delia-en' - aura-2-draco-en - deepgram/aura-2-draco-en - '#g1_aura-2-draco-en' - aura-2-electra-en - deepgram/aura-2-electra-en - '#g1_aura-2-electra-en' - aura-2-harmonia-en - deepgram/aura-2-harmonia-en - '#g1_aura-2-harmonia-en' - aura-2-helena-en - deepgram/aura-2-helena-en - '#g1_aura-2-helena-en' - aura-2-hera-en - deepgram/aura-2-hera-en - '#g1_aura-2-hera-en' - aura-2-hermes-en - deepgram/aura-2-hermes-en - '#g1_aura-2-hermes-en' - aura-2-hyperion-en - deepgram/aura-2-hyperion-en - '#g1_aura-2-hyperion-en' - aura-2-iris-en - deepgram/aura-2-iris-en - '#g1_aura-2-iris-en' - aura-2-janus-en - deepgram/aura-2-janus-en - '#g1_aura-2-janus-en' - aura-2-juno-en - deepgram/aura-2-juno-en - '#g1_aura-2-juno-en' - aura-2-jupiter-en - deepgram/aura-2-jupiter-en - '#g1_aura-2-jupiter-en' - aura-2-luna-en - deepgram/aura-2-luna-en - '#g1_aura-2-luna-en' - aura-2-mars-en - deepgram/aura-2-mars-en - '#g1_aura-2-mars-en' - aura-2-minerva-en - deepgram/aura-2-minerva-en - '#g1_aura-2-minerva-en' - aura-2-neptune-en - deepgram/aura-2-neptune-en - '#g1_aura-2-neptune-en' - aura-2-odysseus-en - deepgram/aura-2-odysseus-en - '#g1_aura-2-odysseus-en' - aura-2-ophelia-en - deepgram/aura-2-ophelia-en - '#g1_aura-2-ophelia-en' - aura-2-orion-en - deepgram/aura-2-orion-en - '#g1_aura-2-orion-en' - aura-2-orpheus-en - deepgram/aura-2-orpheus-en - '#g1_aura-2-orpheus-en' - aura-2-pandora-en - deepgram/aura-2-pandora-en - '#g1_aura-2-pandora-en' - aura-2-phoebe-en - deepgram/aura-2-phoebe-en - '#g1_aura-2-phoebe-en' - aura-2-pluto-en - deepgram/aura-2-pluto-en - '#g1_aura-2-pluto-en' - aura-2-saturn-en - deepgram/aura-2-saturn-en - '#g1_aura-2-saturn-en' - aura-2-selene-en - deepgram/aura-2-selene-en - '#g1_aura-2-selene-en' - aura-2-thalia-en - deepgram/aura-2-thalia-en - '#g1_aura-2-thalia-en' - aura-2-theia-en - deepgram/aura-2-theia-en - '#g1_aura-2-theia-en' - aura-2-vesta-en - deepgram/aura-2-vesta-en - '#g1_aura-2-vesta-en' - aura-2-zeus-en - deepgram/aura-2-zeus-en - '#g1_aura-2-zeus-en' - aura-2-celeste-es - deepgram/aura-2-celeste-es - '#g1_aura-2-celeste-es' - aura-2-estrella-es - deepgram/aura-2-estrella-es - '#g1_aura-2-estrella-es' - aura-2-nestor-es - deepgram/aura-2-nestor-es - '#g1_aura-2-nestor-es' text: type: string description: The text content to be converted to speech. container: type: string description: >- The file format wrapper for the output audio. The available options depend on the encoding type. encoding: type: string enum: - linear16 - mulaw - alaw - mp3 - opus - flac - aac default: linear16 description: Specifies the expected encoding of your audio output sample_rate: type: string description: Audio sample rate in Hz. stream: type: boolean default: true voice: type: string enum: - amalthea - andromeda - apollo - arcas - aries - asteria - athena - atlas - aurora - callista - cora - cordelia - delia - draco - electra - harmonia - helena - hera - hermes - hyperion - iris - janus - juno - jupiter - luna - mars - minerva - neptune - odysseus - ophelia - orion - orpheus - pandora - phoebe - pluto - saturn - selene - thalia - theia - vesta - zeus - celeste - estrella - nestor description: Name of the voice to be used. required: - model - text title: >- aura-2, deepgram/aura-2, aura-2-amalthea-en, deepgram/aura-2-amalthea-en, #g1_aura-2-amalthea-en, aura-2-andromeda-en, deepgram/aura-2-andromeda-en, #g1_aura-2-andromeda-en, aura-2-apollo-en, deepgram/aura-2-apollo-en, #g1_aura-2-apollo-en, aura-2-arcas-en, deepgram/aura-2-arcas-en, #g1_aura-2-arcas-en, aura-2-aries-en, deepgram/aura-2-aries-en, #g1_aura-2-aries-en, aura-2-asteria-en, deepgram/aura-2-asteria-en, #g1_aura-2-asteria-en, aura-2-athena-en, deepgram/aura-2-athena-en, #g1_aura-2-athena-en, aura-2-atlas-en, deepgram/aura-2-atlas-en, #g1_aura-2-atlas-en, aura-2-aurora-en, deepgram/aura-2-aurora-en, #g1_aura-2-aurora-en, aura-2-callista-en, deepgram/aura-2-callista-en, #g1_aura-2-callista-en, aura-2-cora-en, deepgram/aura-2-cora-en, #g1_aura-2-cora-en, aura-2-cordelia-en, deepgram/aura-2-cordelia-en, #g1_aura-2-cordelia-en, aura-2-delia-en, deepgram/aura-2-delia-en, #g1_aura-2-delia-en, aura-2-draco-en, deepgram/aura-2-draco-en, #g1_aura-2-draco-en, aura-2-electra-en, deepgram/aura-2-electra-en, #g1_aura-2-electra-en, aura-2-harmonia-en, deepgram/aura-2-harmonia-en, #g1_aura-2-harmonia-en, aura-2-helena-en, deepgram/aura-2-helena-en, #g1_aura-2-helena-en, aura-2-hera-en, deepgram/aura-2-hera-en, #g1_aura-2-hera-en, aura-2-hermes-en, deepgram/aura-2-hermes-en, #g1_aura-2-hermes-en, aura-2-hyperion-en, deepgram/aura-2-hyperion-en, #g1_aura-2-hyperion-en, aura-2-iris-en, deepgram/aura-2-iris-en, #g1_aura-2-iris-en, aura-2-janus-en, deepgram/aura-2-janus-en, #g1_aura-2-janus-en, aura-2-juno-en, deepgram/aura-2-juno-en, #g1_aura-2-juno-en, aura-2-jupiter-en, deepgram/aura-2-jupiter-en, #g1_aura-2-jupiter-en, aura-2-luna-en, deepgram/aura-2-luna-en, #g1_aura-2-luna-en, aura-2-mars-en, deepgram/aura-2-mars-en, #g1_aura-2-mars-en, aura-2-minerva-en, deepgram/aura-2-minerva-en, #g1_aura-2-minerva-en, aura-2-neptune-en, deepgram/aura-2-neptune-en, #g1_aura-2-neptune-en, aura-2-odysseus-en, deepgram/aura-2-odysseus-en, #g1_aura-2-odysseus-en, aura-2-ophelia-en, deepgram/aura-2-ophelia-en, #g1_aura-2-ophelia-en, aura-2-orion-en, deepgram/aura-2-orion-en, #g1_aura-2-orion-en, aura-2-orpheus-en, deepgram/aura-2-orpheus-en, #g1_aura-2-orpheus-en, aura-2-pandora-en, deepgram/aura-2-pandora-en, #g1_aura-2-pandora-en, aura-2-phoebe-en, deepgram/aura-2-phoebe-en, #g1_aura-2-phoebe-en, aura-2-pluto-en, deepgram/aura-2-pluto-en, #g1_aura-2-pluto-en, aura-2-saturn-en, deepgram/aura-2-saturn-en, #g1_aura-2-saturn-en, aura-2-selene-en, deepgram/aura-2-selene-en, #g1_aura-2-selene-en, aura-2-thalia-en, deepgram/aura-2-thalia-en, #g1_aura-2-thalia-en, aura-2-theia-en, deepgram/aura-2-theia-en, #g1_aura-2-theia-en, aura-2-vesta-en, deepgram/aura-2-vesta-en, #g1_aura-2-vesta-en, aura-2-zeus-en, deepgram/aura-2-zeus-en, #g1_aura-2-zeus-en, aura-2-celeste-es, deepgram/aura-2-celeste-es, #g1_aura-2-celeste-es, aura-2-estrella-es, deepgram/aura-2-estrella-es, #g1_aura-2-estrella-es, aura-2-nestor-es, deepgram/aura-2-nestor-es, #g1_aura-2-nestor-es - type: object properties: model: type: string enum: - octave-2 - hume/octave-2 text: type: string minLength: 1 maxLength: 500000 description: The text content to be converted to speech. voice: type: string enum: - Vince Douglas - Male English Actor - Ava Song - Campfire Narrator - TikTok Fashion Influencer - Colton Rivers - Literature Professor - Booming American Narrator - Imani Carter - Terrence Bentley - Nature Documentary Narrator - Alice Bennett - Sitcom Girl - Unserious Movie Trailer Narrator - Articulate ASMR British Narrator - Big Dicky - English Children's Book Narrator - Sebastian Lockwood - Donovan Sinclair - Booming British Narrator - Relaxing ASMR Woman - Lady Elizabeth - Male Protagonist - Tough Guy - French Chef - Spanish Instructor - Charming Cowgirl default: Vince Douglas description: Name of the voice to be used. format: type: string enum: - wav - mp3 default: wav description: >- Audio output format. MP3 provides good compression and compatibility, PCM offers uncompressed high quality, and FLAC provides lossless compression. stream: type: boolean enum: - false default: false required: - model - text title: octave-2, hume/octave-2 - type: object properties: model: type: string enum: - inworld/tts-1 - inworld/tts-1-max - inworld/tts-1-5-max - inworld/tts-1-5-mini text: type: string minLength: 1 maxLength: 500000 description: The text content to be converted to speech. voice: type: string enum: - Alex - Ashley - Craig - Deborah - Dennis - Dominus - Edward - Elizabeth - Hades - Heitor - Julia - Maitê - Mark - Olivia - Pixie - Priya - Ronald - Sarah - Shaun - Theodore - Timothy - Wendy default: Alex description: Name of the voice to be used. format: type: string enum: - wav - mp3 default: wav description: >- Audio output format. WAV delivers uncompressed audio in a widely supported container format, while MP3 provides good compression and compatibility. stream: type: boolean enum: - false default: false required: - model - text title: >- inworld/tts-1, inworld/tts-1-max, inworld/tts-1-5-max, inworld/tts-1-5-mini - type: object properties: model: type: string enum: - vibevoice/7b - vibevoice - microsoft/vibevoice-7b - microsoft/vibevoice-1.5b script: type: string minLength: 1 maxLength: 5000 description: >- The script to convert to speech. Can be formatted with "Speaker X:" prefixes for multi-speaker dialogues. speakers: type: array items: type: object properties: preset: type: string enum: - Alice [EN] - Alice [EN] (Background Music) - Carter [EN] - Frank [EN] - Maya [EN] - Anchen [ZH] (Background Music) - Bowen [ZH] - Xinran [ZH] description: >- Default voice preset to use for the speaker. Not used if audio_url is provided. audio_url: type: string format: uri description: >- URL to a voice sample audio file. If provided, preset will be ignored. minItems: 1 maxItems: 4 default: - preset: Alice [EN] description: >- List of speakers to use for the script. If not provided, will be inferred from the script or voice samples. seed: type: integer description: >- 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. Determinism is not guaranteed. cfg_scale: type: number minimum: 0.1 maximum: 2 default: 1.3 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt. stream: type: boolean enum: - false default: false required: - model - script title: >- vibevoice/7b, vibevoice, microsoft/vibevoice-7b, microsoft/vibevoice-1.5b responses: '200': content: application/json: schema: type: object properties: audio: type: string format: uri meta: type: object nullable: true properties: usage: type: object nullable: true 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: - audio audio/wav: schema: type: string format: binary description: Audio stream /v1/images/generations: post: operationId: _v1_images_generations requestBody: required: true content: application/json: schema: anyOf: - type: object properties: model: type: string enum: - gpt-image-1 - openai/gpt-image-1 - gpt-image-1-mini - openai/gpt-image-1-mini - gpt-image-1.5 - openai/gpt-image-1.5 - gpt-image-2 - openai/gpt-image-2 - openai/gpt-image-1-5 prompt: type: string maxLength: 32000 description: >- The text prompt describing the content, style, or composition of the image to be generated. size: type: string enum: - 1024x1024 - 1024x1536 - 1536x1024 default: 1024x1024 description: The size of the generated image. quality: type: string enum: - low - high - medium default: medium description: The quality of the image that will be generated. output_format: type: string enum: - png - jpeg - webp default: png description: The format of the generated image. background: type: string enum: - transparent - opaque - auto default: auto description: >- Allows to set transparency for the background of the generated image(s). When auto is used, the model will automatically determine the best background for the image. If transparent, the output format needs to support transparency, so it should be set to either png (default value) or webp. moderation: type: string enum: - low - auto default: auto description: Control the content-moderation level for images. 'n': type: number enum: - 1 default: 1 description: The number of images to generate. output_compression: type: integer minimum: 0 maximum: 100 default: 100 description: >- Compression level (0-100%), applies to JPEG and WebP only. response_format: type: string enum: - url - b64_json default: url description: The format in which the generated images are returned. required: - model - prompt title: >- gpt-image-1, openai/gpt-image-1, gpt-image-1-mini, openai/gpt-image-1-mini, gpt-image-1.5, openai/gpt-image-1.5, gpt-image-2, openai/gpt-image-2, openai/gpt-image-1-5 - type: object properties: model: type: string enum: - bytedance/seedream-4-5 - bytedance/seedream-5-0-lite - bytedance/seedream-5-0-lite-preview prompt: type: string description: >- The text prompt describing the content, style, or composition of the image to be generated. image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 14 description: List of URLs or local Base64 encoded images to edit. image_size: anyOf: - type: object properties: width: type: integer minimum: 1440 maximum: 4096 default: 2048 height: type: integer minimum: 1440 maximum: 4096 default: 2048 - type: string enum: - 2K - 4K description: The size of the generated image. response_format: type: string enum: - url - b64_json default: url description: The format in which the generated images are returned. seed: type: integer description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. watermark: type: boolean default: false description: Add an invisible watermark to the generated images. required: - model - prompt title: >- bytedance/seedream-4-5, bytedance/seedream-5-0-lite, bytedance/seedream-5-0-lite-preview - type: object properties: model: type: string enum: - bytedance/dola-seedream-5-0-pro - bytedance/seedream-5-0-pro prompt: type: string description: >- The text prompt describing the content, style, or composition of the image to be generated. image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 14 description: List of URLs or local Base64 encoded images to edit. image_size: anyOf: - type: object properties: width: type: integer minimum: 1024 maximum: 2752 height: type: integer minimum: 1024 maximum: 2752 required: - width - height - type: string enum: - 1.5K - 2K default: 1.5K description: The size of the generated image. response_format: type: string enum: - url - b64_json default: url description: The format in which the generated images are returned. seed: type: integer description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. watermark: type: boolean default: false description: Add an invisible watermark to the generated images. required: - model - prompt title: bytedance/dola-seedream-5-0-pro, bytedance/seedream-5-0-pro - type: object properties: model: type: string enum: - bytedance/dreamina-creative-upscale image_url: type: string format: uri description: >- URL or data URL of the input image to upscale. JPEG or PNG, up to 4.7MB and 4096×4096 px. resolution: type: string enum: - 2k - 4k default: 2k description: Target output resolution. Defaults to "2k". scale: type: integer minimum: 0 maximum: 100 default: 50 description: >- Degree of detail generation, from 0 to 100. Defaults to 50. response_format: type: string enum: - url - b64_json default: url description: >- Format of the returned image: a hosted URL ("url") or base64-encoded data ("b64_json"). Defaults to "url". required: - model - image_url title: bytedance/dreamina-creative-upscale - type: object properties: model: type: string enum: - imagen-3.0-generate-002 - google/imagen-3.0-generate-002 - imagen-4.0-generate-001 - google/imagen-4.0-generate-001 - imagen-4.0-fast-generate-001 - google/imagen-4.0-fast-generate-001 - imagen-4.0-ultra-generate-001 - google/imagen-4.0-ultra-generate-001 - google/imagen4/preview prompt: type: string description: >- The text prompt describing the content, style, or composition of the image to be generated. aspect_ratio: type: string enum: - '1:1' - '9:16' - '16:9' - '3:4' - '4:3' default: '1:1' description: The aspect ratio of the generated image. enhance_prompt: type: boolean default: true description: >- Optional parameter to use an LLM-based prompt rewriting feature for higher-quality images that better match the original prompt. Disabling it may affect image quality and prompt alignment. num_images: type: integer maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 0 maximum: 4294967295 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. person_generation: type: string enum: - dont_allow - allow_adult default: allow_adult description: Allow generation of people. safety_setting: type: string enum: - block_low_and_above - block_medium_and_above - block_only_high default: block_medium_and_above description: Adds a filter level to safety filtering. add_watermark: type: boolean default: false description: Add an invisible watermark to the generated images. convert_base64_to_url: type: boolean default: true description: >- If True, the URL to the image will be returned; otherwise, the file will be provided in base64 format. required: - model - prompt title: >- imagen-3.0-generate-002, google/imagen-3.0-generate-002, imagen-4.0-generate-001, google/imagen-4.0-generate-001, imagen-4.0-fast-generate-001, google/imagen-4.0-fast-generate-001, imagen-4.0-ultra-generate-001, google/imagen-4.0-ultra-generate-001, google/imagen4/preview - type: object properties: model: type: string enum: - gemini-3-pro-image-preview - google/gemini-3-pro-image-preview - nano-banana-pro - google/nano-banana-pro - google/gemini-3-pro-image provider: type: string description: >- Provider routing override. `google` runs native Google with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Google -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string description: >- The text prompt describing the content, style, or composition of the image to be generated. aspect_ratio: type: string enum: - '1:1' - '9:16' - '16:9' - '3:4' - '4:3' default: '1:1' description: The aspect ratio of the generated image. resolution: type: string enum: - 1K - 2K - 4K default: 1K description: The resolution of the output image. num_images: type: integer maximum: 4 default: 1 description: The number of images to generate. required: - model - prompt title: >- gemini-3-pro-image-preview, google/gemini-3-pro-image-preview, nano-banana-pro, google/nano-banana-pro, google/gemini-3-pro-image - type: object properties: model: type: string enum: - gemini-3-pro-image-preview-edit - google/gemini-3-pro-image-preview-edit - nano-banana-pro-edit - google/nano-banana-pro-edit - google/gemini-3-pro-image-edit provider: type: string description: >- Provider routing override. `google` runs native Google with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Google -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string description: >- The text prompt describing the content, style, or composition of the image to be generated. image_urls: type: array items: type: string format: uri maxItems: 5 description: List of URLs or local Base64 encoded images to edit. aspect_ratio: type: string enum: - '1:1' - '9:16' - '16:9' - '3:4' - '4:3' description: >- The aspect ratio of the generated image. It is taken from this parameter or from the provided reference image. If the parameter is not set and no reference image is provided, the default value is 16:9. resolution: type: string enum: - 1K - 2K - 4K default: 1K description: The resolution of the output image. num_images: type: integer maximum: 4 default: 1 description: The number of images to generate. required: - model - prompt title: >- gemini-3-pro-image-preview-edit, google/gemini-3-pro-image-preview-edit, nano-banana-pro-edit, google/nano-banana-pro-edit, google/gemini-3-pro-image-edit - type: object properties: model: type: string enum: - gemini-2.5-flash-image - google/gemini-2.5-flash-image - nano-banana - google/nano-banana prompt: type: string description: >- The text prompt describing the content, style, or composition of the image to be generated. aspect_ratio: type: string enum: - '1:1' - '9:16' - '16:9' - '3:4' - '4:3' default: '1:1' description: The aspect ratio of the generated image. enhance_prompt: type: boolean default: true description: >- Optional parameter to use an LLM-based prompt rewriting feature for higher-quality images that better match the original prompt. Disabling it may affect image quality and prompt alignment. num_images: type: integer maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 0 maximum: 4294967295 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. person_generation: type: string enum: - dont_allow - allow_adult default: allow_adult description: Allow generation of people. safety_setting: type: string enum: - block_low_and_above - block_medium_and_above - block_only_high default: block_medium_and_above description: Adds a filter level to safety filtering. add_watermark: type: boolean default: false description: Add an invisible watermark to the generated images. convert_base64_to_url: type: boolean default: true description: >- If True, the URL to the image will be returned; otherwise, the file will be provided in base64 format. provider: type: string description: >- Provider routing override. `google` runs native Google with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Google -> fal.ai fallback chain. Case-insensitive. example: auto required: - model - prompt title: >- gemini-2.5-flash-image, google/gemini-2.5-flash-image, nano-banana, google/nano-banana - type: object properties: model: type: string enum: - gemini-2.5-flash-image-edit - google/gemini-2.5-flash-image-edit - nano-banana-edit - google/nano-banana-edit prompt: type: string description: >- The text prompt describing the content, style, or composition of the image to be generated. image_urls: type: array items: type: string format: uri maxItems: 3 description: List of URLs or local Base64 encoded images to edit. aspect_ratio: type: string enum: - '1:1' - '9:16' - '16:9' - '3:4' - '4:3' description: >- The aspect ratio of the generated image. It is taken from this parameter or from the provided reference image. If the parameter is not set and no reference image is provided, the default value is 16:9. enhance_prompt: type: boolean default: true description: >- Optional parameter to use an LLM-based prompt rewriting feature for higher-quality images that better match the original prompt. Disabling it may affect image quality and prompt alignment. num_images: type: integer maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 0 maximum: 4294967295 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. person_generation: type: string enum: - dont_allow - allow_adult default: allow_adult description: Allow generation of people. safety_setting: type: string enum: - block_low_and_above - block_medium_and_above - block_only_high default: block_medium_and_above description: Adds a filter level to safety filtering. add_watermark: type: boolean default: false description: Add an invisible watermark to the generated images. convert_base64_to_url: type: boolean default: true description: >- If True, the URL to the image will be returned; otherwise, the file will be provided in base64 format. provider: type: string description: >- Provider routing override. `google` runs native Google with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Google -> fal.ai fallback chain. Case-insensitive. example: auto required: - model - prompt title: >- gemini-2.5-flash-image-edit, google/gemini-2.5-flash-image-edit, nano-banana-edit, google/nano-banana-edit - type: object properties: model: type: string enum: - gemini-3.1-flash-image-preview - google/gemini-3.1-flash-image-preview - gemini-3.1-flash-lite-image - google/gemini-3.1-flash-lite-image - google/gemini-3.1-flash-image - google/gemini-3-1-flash-image-preview - google/nano-banana-2 - google/gemini-3-1-flash-lite-image - google/nano-banana-2-lite - google/nano-banana-lite prompt: type: string description: >- The text prompt describing the content, style, or composition of the image to be generated. image_urls: type: array items: type: string format: uri maxItems: 5 description: List of URLs or local Base64 encoded images to edit. aspect_ratio: type: string enum: - '1:1' - '9:16' - '16:9' - '3:4' - '4:3' description: >- The aspect ratio of the generated image. It is taken from this parameter or from the provided reference image. If the parameter is not set and no reference image is provided, the default value is 16:9. resolution: type: string enum: - 1K - 2K - 4K default: 1K description: The resolution of the output image. enable_web_search: type: boolean default: false description: >- Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image. required: - model - prompt title: >- gemini-3.1-flash-image-preview, google/gemini-3.1-flash-image-preview, gemini-3.1-flash-lite-image, google/gemini-3.1-flash-lite-image, google/gemini-3.1-flash-image, google/gemini-3-1-flash-image-preview, google/nano-banana-2, google/gemini-3-1-flash-lite-image, google/nano-banana-2-lite, google/nano-banana-lite - type: object properties: model: type: string enum: - meta/muse-image - muse-image prompt: type: string description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 10 default: 1 description: The number of images to generate. aspect_ratio: type: string enum: - '21:9' - '16:9' - '4:3' - '3:2' - '1:1' - '2:3' - '3:4' - '9:16' - '9:21' description: >- The aspect ratio of the generated image. If omitted, Muse chooses the output dimensions automatically based on the prompt. output_format: type: string enum: - jpeg - png - webp default: webp description: The format of the generated image. required: - model - prompt title: meta/muse-image, muse-image - type: object properties: model: type: string enum: - meta/muse-image-edit - muse-image-edit prompt: type: string description: >- The text prompt describing the content, style, or composition of the image to be generated. image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 10 description: List of URLs or local Base64 encoded images to edit. num_images: type: number minimum: 1 maximum: 10 default: 1 description: The number of images to generate. aspect_ratio: type: string enum: - '21:9' - '16:9' - '4:3' - '3:2' - '1:1' - '2:3' - '3:4' - '9:16' - '9:21' description: >- The aspect ratio of the edited image. If omitted, the aspect ratio of the last provided reference image is used. output_format: type: string enum: - jpeg - png - webp default: webp description: The format of the generated image. required: - model - prompt - image_urls title: meta/muse-image-edit, muse-image-edit - type: object properties: model: type: string enum: - qwen-image-edit - alibaba/qwen-image-edit prompt: type: string maxLength: 800 description: >- The text prompt describing the content, style, or composition of the image to be generated. image: type: string format: uri description: >- The image to be edited. Enter the Base64 encoding of the picture or an accessible URL. Image URL: Make sure that the image URL is accessible. Base64-encoded content: The format must be in lowercase. negative_prompt: type: string maxLength: 500 description: >- The description of elements to avoid in the generated image. watermark: type: boolean default: false description: Add an invisible watermark to the generated images. required: - model - prompt - image title: qwen-image-edit, alibaba/qwen-image-edit - type: object properties: model: type: string enum: - qwen-image - alibaba/qwen-image prompt: type: string maxLength: 2000 description: >- The text prompt describing the content, style, or composition of the image to be generated. negative_prompt: type: string maxLength: 500 description: >- The description of elements to avoid in the generated image. num_images: type: integer minimum: 1 maximum: 4 default: 1 description: The number of images to generate. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 1440 height: type: integer minimum: 512 maximum: 1440 required: - width - height description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 description: The size of the generated image. prompt_extend: type: boolean default: true description: >- If set to True, prompt will be upsampled with more details. watermark: type: boolean default: false description: Add an invisible watermark to the generated images. seed: type: integer minimum: 1 maximum: 2147483647 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. provider: type: string description: >- Provider routing override. `alibaba` runs native Alibaba with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Alibaba -> fal.ai fallback chain. Case-insensitive. example: auto required: - model - prompt title: qwen-image, alibaba/qwen-image - type: object properties: model: type: string enum: - wan2.5-t2i-preview - alibaba/wan2.5-t2i-preview - wan2.2-t2i-plus - alibaba/wan2.2-t2i-plus - wan2.2-t2i-flash - alibaba/wan2.2-t2i-flash prompt: type: string maxLength: 2000 description: >- The text prompt describing the content, style, or composition of the image to be generated. negative_prompt: type: string maxLength: 500 description: >- The description of elements to avoid in the generated image. num_images: type: integer minimum: 1 maximum: 4 default: 1 description: The number of images to generate. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 1440 height: type: integer minimum: 512 maximum: 1440 required: - width - height description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 description: The size of the generated image. prompt_extend: type: boolean default: true description: >- If set to True, prompt will be upsampled with more details. watermark: type: boolean default: false description: Add an invisible watermark to the generated images. seed: type: integer minimum: 1 maximum: 2147483647 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. required: - model - prompt title: >- wan2.5-t2i-preview, alibaba/wan2.5-t2i-preview, wan2.2-t2i-plus, alibaba/wan2.2-t2i-plus, wan2.2-t2i-flash, alibaba/wan2.2-t2i-flash - type: object properties: model: type: string enum: - qwen-image-2.0 - alibaba/qwen-image-2.0 - qwen-image-2.0-pro - alibaba/qwen-image-2.0-pro - wan2.6-image - alibaba/wan2.6-image - wan2.7-image - alibaba/wan2.7-image - wan2.7-image-pro - alibaba/wan2.7-image-pro - alibaba/wan-2-6-image - alibaba/wan-2-7-image - alibaba/wan-2-7-image-pro - alibaba/qwen-image-2-0 - alibaba/qwen-image-2-0-pro prompt: type: string maxLength: 2000 description: >- A positive prompt that describes the desired elements and visual features in the edited image. image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 3 description: List of URLs or local Base64 encoded images to edit. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 1440 height: type: integer minimum: 512 maximum: 1440 required: - width - height description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 description: The size of the generated image. enhance_prompt: type: boolean default: true description: >- Optional parameter to use an LLM-based prompt rewriting feature for higher-quality images that better match the original prompt. Disabling it may affect image quality and prompt alignment. negative_prompt: type: string maxLength: 500 description: >- The description of elements to avoid in the generated image. seed: type: integer minimum: 0 maximum: 2147483647 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. watermark: type: boolean default: false description: Add an invisible watermark to the generated images. required: - model - prompt title: >- qwen-image-2.0, alibaba/qwen-image-2.0, qwen-image-2.0-pro, alibaba/qwen-image-2.0-pro, wan2.6-image, alibaba/wan2.6-image, wan2.7-image, alibaba/wan2.7-image, wan2.7-image-pro, alibaba/wan2.7-image-pro, alibaba/wan-2-6-image, alibaba/wan-2-7-image, alibaba/wan-2-7-image-pro, alibaba/qwen-image-2-0, alibaba/qwen-image-2-0-pro - type: object properties: model: type: string enum: - z-image-turbo - alibaba/z-image-turbo provider: type: string description: >- Provider routing override. `alibaba` runs native Alibaba with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Alibaba -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string maxLength: 800 description: Text prompt for image generation (max 800 chars) image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 1440 height: type: integer minimum: 512 maximum: 1440 required: - width - height description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 description: The size of the generated image. output_format: type: string enum: - jpeg - png - webp default: png description: The format of the generated image. prompt_extend: type: boolean default: false description: Enable intelligent prompt rewriting num_inference_steps: type: integer minimum: 1 maximum: 8 description: The number of inference steps to perform. seed: type: integer minimum: 1 maximum: 2147483647 description: Random seed for reproducible results num_images: type: integer minimum: 1 maximum: 4 default: 1 description: The number of images to generate. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. acceleration: type: string enum: - none - regular - high default: regular description: >- The speed of the generation. The higher the speed, the faster the generation. required: - model - prompt title: z-image-turbo, alibaba/z-image-turbo - type: object properties: model: type: string enum: - alibaba/z-image-turbo-lora - z-image/turbo/lora provider: type: string description: >- Provider routing override. `alibaba` runs native Alibaba with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Alibaba -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 2048 default: 1024 height: type: integer minimum: 512 maximum: 2048 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 output_format: type: string enum: - jpeg - png - webp default: png description: The format of the generated image. enable_prompt_expansion: type: boolean default: true description: >- If set to True, prompt will be upsampled with more details. num_inference_steps: type: integer minimum: 1 maximum: 8 description: The number of inference steps to perform. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. acceleration: type: string enum: - none - regular - high default: regular description: >- The speed of the generation. The higher the speed, the faster the generation. loras: type: array items: type: object properties: path: type: string description: URL, HuggingFace repo ID (owner/repo). scale: type: number minimum: 0 maximum: 4 description: Scale factor for LoRA application. required: - path maxItems: 3 description: >- List of LoRA weights to apply (maximum 3). Each LoRA can be a URL, HuggingFace repo ID, or local path. required: - model - prompt title: alibaba/z-image-turbo-lora, z-image/turbo/lora - type: object properties: model: type: string enum: - alibaba/qwen-image-3 prompt: type: string maxLength: 800 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_size: anyOf: - type: object properties: width: type: integer minimum: 384 maximum: 2048 default: 1024 height: type: integer minimum: 384 maximum: 2048 default: 1024 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: square_hd negative_prompt: type: string maxLength: 500 description: >- The description of elements to avoid in the generated image. num_images: type: integer minimum: 1 maximum: 4 default: 1 description: The number of images to generate. output_format: type: string enum: - jpeg - png - webp default: png description: The format of the generated image. seed: type: integer minimum: 0 maximum: 2147483647 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. enable_prompt_expansion: type: boolean default: true description: >- If set to True, prompt will be upsampled with more details. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. required: - model - prompt title: alibaba/qwen-image-3 - type: object properties: model: type: string enum: - alibaba/qwen-image-3-edit prompt: type: string maxLength: 800 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 3 description: List of URLs or local Base64 encoded images to edit. image_size: anyOf: - type: object properties: width: type: integer minimum: 384 maximum: 2048 default: 1024 height: type: integer minimum: 384 maximum: 2048 default: 1024 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. description: >- Size of the generated image. Defaults to the size of the first input image. negative_prompt: type: string maxLength: 500 description: >- The description of elements to avoid in the generated image. num_images: type: integer minimum: 1 maximum: 4 default: 1 description: The number of images to generate. output_format: type: string enum: - jpeg - png - webp default: png description: The format of the generated image. seed: type: integer minimum: 0 maximum: 2147483647 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. enable_prompt_expansion: type: boolean default: true description: >- If set to True, prompt will be upsampled with more details. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. required: - model - prompt - image_urls title: alibaba/qwen-image-3-edit - type: object properties: model: type: string enum: - test/dummy-image prompt: type: string minLength: 1 'n': type: integer minimum: 1 maximum: 4 size: type: string test: type: object properties: delay: type: number errorStatus: type: number required: - model - prompt title: test/dummy-image - type: object properties: model: type: string enum: - x-ai/grok-imagine-image - grok-imagine-image-2026-03-02 - x-ai/grok-imagine-image-pro prompt: type: string description: >- The text prompt describing the content, style, or composition of the image to be generated. 'n': type: number minimum: 1 maximum: 10 default: 1 description: The number of images to generate. response_format: type: string enum: - url - b64_json default: url description: The format in which the generated images are returned. aspect_ratio: type: string enum: - '1:1' - '3:4' - '4:3' - '9:16' - '16:9' - '2:3' - '3:2' - '9:19.5' - 19.5:9 - '9:20' - '20:9' - '1:2' - '2:1' - auto default: '16:9' description: The aspect ratio of the generated image. resolution: type: string enum: - 1k - 2k default: 2k description: The resolution of the output image. required: - model - prompt title: >- x-ai/grok-imagine-image, grok-imagine-image-2026-03-02, x-ai/grok-imagine-image-pro - type: object properties: model: type: string enum: - reve/create-image aspect_ratio: type: string enum: - '16:9' - '9:16' - '3:2' - '2:3' - '4:3' - '3:4' - '1:1' default: '3:2' description: The aspect ratio of the generated image. prompt: type: string maxLength: 2560 description: >- The text prompt describing the content, style, or composition of the image to be generated. convert_base64_to_url: type: boolean default: true description: >- If True, the URL to the image will be returned; otherwise, the file will be provided in base64 format. required: - model - prompt title: reve/create-image - type: object properties: model: type: string enum: - reve/edit-image image_url: type: string format: uri description: The URL of the reference image. prompt: type: string maxLength: 2560 description: >- The text prompt describing the content, style, or composition of the image to be generated. convert_base64_to_url: type: boolean default: true description: >- If True, the URL to the image will be returned; otherwise, the file will be provided in base64 format. required: - model - image_url - prompt title: reve/edit-image - type: object properties: model: type: string enum: - reve/remix-edit-image image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 4 description: List of URLs or local Base64 encoded images to edit. aspect_ratio: type: string enum: - '16:9' - '9:16' - '3:2' - '2:3' - '4:3' - '3:4' - '1:1' default: '3:2' description: The aspect ratio of the generated image. prompt: type: string maxLength: 2560 description: >- The text prompt describing the content, style, or composition of the image to be generated. convert_base64_to_url: type: boolean default: true description: >- If True, the URL to the image will be returned; otherwise, the file will be provided in base64 format. required: - model - image_urls - prompt title: reve/remix-edit-image - type: object properties: model: type: string enum: - sharpen - topaz-labs/sharpen mode: type: string enum: - Standard - Strong - Lens Blur - Lens Blur V2 - Motion Blur - Natural - Refocus image_url: type: string format: uri description: The URL of the reference image. output_format: type: string enum: - jpeg - jpg - png - tiff - tif default: jpeg description: The format of the generated image. subject_detection: type: string enum: - All - Foreground - Background default: All description: >- Specifies which subjects to detect and process. Options: 'All' (detect all subjects), 'Foreground' (detect only foreground subjects), 'Background' (detect background subjects). face_enhancement: type: boolean default: true description: >- Whether to enhance faces in the image. When true, the model applies face-specific improvements. face_enhancement_creativity: type: number minimum: 0 maximum: 1 default: 0 description: >- Level of creativity for face enhancement (0-1). Higher values allow more creative, less conservative changes. face_enhancement_strength: type: number minimum: 0 maximum: 1 default: 0.8 description: >- How sharp enhanced faces are relative to background (0-1). Lower values blend changes subtly; higher values make faces more pronounced. strength: type: number minimum: 0.01 maximum: 1 description: >- Defines the overall intensity of the sharpening effect. Increases details. Too much sharpening can create an unrealistic result. minor_denoise: type: number minimum: 0.01 maximum: 1 description: >- Removes noisy pixels to increase clarity. Can slightly increase image sharpness. required: - model - mode - image_url title: sharpen, topaz-labs/sharpen - type: object properties: model: type: string enum: - sharpen-gen - topaz-labs/sharpen-gen mode: type: string enum: - Super Focus - Super Focus V2 image_url: type: string format: uri description: The URL of the reference image. output_format: type: string enum: - jpeg - jpg - png - tiff - tif default: jpeg description: The format of the generated image. subject_detection: type: string enum: - All - Foreground - Background default: All description: >- Specifies which subjects to detect and process. Options: 'All' (detect all subjects), 'Foreground' (detect only foreground subjects), 'Background' (detect background subjects). face_enhancement: type: boolean default: true description: >- Whether to enhance faces in the image. When true, the model applies face-specific improvements. face_enhancement_creativity: type: number minimum: 0 maximum: 1 default: 0 description: >- Level of creativity for face enhancement (0-1). Higher values allow more creative, less conservative changes. face_enhancement_strength: type: number minimum: 0 maximum: 1 default: 0.8 description: >- How sharp enhanced faces are relative to background (0-1). Lower values blend changes subtly; higher values make faces more pronounced. strength: type: number minimum: 0 maximum: 1 description: >- Defines the overall intensity of the sharpening effect. Increases details. Too much sharpening can create an unrealistic result. focus_boost: type: number minimum: 0.25 maximum: 1 description: >- Corrects images that are missing detail by downscaling your image then upscaling the results back to the original size. Use on very blurry images! seed: type: integer description: Optional fixed seed for repeatable results. required: - model - mode - image_url title: sharpen-gen, topaz-labs/sharpen-gen - type: object properties: model: type: string enum: - klingai/image-o1 - kling-image/o1 provider: type: string description: >- Provider routing override. `kling` (alias `klingai`) runs native Kling with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Kling -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 10 description: List of URLs or local Base64 encoded images to edit. aspect_ratio: type: string enum: - '21:9' - '16:9' - '4:3' - '3:2' - '1:1' - '2:3' - '3:4' - '9:16' default: '16:9' description: The aspect ratio of the generated image. resolution: type: string enum: - 1K - 2K default: 1K description: The resolution of the output image. output_format: type: string enum: - jpeg - png - webp default: png description: The format of the generated image. num_images: type: number minimum: 1 maximum: 9 default: 1 description: The number of images to generate. required: - model - prompt - image_urls title: klingai/image-o1, kling-image/o1 - type: object properties: model: type: string enum: - luma/uni-1 - luma/uni-1-max prompt: type: string minLength: 1 maxLength: 6000 description: Text description of the image to generate. type: type: string enum: - image - image_edit default: image description: >- Generation kind: "image" (text-to-image / reference) or "image_edit". aspect_ratio: type: string enum: - '3:1' - '2:1' - '16:9' - '3:2' - '1:1' - '2:3' - '9:16' - '1:2' - '1:3' description: >- Output aspect ratio. Omit to let the model choose automatically. style: type: string enum: - auto - manga default: auto description: Rendering style. Defaults to "auto". output_format: type: string enum: - png - jpeg description: Output image format (png or jpeg). web_search: type: boolean default: false description: Ground the generation with web search. image_url: type: string format: uri description: >- A reference image URL for image generation, or source image URL for image editing. image_urls: type: array items: type: string format: uri maxItems: 9 description: Up to 9 reference image URLs (or uploaded files). required: - model - prompt title: luma/uni-1, luma/uni-1-max - type: object properties: model: type: string enum: - magic/image-to-3d front_image_url: type: string format: uri description: >- An image (supplied via URL or Base64) that represents the front view of the object. left_image_url: type: string format: uri description: >- An image (supplied via URL or Base64) that represents the left-side view of the object. back_image_url: type: string format: uri description: >- An image (supplied via URL or Base64) that represents the back view of the object. right_image_url: type: string format: uri description: >- An image (supplied via URL or Base64) that represents the right-side view of the object. required: - model - front_image_url title: magic/image-to-3d - type: object properties: model: type: string enum: - flux/dev prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 1536 default: 1024 height: type: integer minimum: 512 maximum: 1536 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 guidance_scale: type: number minimum: 1 maximum: 20 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. num_inference_steps: type: integer minimum: 1 maximum: 50 default: 50 description: The number of inference steps to perform. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. required: - model - prompt title: flux/dev - type: object properties: model: type: string enum: - flux/schnell prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. image_size: anyOf: - type: object properties: width: type: integer minimum: 64 maximum: 1536 default: 1024 height: type: integer minimum: 64 maximum: 1536 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 num_inference_steps: type: integer minimum: 1 description: The number of inference steps to perform. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. required: - model - prompt title: flux/schnell - type: object properties: model: type: string enum: - flux-pro prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. image_size: anyOf: - type: object properties: width: type: integer minimum: 256 maximum: 1440 default: 1024 height: type: integer minimum: 256 maximum: 1440 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 num_inference_steps: type: integer minimum: 1 maximum: 50 default: 50 description: The number of inference steps to perform. guidance_scale: type: number minimum: 1 maximum: 20 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' - '6' default: '2' description: >- The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. output_format: type: string enum: - jpeg - png default: jpeg description: The format of the generated image. required: - model - prompt title: flux-pro - type: object properties: model: type: string enum: - flux-pro/v1.1 prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. image_size: anyOf: - type: object properties: width: type: integer minimum: 256 maximum: 1440 default: 1024 height: type: integer minimum: 256 maximum: 1440 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' - '6' default: '2' description: >- The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. output_format: type: string enum: - jpeg - png default: jpeg description: The format of the generated image. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. required: - model - prompt title: flux-pro/v1.1 - type: object properties: model: type: string enum: - flux-pro/v1.1-ultra prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' - '6' default: '2' description: >- The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. output_format: type: string enum: - jpeg - png default: jpeg description: The format of the generated image. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. aspect_ratio: type: string enum: - '21:9' - '16:9' - '4:3' - '3:2' - '1:1' - '2:3' - '3:4' - '9:16' - '9:21' default: '16:9' description: The aspect ratio of the generated image. raw: type: boolean enum: - false default: false description: Generate less processed, more natural-looking images. required: - model - prompt title: flux-pro/v1.1-ultra - type: object properties: model: type: string enum: - flux/dev/image-to-image prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. guidance_scale: type: number minimum: 1 maximum: 20 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. num_inference_steps: type: integer minimum: 1 maximum: 50 default: 50 description: The number of inference steps to perform. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. image_url: type: string format: uri description: The URL of the reference image. strength: type: number default: 0.95 description: >- Determines how much the prompt influences the generated image. required: - model - prompt - image_url title: flux/dev/image-to-image - type: object properties: model: type: string enum: - flux/srpo prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 1536 default: 1024 height: type: integer minimum: 512 maximum: 1536 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 num_inference_steps: type: integer minimum: 1 maximum: 50 default: 28 description: The number of inference steps to perform. guidance_scale: type: number minimum: 1 maximum: 20 default: 4.5 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. sync_mode: type: boolean default: false description: >- If set to true, the function will wait for the image to be generated and uploaded before returning the response. This will increase the latency of the function but it allows you to get the image directly in the response without going through the CDN. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. output_format: type: string enum: - jpeg - png default: jpeg description: The format of the generated image. acceleration: type: string enum: - none - regular - high default: regular description: >- The speed of the generation. The higher the speed, the faster the generation. required: - model - prompt title: flux/srpo - type: object properties: model: type: string enum: - flux/srpo/image-to-image prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. num_inference_steps: type: integer minimum: 1 maximum: 50 default: 40 description: The number of inference steps to perform. guidance_scale: type: number minimum: 1 maximum: 20 default: 4.5 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. sync_mode: type: boolean default: false description: >- If set to true, the function will wait for the image to be generated and uploaded before returning the response. This will increase the latency of the function but it allows you to get the image directly in the response without going through the CDN. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. output_format: type: string enum: - jpeg - png default: jpeg description: The format of the generated image. acceleration: type: string enum: - none - regular - high default: regular description: >- The speed of the generation. The higher the speed, the faster the generation. image_url: type: string format: uri description: The URL of the reference image. strength: type: number minimum: 0 maximum: 1 default: 0.95 description: >- Determines how much the prompt influences the generated image. required: - model - prompt - image_url title: flux/srpo/image-to-image - type: object properties: model: type: string enum: - flux-pro/kontext/text-to-image - flux-pro/kontext/max/text-to-image - flux/kontext-max/text-to-image - flux/kontext-pro/text-to-image prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. guidance_scale: type: number minimum: 1 maximum: 20 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' - '6' default: '2' description: >- The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. output_format: type: string enum: - jpeg - png default: jpeg description: The format of the generated image. aspect_ratio: type: string enum: - '21:9' - '16:9' - '4:3' - '3:2' - '1:1' - '2:3' - '3:4' - '9:16' - '9:21' default: '16:9' description: The aspect ratio of the generated image. required: - model - prompt title: >- flux-pro/kontext/text-to-image, flux-pro/kontext/max/text-to-image, flux/kontext-max/text-to-image, flux/kontext-pro/text-to-image - type: object properties: model: type: string enum: - flux-pro/kontext - flux-pro/kontext/max - flux/kontext-max/image-to-image - flux/kontext-pro/image-to-image prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: >- Number of image variations to generate. Each image is a different attempt to combine the reference images (from the image_url parameter) according to the prompt. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. guidance_scale: type: number minimum: 1 maximum: 20 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' - '6' default: '2' description: >- The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. output_format: type: string enum: - jpeg - png default: jpeg description: The format of the generated image. aspect_ratio: type: string enum: - '21:9' - '16:9' - '4:3' - '3:2' - '1:1' - '2:3' - '3:4' - '9:16' - '9:21' default: '16:9' description: The aspect ratio of the generated image. image_url: anyOf: - type: string format: uri - type: array items: type: string format: uri maxItems: 4 description: >- One or more image URLs used as visual references. The model merges them into a single image following the prompt instructions. required: - model - prompt - image_url title: >- flux-pro/kontext, flux-pro/kontext/max, flux/kontext-max/image-to-image, flux/kontext-pro/image-to-image - type: object properties: model: type: string enum: - flux-realism prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 1536 default: 1024 height: type: integer minimum: 512 maximum: 1536 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 guidance_scale: type: number minimum: 1 maximum: 20 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. num_inference_steps: type: integer minimum: 1 maximum: 50 default: 50 description: The number of inference steps to perform. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. output_format: type: string enum: - jpeg - png default: jpeg description: The format of the generated image. required: - model - prompt title: flux-realism - type: object properties: model: type: string enum: - flux-2 - blackforestlabs/flux-2 prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 2048 default: 1024 height: type: integer minimum: 512 maximum: 2048 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 output_format: type: string enum: - jpeg - png - webp default: png description: The format of the generated image. enable_prompt_expansion: type: boolean default: true description: >- If set to True, prompt will be upsampled with more details. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. guidance_scale: type: number minimum: 0 maximum: 20 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. num_inference_steps: type: integer minimum: 4 maximum: 50 description: The number of inference steps to perform. acceleration: type: string enum: - none - regular - high default: regular description: >- The speed of the generation. The higher the speed, the faster the generation. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. required: - model - prompt title: flux-2, blackforestlabs/flux-2 - type: object properties: model: type: string enum: - flux-2/edit - blackforestlabs/flux-2-edit prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 3 description: List of URLs or local Base64 encoded images to edit. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 2048 default: 1024 height: type: integer minimum: 512 maximum: 2048 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 output_format: type: string enum: - jpeg - png - webp default: png description: The format of the generated image. enable_prompt_expansion: type: boolean default: true description: >- If set to True, prompt will be upsampled with more details. guidance_scale: type: number minimum: 0 maximum: 20 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. num_inference_steps: type: integer minimum: 4 maximum: 50 description: The number of inference steps to perform. acceleration: type: string enum: - none - regular - high default: regular description: >- The speed of the generation. The higher the speed, the faster the generation. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. required: - model - prompt - image_urls title: flux-2/edit, blackforestlabs/flux-2-edit - type: object properties: model: type: string enum: - flux-2/lora - blackforestlabs/flux-2-lora prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 2048 default: 1024 height: type: integer minimum: 512 maximum: 2048 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 output_format: type: string enum: - jpeg - png - webp default: png description: The format of the generated image. enable_prompt_expansion: type: boolean default: true description: >- If set to True, prompt will be upsampled with more details. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. guidance_scale: type: number minimum: 0 maximum: 20 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. num_inference_steps: type: integer minimum: 4 maximum: 50 description: The number of inference steps to perform. acceleration: type: string enum: - none - regular - high default: regular description: >- The speed of the generation. The higher the speed, the faster the generation. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. loras: type: array items: type: object properties: path: type: string description: URL, HuggingFace repo ID (owner/repo). scale: type: number minimum: 0 maximum: 4 description: Scale factor for LoRA application. required: - path maxItems: 3 description: >- List of LoRA weights to apply (maximum 3). Each LoRA can be a URL, HuggingFace repo ID, or local path. required: - model - prompt title: flux-2/lora, blackforestlabs/flux-2-lora - type: object properties: model: type: string enum: - flux-2/lora/edit - blackforestlabs/flux-2-lora-edit prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 3 description: List of URLs or local Base64 encoded images to edit. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 2048 default: 1024 height: type: integer minimum: 512 maximum: 2048 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 output_format: type: string enum: - jpeg - png - webp default: png description: The format of the generated image. enable_prompt_expansion: type: boolean default: true description: >- If set to True, prompt will be upsampled with more details. guidance_scale: type: number minimum: 0 maximum: 20 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. num_inference_steps: type: integer minimum: 4 maximum: 50 description: The number of inference steps to perform. acceleration: type: string enum: - none - regular - high default: regular description: >- The speed of the generation. The higher the speed, the faster the generation. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. loras: type: array items: type: object properties: path: type: string description: URL, HuggingFace repo ID (owner/repo). scale: type: number minimum: 0 maximum: 4 description: Scale factor for LoRA application. required: - path maxItems: 3 description: >- List of LoRA weights to apply (maximum 3). Each LoRA can be a URL, HuggingFace repo ID, or local path. required: - model - prompt - image_urls title: flux-2/lora/edit, blackforestlabs/flux-2-lora-edit - type: object properties: model: type: string enum: - flux-2-pro/edit - blackforestlabs/flux-2-pro-edit prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 3 description: List of URLs or local Base64 encoded images to edit. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 2048 default: 1024 height: type: integer minimum: 512 maximum: 2048 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 output_format: type: string enum: - jpeg - png - webp default: png description: The format of the generated image. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' - '6' default: '2' description: >- The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. required: - model - prompt - image_urls title: flux-2-pro/edit, blackforestlabs/flux-2-pro-edit - type: object properties: model: type: string enum: - flux-2-max prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 2048 default: 1024 height: type: integer minimum: 512 maximum: 2048 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 output_format: type: string enum: - jpeg - png default: jpeg description: The format of the generated image. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' default: '2' description: >- The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. required: - model - prompt title: flux-2-max - type: object properties: model: type: string enum: - flux-2-max/edit - blackforestlabs/flux-2-max-edit prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_urls: type: array items: type: string format: uri minItems: 1 description: List of URLs or local Base64 encoded images to edit. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 2048 default: 1024 height: type: integer minimum: 512 maximum: 2048 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 output_format: type: string enum: - jpeg - png default: jpeg description: The format of the generated image. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' default: '2' description: >- The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. required: - model - prompt - image_urls title: flux-2-max/edit, blackforestlabs/flux-2-max-edit - type: object properties: model: type: string enum: - stable-diffusion-v3-medium prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. image_size: anyOf: - type: object properties: width: type: integer minimum: 64 maximum: 1536 default: 1024 height: type: integer minimum: 64 maximum: 1536 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: square_hd negative_prompt: type: string description: >- The description of elements to avoid in the generated image. prompt_expansion: type: boolean description: >- If set to True, prompt will be upsampled with more details. guidance_scale: type: number minimum: 1 maximum: 20 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. num_inference_steps: type: integer minimum: 1 maximum: 50 default: 50 description: The number of inference steps to perform. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. required: - model - prompt title: stable-diffusion-v3-medium - type: object properties: model: type: string enum: - stable-diffusion-v35-large prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. image_size: anyOf: - type: object properties: width: type: integer minimum: 64 maximum: 1536 default: 1024 height: type: integer minimum: 64 maximum: 1536 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: square_hd negative_prompt: type: string description: >- The description of elements to avoid in the generated image. guidance_scale: type: number minimum: 1 maximum: 20 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. num_inference_steps: type: integer minimum: 1 maximum: 50 default: 50 description: The number of inference steps to perform. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. output_format: type: string enum: - jpeg - png default: jpeg description: The format of the generated image. required: - model - prompt title: stable-diffusion-v35-large - type: object properties: model: type: string enum: - uso - bytedance/uso image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 3 description: >- An array of up to 3 image URLs. The first image is always treated as the primary input for image-to-image generation, while the remaining images (if provided) serve as visual style references for the output. image_size: anyOf: - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 - type: object properties: width: type: number height: type: number required: - width - height default: square_hd description: The size of the generated image. negative_prompt: type: string default: '' description: >- The description of elements to avoid in the generated image. num_inference_steps: type: integer minimum: 1 maximum: 50 default: 28 description: The number of inference steps to perform. guidance_scale: type: number minimum: 1 maximum: 20 default: 4 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. keep_size: type: boolean num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. sync_mode: type: boolean default: false description: >- If set to true, the function will wait for the image to be generated and uploaded before returning the response. This will increase the latency of the function but it allows you to get the image directly in the response without going through the CDN. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. output_format: type: string enum: - jpeg - png default: png description: The format of the generated image. prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. required: - model - image_urls - prompt title: uso, bytedance/uso - type: object properties: model: type: string enum: - bytedance/seedream/v4/edit - bytedance/seedream-v4-edit image_urls: type: array items: type: string format: uri minItems: 1 maxItems: 10 description: List of URLs or local Base64 encoded images to edit. image_size: anyOf: - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 - type: object properties: width: type: number minimum: 1024 maximum: 4096 height: type: number minimum: 1024 maximum: 4096 required: - width - height default: square_hd description: The size of the generated image. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. sync_mode: type: boolean default: false description: >- If set to true, the function will wait for the image to be generated and uploaded before returning the response. This will increase the latency of the function but it allows you to get the image directly in the response without going through the CDN. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. required: - model - image_urls - prompt title: bytedance/seedream/v4/edit, bytedance/seedream-v4-edit - type: object properties: model: type: string enum: - bytedance/seedream/v4/text-to-image - bytedance/seedream-v4-text-to-image image_size: anyOf: - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 - type: object properties: width: type: number minimum: 1024 maximum: 4096 height: type: number minimum: 1024 maximum: 4096 required: - width - height default: square_hd description: The size of the generated image. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. sync_mode: type: boolean default: false description: >- If set to true, the function will wait for the image to be generated and uploaded before returning the response. This will increase the latency of the function but it allows you to get the image directly in the response without going through the CDN. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. required: - model - prompt title: >- bytedance/seedream/v4/text-to-image, bytedance/seedream-v4-text-to-image - type: object properties: model: type: string enum: - hunyuan-image/v3/text-to-image - hunyuan/hunyuan-image-v3-text-to-image prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. negative_prompt: type: string description: >- The description of elements to avoid in the generated image. image_size: anyOf: - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 - type: object properties: width: type: number height: type: number required: - width - height default: square_hd description: The size of the generated image. num_inference_steps: type: integer minimum: 1 maximum: 50 default: 28 description: The number of inference steps to perform. guidance_scale: type: number minimum: 1 maximum: 20 default: 7.5 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. sync_mode: type: boolean default: false description: >- If set to true, the function will wait for the image to be generated and uploaded before returning the response. This will increase the latency of the function but it allows you to get the image directly in the response without going through the CDN. output_format: type: string enum: - jpeg - png default: png description: The format of the generated image. enable_prompt_expansion: type: boolean description: >- If set to True, prompt will be upsampled with more details. required: - model - prompt title: >- hunyuan-image/v3/text-to-image, hunyuan/hunyuan-image-v3-text-to-image - type: object properties: model: type: string enum: - recraft-v3 prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_size: anyOf: - type: object properties: width: type: integer minimum: 64 maximum: 1536 default: 1024 height: type: integer minimum: 64 maximum: 1536 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: square_hd style: type: string enum: - any - realistic_image - digital_illustration - vector_illustration - realistic_image/b_and_w - realistic_image/hard_flash - realistic_image/hdr - realistic_image/natural_light - realistic_image/studio_portrait - realistic_image/enterprise - realistic_image/motion_blur - digital_illustration/pixel_art - digital_illustration/hand_drawn - digital_illustration/grain - digital_illustration/infantile_sketch - digital_illustration/2d_art_poster - digital_illustration/handmade_3d - digital_illustration/hand_drawn_outline - digital_illustration/engraving_color - digital_illustration/2d_art_poster_2 - vector_illustration/engraving - vector_illustration/line_art - vector_illustration/line_circuit - vector_illustration/linocut default: realistic_image description: The style of the generated images. colors: type: array items: type: object properties: r: type: integer minimum: 0 maximum: 255 g: type: integer minimum: 0 maximum: 255 b: type: integer minimum: 0 maximum: 255 required: - r - g - b default: [] description: An array of preferred colors. num_images: type: number enum: - 1 default: 1 description: The number of images to generate. required: - model - prompt title: recraft-v3 - type: object properties: model: type: string enum: - triposr image_url: type: string format: uri description: The URL of the reference image. output_format: type: string enum: - glb - obj default: glb description: The format of the generated image. do_remove_background: type: boolean description: Enables removing the background from the input image. foreground_ratio: type: number minimum: 0.5 maximum: 1 default: 0.9 description: Ratio of the foreground image to the original image. mc_resolution: type: integer minimum: 32 maximum: 1024 default: 256 description: >- Resolution of the marching cubes. Above 512 is not recommended. required: - model - image_url title: triposr - type: object properties: model: type: string enum: - gemini-25-flash-image provider: type: string description: >- Provider routing override. `google` runs native Google with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Google -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. aspect_ratio: type: string enum: - '21:9' - '1:1' - '4:3' - '3:2' - '2:3' - '5:4' - '4:5' - '3:4' - '16:9' - '9:16' default: '1:1' description: The aspect ratio of the generated image. required: - model - prompt title: gemini-25-flash-image - type: object properties: model: type: string enum: - gemini-25-flash-image/edit provider: type: string description: >- Provider routing override. `google` runs native Google with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Google -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string description: >- The text prompt describing the content, style, or composition of the image to be generated. image_urls: type: array items: type: string format: uri description: List of URLs or local Base64 encoded images to edit. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. aspect_ratio: type: string enum: - '21:9' - '1:1' - '4:3' - '3:2' - '2:3' - '5:4' - '4:5' - '3:4' - '16:9' - '9:16' description: >- The aspect ratio of the generated image. If not specified, the aspect_ratio of the last provided reference image is used by default. required: - model - prompt - image_urls title: gemini-25-flash-image/edit - type: object properties: model: type: string enum: - gemini-3-pro-image-preview/edit provider: type: string description: >- Provider routing override. `google` runs native Google with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Google -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string description: >- The text prompt describing the content, style, or composition of the image to be generated. image_urls: type: array items: type: string format: uri minItems: 1 description: >- List of URLs or local Base64 encoded images to edit. Supports up to 14 images. aspect_ratio: type: string enum: - auto - '21:9' - '1:1' - '4:3' - '3:2' - '2:3' - '5:4' - '4:5' - '3:4' - '16:9' - '9:16' default: auto description: >- The aspect ratio of the generated image. If not specified, the aspect_ratio of the last provided reference image is used by default. resolution: type: string enum: - 1K - 2K - 4K default: 1K description: The size of the generated image. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. required: - model - prompt - image_urls title: gemini-3-pro-image-preview/edit - type: object properties: model: type: string enum: - nano-banana-2 provider: type: string description: >- Provider routing override. `google` runs native Google with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Google -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string description: >- The text prompt describing the content, style, or composition of the image to be generated. image_urls: type: array items: type: string format: uri description: List of URLs or local Base64 encoded images to edit. aspect_ratio: type: string enum: - auto - '21:9' - '1:1' - '4:3' - '3:2' - '2:3' - '5:4' - '4:5' - '3:4' - '16:9' - '9:16' default: auto description: The aspect ratio of the generated image. resolution: type: string enum: - 1K - 2K - 4K default: 1K description: The size of the generated image. enable_web_search: type: boolean default: false description: >- Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image. required: - model - prompt title: nano-banana-2 - type: object properties: model: type: string enum: - imagen4/preview prompt: type: string description: >- The text prompt describing the content, style, or composition of the image to be generated. aspect_ratio: type: string enum: - '1:1' - '16:9' - '9:16' - '3:4' - '4:3' default: '1:1' description: The aspect ratio of the generated image. num_images: type: integer minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 0 maximum: 4294967295 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. required: - model - prompt title: imagen4/preview - type: object properties: model: type: string enum: - hunyuan-part - tencent/hunyuan-part mesh_url: type: string format: uri description: >- URL of the 3D model file (.glb or .obj) to process for segmentation. point_prompt_x: type: number minimum: -1 maximum: 1 description: X coordinate of the point prompt for segmentation. point_prompt_y: type: number minimum: -1 maximum: 1 description: Y coordinate of the point prompt for segmentation. point_prompt_z: type: number minimum: -1 maximum: 1 description: Z coordinate of the point prompt for segmentation. point_num: type: integer default: 100000 description: Number of points to sample from the mesh. use_normal: type: boolean default: true description: Whether to use normal information for segmentation. noise_std: type: number description: Standard deviation of noise to add to sampled points. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. required: - model - mesh_url title: hunyuan-part, tencent/hunyuan-part - type: object properties: model: type: string enum: - z-image/turbo provider: type: string description: >- Provider routing override. `alibaba` runs native Alibaba with no fallback; `fal` runs the fal.ai mirror; `auto` (default) uses the Alibaba -> fal.ai fallback chain. Case-insensitive. example: auto prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 2048 default: 1024 height: type: integer minimum: 512 maximum: 2048 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 output_format: type: string enum: - jpeg - png - webp default: png description: The format of the generated image. enable_prompt_expansion: type: boolean default: true description: >- If set to True, prompt will be upsampled with more details. num_inference_steps: type: integer minimum: 1 maximum: 8 description: The number of inference steps to perform. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. acceleration: type: string enum: - none - regular - high default: regular description: >- The speed of the generation. The higher the speed, the faster the generation. required: - model - prompt title: z-image/turbo - type: object properties: model: type: string enum: - blackforestlabs/flux-2-pro - flux-2-pro - blackforestlabs/flux-2-pro-preview prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 2048 default: 1024 height: type: integer minimum: 512 maximum: 2048 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 output_format: type: string enum: - jpeg - png - webp default: png description: The format of the generated image. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' - '6' default: '2' description: >- The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. provider: type: string description: >- Provider routing override. `blackforestlabs` runs native BFL with no fallback; `fal` runs the fal.ai fallback; `auto` (default) uses the BFL -> fal.ai fallback chain. Case-insensitive. example: auto image_urls: type: array items: type: string format: uri maxItems: 8 description: >- Input image URL(s) for image-to-image / multi-reference editing. Omit for text-to-image. required: - model - prompt title: >- blackforestlabs/flux-2-pro, flux-2-pro, blackforestlabs/flux-2-pro-preview - type: object properties: model: type: string enum: - blackforestlabs/flux-2-max prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 2048 default: 1024 height: type: integer minimum: 512 maximum: 2048 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 output_format: type: string enum: - jpeg - png default: jpeg description: The format of the generated image. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' default: '2' description: >- The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. provider: type: string description: >- Provider routing override. `blackforestlabs` runs native BFL with no fallback; `fal` runs the fal.ai fallback; `auto` (default) uses the BFL -> fal.ai fallback chain. Case-insensitive. example: auto image_urls: type: array items: type: string format: uri maxItems: 8 description: >- Input image URL(s) for image-to-image / multi-reference editing. Omit for text-to-image. required: - model - prompt title: blackforestlabs/flux-2-max - type: object properties: model: type: string enum: - blackforestlabs/flux-2-flex prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 2048 default: 1024 height: type: integer minimum: 512 maximum: 2048 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 output_format: type: string enum: - jpeg - png - webp default: png description: The format of the generated image. enable_prompt_expansion: type: boolean default: true description: >- If set to True, prompt will be upsampled with more details. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. guidance_scale: type: number minimum: 0 maximum: 20 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. num_inference_steps: type: integer minimum: 4 maximum: 50 description: The number of inference steps to perform. acceleration: type: string enum: - none - regular - high default: regular description: >- The speed of the generation. The higher the speed, the faster the generation. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. image_urls: type: array items: type: string format: uri maxItems: 8 description: >- Input image URL(s) for image-to-image / multi-reference editing. Omit for text-to-image. required: - model - prompt title: blackforestlabs/flux-2-flex - type: object properties: model: type: string enum: - blackforestlabs/flux-2-klein-9b - blackforestlabs/flux-2-klein-9b-preview - blackforestlabs/flux-2-klein-4b prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 2048 default: 1024 height: type: integer minimum: 512 maximum: 2048 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 output_format: type: string enum: - jpeg - png - webp default: png description: The format of the generated image. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' - '6' default: '2' description: >- The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. image_urls: type: array items: type: string format: uri maxItems: 8 description: >- Input image URL(s) for image-to-image / multi-reference editing. Omit for text-to-image. required: - model - prompt title: >- blackforestlabs/flux-2-klein-9b, blackforestlabs/flux-2-klein-9b-preview, blackforestlabs/flux-2-klein-4b - type: object properties: model: type: string enum: - blackforestlabs/flux-outpainting image_url: type: string format: uri description: The source image URL. width: type: integer minimum: 64 description: The output image width in pixels. height: type: integer minimum: 64 description: The output image height in pixels. auto_crop: type: boolean default: false description: Whether to crop the source image automatically. mode: type: string enum: - high - fast default: high description: The outpainting quality mode. prompt: type: string description: The optional text prompt used to guide generation. reference_offset_x: type: integer description: The horizontal reference image offset in pixels. reference_offset_y: type: integer description: The vertical reference image offset in pixels. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' default: '2' description: The safety tolerance level. output_format: type: string enum: - jpeg - png default: png description: The generated image output format. required: - model - image_url - width - height title: blackforestlabs/flux-outpainting - type: object properties: model: type: string enum: - blackforestlabs/flux-erase image_url: type: string format: uri description: The source image URL. mask_url: type: string format: uri description: The mask image URL. dilate_pixels: type: integer minimum: 0 maximum: 25 default: 10 description: The number of pixels used to dilate the mask. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' default: '2' description: The safety tolerance level. output_format: type: string enum: - jpeg - png default: png description: The generated image output format. seed: type: integer minimum: 1 description: The random seed used for generation. required: - model - image_url - mask_url title: blackforestlabs/flux-erase - type: object properties: model: type: string enum: - blackforestlabs/flux-vto prompt: type: string description: The text prompt used to guide generation. person_image_url: type: string format: uri description: The person image URL. garment_image_url: type: string format: uri description: The garment image URL. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' default: '2' description: The safety tolerance level. output_format: type: string enum: - jpeg - png default: jpeg description: The generated image output format. seed: type: integer minimum: 1 description: The random seed used for generation. required: - model - prompt - person_image_url - garment_image_url title: blackforestlabs/flux-vto - type: object properties: model: type: string enum: - blackforestlabs/flux-kontext-pro - blackforestlabs/flux-kontext-max prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. guidance_scale: type: number minimum: 1 maximum: 20 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' - '6' default: '2' description: >- The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. output_format: type: string enum: - jpeg - png default: jpeg description: The format of the generated image. aspect_ratio: type: string enum: - '21:9' - '16:9' - '4:3' - '3:2' - '1:1' - '2:3' - '3:4' - '9:16' - '9:21' default: '16:9' description: The aspect ratio of the generated image. provider: type: string description: >- Provider routing override. `blackforestlabs` runs native BFL with no fallback; `fal` runs the fal.ai fallback; `auto` (default) uses the BFL -> fal.ai fallback chain. Case-insensitive. example: auto image_urls: type: array items: type: string format: uri maxItems: 4 description: >- Input image URL(s) for image-to-image / multi-reference editing. Omit for text-to-image. required: - model - prompt title: >- blackforestlabs/flux-kontext-pro, blackforestlabs/flux-kontext-max - type: object properties: model: type: string enum: - blackforestlabs/flux-pro-1.1 prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. image_size: anyOf: - type: object properties: width: type: integer minimum: 256 maximum: 1440 default: 1024 height: type: integer minimum: 256 maximum: 1440 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' - '6' default: '2' description: >- The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. output_format: type: string enum: - jpeg - png default: jpeg description: The format of the generated image. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. provider: type: string description: >- Provider routing override. `blackforestlabs` runs native BFL with no fallback; `fal` runs the fal.ai fallback; `auto` (default) uses the BFL -> fal.ai fallback chain. Case-insensitive. example: auto required: - model - prompt title: blackforestlabs/flux-pro-1.1 - type: object properties: model: type: string enum: - blackforestlabs/flux-pro-1.1-ultra prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' - '6' default: '2' description: >- The safety tolerance level for the generated image. 1 being the most strict and 5 being the most permissive. output_format: type: string enum: - jpeg - png default: jpeg description: The format of the generated image. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. aspect_ratio: type: string enum: - '21:9' - '16:9' - '4:3' - '3:2' - '1:1' - '2:3' - '3:4' - '9:16' - '9:21' default: '16:9' description: The aspect ratio of the generated image. raw: type: boolean enum: - false default: false description: Generate less processed, more natural-looking images. provider: type: string description: >- Provider routing override. `blackforestlabs` runs native BFL with no fallback; `fal` runs the fal.ai fallback; `auto` (default) uses the BFL -> fal.ai fallback chain. Case-insensitive. example: auto required: - model - prompt title: blackforestlabs/flux-pro-1.1-ultra - type: object properties: model: type: string enum: - blackforestlabs/flux-dev prompt: type: string maxLength: 4000 description: >- The text prompt describing the content, style, or composition of the image to be generated. num_images: type: number minimum: 1 maximum: 4 default: 1 description: The number of images to generate. seed: type: integer minimum: 1 description: >- The same seed and the same prompt given to the same version of the model will output the same image every time. image_size: anyOf: - type: object properties: width: type: integer minimum: 512 maximum: 1536 default: 1024 height: type: integer minimum: 512 maximum: 1536 default: 768 description: >- For both height and width, the value must be a multiple of 32. - type: string enum: - square_hd - square - portrait_4_3 - portrait_16_9 - landscape_4_3 - landscape_16_9 description: The size of the generated image. default: landscape_4_3 guidance_scale: type: number minimum: 1 maximum: 20 description: >- The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you. num_inference_steps: type: integer minimum: 1 maximum: 50 default: 50 description: The number of inference steps to perform. enable_safety_checker: type: boolean default: true description: If set to True, the safety checker will be enabled. provider: type: string description: >- Provider routing override. `blackforestlabs` runs native BFL with no fallback; `fal` runs the fal.ai fallback; `auto` (default) uses the BFL -> fal.ai fallback chain. Case-insensitive. example: auto required: - model - prompt title: blackforestlabs/flux-dev - type: object properties: model: type: string enum: - blackforestlabs/flux-fill image_url: type: string format: uri description: The source image URL. mask_url: type: string format: uri description: The optional mask image URL. prompt: type: string default: '' description: The text prompt used to guide generation. num_inference_steps: type: integer default: 50 description: The number of inference steps. guidance_scale: type: number default: 60 description: The prompt guidance scale. enable_prompt_expansion: type: boolean default: false description: Whether to enhance the prompt automatically. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' - '6' default: '2' description: The safety tolerance level. output_format: type: string enum: - jpeg - png default: jpeg description: The generated image output format. seed: type: integer minimum: 1 description: The random seed used for generation. required: - model - image_url title: blackforestlabs/flux-fill - type: object properties: model: type: string enum: - blackforestlabs/flux-expand image_url: type: string format: uri description: The source image URL. top: type: integer default: 0 description: The number of pixels to expand above the image. bottom: type: integer default: 0 description: The number of pixels to expand below the image. left: type: integer default: 0 description: The number of pixels to expand left of the image. right: type: integer default: 0 description: The number of pixels to expand right of the image. prompt: type: string default: '' description: The text prompt used to guide generation. num_inference_steps: type: integer default: 50 description: The number of inference steps. guidance_scale: type: number default: 60 description: The prompt guidance scale. enable_prompt_expansion: type: boolean default: false description: Whether to enhance the prompt automatically. safety_tolerance: type: string enum: - '1' - '2' - '3' - '4' - '5' - '6' default: '2' description: The safety tolerance level. output_format: type: string enum: - jpeg - png default: jpeg description: The generated image output format. seed: type: integer minimum: 1 description: The random seed used for generation. required: - model - image_url title: blackforestlabs/flux-expand - type: object properties: model: type: string enum: - beeble/switchx-image-to-image - switchx-image-to-image image_url: type: string format: uri description: >- URL of the source image to recomposite. Allowed formats: JPEG, PNG, WEBP. Source must not exceed 2,770,000 total pixels. alpha_url: type: string format: uri description: >- URL of the alpha mask. Required when alpha_mode is "custom" or "select"; ignored for "auto" and "fill". A mask video for video-to-video, a mask image for image-to-image. reference_image_url: type: string format: uri description: >- URL of the reference image defining the target look and lighting for the replaced region. Allowed formats: JPEG, PNG, WEBP. At least one of reference_image_url or prompt must be provided. alpha_mode: type: string enum: - auto - fill - custom - select default: auto description: >- Subject masking strategy: "auto" (AI auto-detects the subject), "fill" (no masking), "select" (propagate a mask from one keyframe), or "custom" (frame-by-frame mask supplied via alpha_url). Defaults to "auto". max_resolution: type: integer description: >- Maximum output resolution (longer side) in pixels: 720 or 1080. Defaults to 1080. 1080 costs more than 720. enum: - 720 - 1080 default: '1080' alpha_keyframe_index: type: integer minimum: 0 description: >- Frame index (0-based) whose mask is propagated when alpha_mode is "select" on a video. Defaults to the first frame. Ignored for image generation and for the auto, fill, and custom modes. seed: type: integer minimum: 0 maximum: 4294967295 description: >- Random seed (0–4294967295) for reproducibility. Omit for a random seed. The seed used is always returned in the response. prompt: type: string maxLength: 2000 description: >- Text description of the desired output to guide the generation (max 2000 characters). At least one of prompt or reference_image_url must be provided. required: - model - image_url title: beeble/switchx-image-to-image, switchx-image-to-image responses: '200': content: application/json: schema: type: object properties: data: type: array nullable: true items: type: object properties: url: type: string nullable: true description: The URL where the file can be downloaded from. example: >- https://cdn.aimlapi.com/generations/hedgehog/1749730923700-29fe35d2-4aef-4bc5-a911-6c39884d16a8.png b64_json: type: string nullable: true description: The base64-encoded JSON of the generated image. example: null description: The list of generated images. meta: type: object nullable: true properties: usage: type: object nullable: true 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. /v1/images/edits: post: operationId: _v1_images_edits requestBody: required: true content: application/json: schema: anyOf: - type: object properties: model: type: string enum: - gpt-image-1 - openai/gpt-image-1 - gpt-image-1-mini - openai/gpt-image-1-mini - gpt-image-1.5 - openai/gpt-image-1.5 - gpt-image-2 - openai/gpt-image-2 - openai/gpt-image-1-5 prompt: type: string maxLength: 32000 description: >- The text prompt describing the content, style, or composition of the image to be generated. image: anyOf: - type: object properties: buffer: nullable: true mimetype: type: string size: type: integer originalname: type: string encoding: type: string fieldname: type: string required: - mimetype - originalname - encoding - fieldname - type: array items: type: object properties: buffer: nullable: true mimetype: type: string size: type: integer originalname: type: string encoding: type: string fieldname: type: string required: - mimetype - originalname - encoding - fieldname maxItems: 16 description: >- The image(s) to edit. Must be a supported image file or an array of images. Each image should be a png, webp, or jpg file less than 50MB. You can provide up to 16 images. size: type: string enum: - 1024x1024 - 1024x1536 - 1536x1024 default: 1024x1024 description: The size of the generated image. quality: type: string enum: - low - high - medium default: medium description: The quality of the image that will be generated. output_format: type: string enum: - png - jpeg - webp default: png description: The format of the generated image. mask: type: object properties: buffer: nullable: true mimetype: type: string size: type: integer originalname: type: string encoding: type: string fieldname: type: string required: - mimetype - originalname - encoding - fieldname description: >- An additional image whose fully transparent areas (e.g. where alpha is zero) indicate where image should be edited. If there are multiple images provided, the mask will be applied on the first image. Must be a valid PNG file, less than 4MB, and have the same dimensions as image. background: type: string enum: - transparent - opaque - auto default: auto description: >- Allows to set transparency for the background of the generated image(s). When auto is used, the model will automatically determine the best background for the image. If transparent, the output format needs to support transparency, so it should be set to either png (default value) or webp. 'n': type: number minimum: 1 maximum: 10 default: 1 description: The number of images to generate. output_compression: type: integer minimum: 0 maximum: 100 default: 100 description: >- Compression level (0-100%), applies to JPEG and WebP only. response_format: type: string enum: - url - b64_json default: url description: The format in which the generated images are returned. required: - model - prompt - image title: >- gpt-image-1, openai/gpt-image-1, gpt-image-1-mini, openai/gpt-image-1-mini, gpt-image-1.5, openai/gpt-image-1.5, gpt-image-2, openai/gpt-image-2, openai/gpt-image-1-5 - type: object properties: model: type: string enum: - test/dummy-image prompt: type: string minLength: 1 image: anyOf: - type: object properties: buffer: nullable: true mimetype: type: string size: type: integer originalname: type: string encoding: type: string fieldname: type: string required: - mimetype - originalname - encoding - fieldname - type: array items: type: object properties: buffer: nullable: true mimetype: type: string size: type: integer originalname: type: string encoding: type: string fieldname: type: string required: - mimetype - originalname - encoding - fieldname maxItems: 4 mask: type: object properties: buffer: nullable: true mimetype: type: string size: type: integer originalname: type: string encoding: type: string fieldname: type: string required: - mimetype - originalname - encoding - fieldname 'n': type: integer minimum: 1 maximum: 4 size: type: string test: type: object properties: delay: type: number nullable: true errorStatus: type: number nullable: true required: - model - prompt - image title: test/dummy-image responses: '200': content: application/json: schema: type: object properties: data: type: array nullable: true items: type: object properties: url: type: string nullable: true description: The URL where the file can be downloaded from. example: >- https://cdn.aimlapi.com/generations/hedgehog/1749730923700-29fe35d2-4aef-4bc5-a911-6c39884d16a8.png b64_json: type: string nullable: true description: The base64-encoded JSON of the generated image. example: null description: The list of generated images. meta: type: object nullable: true properties: usage: type: object nullable: true 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. /v1/messages: post: operationId: _v1_messages requestBody: required: true content: application/json: schema: anyOf: - 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true description: The refusal message by the Assistant. audio: type: object nullable: true 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: nullable: true 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. 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. 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: nullable: true required: type: array items: type: string required: - type additionalProperties: nullable: true description: |- JSON schema for this tool's input. 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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. 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. Each tool definition includes: name: Name of the tool. description: Optional, but strongly-recommended description of the tool. 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: 64000 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. 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 - 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 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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. - Maximum size per file: Up to 512 MB and up to 2 million tokens. - 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. - 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 nullable: true 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. - nullable: true 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: nullable: true 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: nullable: true 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 nullable: true description: The refusal message by the Assistant. audio: type: object nullable: true 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: nullable: true 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. 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. 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: nullable: true required: type: array items: type: string required: - type additionalProperties: nullable: true description: |- JSON schema for this tool's input. 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true 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: nullable: true description: >- The parameters the functions accepts, described as a JSON Schema object. strict: type: boolean nullable: true 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. 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. Each tool definition includes: name: Name of the tool. description: Optional, but strongly-recommended description of the tool. 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, 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 - type: object properties: model: type: string enum: - test/dummy-breaker - dummy-breaker - test/dummy messages: type: array items: nullable: true minItems: 1 max_tokens: type: integer minimum: 1 system: anyOf: - type: string - type: array items: nullable: true stream: type: boolean test: type: object properties: credits: type: number delay: type: number errorStatus: type: number required: - model - messages - max_tokens title: test/dummy-breaker, dummy-breaker, test/dummy responses: '200': content: application/json: schema: type: object properties: {} text/event-stream: schema: type: object properties: {} /v1/batches: post: operationId: _v1_batches requestBody: required: true content: application/json: schema: anyOf: - 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-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 - claude-opus-4-1-latest - claude-opus-4-1 - anthropic/claude-opus-4.1 - anthropic/claude-opus-4.1-20250805 - anthropic/claude-sonnet-4.5 - claude-sonnet-4-5 - anthropic/claude-haiku-4.5 - claude-haiku-4-5 - anthropic/claude-opus-4-5 - claude-opus-4-5 - anthropic/claude-opus-4.5 - anthropic/claude-sonnet-4.6 - anthropic/claude-sonnet-4-6-20260218 - anthropic/claude-opus-4.7 - anthropic/claude-opus-4.8 requests: type: array items: type: object properties: custom_id: type: string params: type: object properties: model: type: string max_tokens: type: number minimum: 1 default: 1024 messages: type: array items: nullable: true metadata: type: object additionalProperties: type: string stop_sequences: type: array items: type: string system: type: string temperature: type: number minimum: 0 maximum: 1 default: 1 tool_choice: nullable: true tools: type: array items: nullable: true top_k: type: number top_p: type: number 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 required: - model - messages required: - custom_id - params minItems: 1 maxItems: 100000 required: - model - requests 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-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, claude-opus-4-1-latest, claude-opus-4-1, anthropic/claude-opus-4.1, anthropic/claude-opus-4.1-20250805, anthropic/claude-sonnet-4.5, claude-sonnet-4-5, anthropic/claude-haiku-4.5, claude-haiku-4-5, anthropic/claude-opus-4-5, claude-opus-4-5, anthropic/claude-opus-4.5, anthropic/claude-sonnet-4.6, anthropic/claude-sonnet-4-6-20260218, anthropic/claude-opus-4.7, anthropic/claude-opus-4.8 - type: object properties: model: type: string enum: - test/dummy-batches requests: type: array items: type: object properties: custom_id: type: string minLength: 1 params: type: object properties: model: type: string max_tokens: type: integer minimum: 1 default: 1024 messages: type: array items: nullable: true minItems: 1 required: - model - messages required: - custom_id - params minItems: 1 maxItems: 100 test: type: object properties: delay: type: number runningPolls: type: number tokens: type: number errorStatus: type: number submitErrorStatus: type: number required: - model - requests title: test/dummy-batches responses: '200': content: application/json: schema: type: object properties: {} get: operationId: _v1_batches requestBody: required: true content: application/json: schema: 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-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 - claude-opus-4-1-latest - claude-opus-4-1 - anthropic/claude-opus-4.1 - anthropic/claude-opus-4.1-20250805 - anthropic/claude-sonnet-4.5 - claude-sonnet-4-5 - anthropic/claude-haiku-4.5 - claude-haiku-4-5 - anthropic/claude-opus-4-5 - claude-opus-4-5 - anthropic/claude-opus-4.5 - anthropic/claude-sonnet-4.6 - anthropic/claude-sonnet-4-6-20260218 - anthropic/claude-opus-4.7 - anthropic/claude-opus-4.8 - test/dummy-batches id: type: string required: - model - id 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-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, claude-opus-4-1-latest, claude-opus-4-1, anthropic/claude-opus-4.1, anthropic/claude-opus-4.1-20250805, anthropic/claude-sonnet-4.5, claude-sonnet-4-5, anthropic/claude-haiku-4.5, claude-haiku-4-5, anthropic/claude-opus-4-5, claude-opus-4-5, anthropic/claude-opus-4.5, anthropic/claude-sonnet-4.6, anthropic/claude-sonnet-4-6-20260218, anthropic/claude-opus-4.7, anthropic/claude-opus-4.8, test/dummy-batches responses: '200': content: application/json: schema: type: object properties: {} /v1/batches/cancel/:batch_id: post: operationId: _v1_batches_cancel_:batch_id requestBody: required: true content: application/json: schema: 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-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 - claude-opus-4-1-latest - claude-opus-4-1 - anthropic/claude-opus-4.1 - anthropic/claude-opus-4.1-20250805 - anthropic/claude-sonnet-4.5 - claude-sonnet-4-5 - anthropic/claude-haiku-4.5 - claude-haiku-4-5 - anthropic/claude-opus-4-5 - claude-opus-4-5 - anthropic/claude-opus-4.5 - anthropic/claude-sonnet-4.6 - anthropic/claude-sonnet-4-6-20260218 - anthropic/claude-opus-4.7 - anthropic/claude-opus-4.8 - test/dummy-batches id: type: string required: - model - id 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-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, claude-opus-4-1-latest, claude-opus-4-1, anthropic/claude-opus-4.1, anthropic/claude-opus-4.1-20250805, anthropic/claude-sonnet-4.5, claude-sonnet-4-5, anthropic/claude-haiku-4.5, claude-haiku-4-5, anthropic/claude-opus-4-5, claude-opus-4-5, anthropic/claude-opus-4.5, anthropic/claude-sonnet-4.6, anthropic/claude-sonnet-4-6-20260218, anthropic/claude-opus-4.7, anthropic/claude-opus-4.8, test/dummy-batches responses: '200': content: application/json: schema: type: object properties: {} /v2/generate/audio: post: operationId: _v2_generate_audio requestBody: required: true content: application/json: schema: anyOf: - type: object properties: model: type: string enum: - elevenlabs/eleven_music prompt: type: string maxLength: 2000 description: >- A text description that can define the genre, mood, instruments, vocals, tempo, structure, and even lyrics of the track. It can be high-level (“peaceful meditation with voiceover”) or detailed (“solo piano in C minor, 90 BPM, raw and emotional”). Use keywords to control genre, emotional tone, vocals (e.g., a cappella, two singers harmonizing), structure (e.g., “lyrics begin at 15 seconds”), or provide custom lyrics directly in the prompt. music_length_ms: type: integer minimum: 10000 maximum: 300000 default: 10000 description: >- The length of the song to generate in milliseconds. This parameter may not always be respected by the model, and the actual audio length can differ. format: milliseconds required: - model - prompt title: elevenlabs/eleven_music - type: object properties: model: type: string enum: - test/dummy-audio prompt: type: string minLength: 1 duration: type: integer minimum: 1 maximum: 10 default: 5 test: type: object properties: delay: type: number runningPolls: type: number errorStatus: type: number submitErrorStatus: type: number required: - model - prompt title: test/dummy-audio - type: object properties: model: type: string enum: - minimax/music-1.5 prompt: type: string minLength: 10 maxLength: 300 description: >- A description of the music, specifying style, mood, and scenario. Length: 10–300 characters. lyrics: type: string minLength: 10 maxLength: 3000 description: >- Lyrics of the song. Use ( ) to separate lines. You may add structure tags like [Intro], [Verse], [Chorus], [Bridge], [Outro] to enhance the arrangement. Length: 10–3000 characters. example: |- [Verse] Streetlights flicker, the night breeze sighs Shadows stretch as I walk alone An old coat wraps my silent sorrow Wandering, longing, where should I go [Chorus] Pushing the wooden door, the aroma spreads In a familiar corner, a stranger gazes audio_setting: type: object properties: sample_rate: type: integer description: The sampling rate of the generated music. enum: - 16000 - 24000 - 32000 - 44100 default: '44100' bitrate: type: integer description: The bit rate of the generated music. enum: - 32000 - 64000 - 128000 - 256000 default: '256000' format: type: string enum: - mp3 - wav - pcm default: mp3 description: The format of the generated music. required: - model - prompt - lyrics title: minimax/music-1.5 - type: object properties: model: type: string enum: - minimax/music-2.0 prompt: type: string minLength: 10 maxLength: 2000 description: >- A description of the music, specifying style, mood, and scenario. Length: 10–2000 characters. lyrics: type: string minLength: 10 maxLength: 3000 description: >- Lyrics of the song. Use ( ) to separate lines. You may add structure tags like [Intro], [Verse], [Chorus], [Bridge], [Outro] to enhance the arrangement. Length: 10–3000 characters. example: |- [Verse] Streetlights flicker, the night breeze sighs Shadows stretch as I walk alone An old coat wraps my silent sorrow Wandering, longing, where should I go [Chorus] Pushing the wooden door, the aroma spreads In a familiar corner, a stranger gazes audio_setting: type: object properties: sample_rate: type: integer description: The sampling rate of the generated music. enum: - 16000 - 24000 - 32000 - 44100 default: '44100' bitrate: type: integer description: The bit rate of the generated music. enum: - 32000 - 64000 - 128000 - 256000 default: '256000' format: type: string enum: - mp3 - wav - pcm default: mp3 description: The format of the generated music. required: - model - prompt - lyrics title: minimax/music-2.0 - type: object properties: model: type: string enum: - minimax/music-2.6 prompt: type: string maxLength: 2000 description: >- A description of the music, specifying style, mood, and scenario. Length: 10–2000 characters. lyrics: type: string maxLength: 3000 description: >- Lyrics of the song. Use ( ) to separate lines. You may add structure tags like [Intro], [Verse], [Chorus], [Bridge], [Outro] to enhance the arrangement. Length: 10–3000 characters. example: |- [Verse] Streetlights flicker, the night breeze sighs Shadows stretch as I walk alone An old coat wraps my silent sorrow Wandering, longing, where should I go [Chorus] Pushing the wooden door, the aroma spreads In a familiar corner, a stranger gazes audio_setting: type: object properties: sample_rate: type: integer description: The sampling rate of the generated music. enum: - 16000 - 24000 - 32000 - 44100 default: '44100' bitrate: type: integer description: The bit rate of the generated music. enum: - 32000 - 64000 - 128000 - 256000 default: '256000' format: type: string enum: - mp3 - wav - pcm default: mp3 description: The format of the generated music. lyrics_optimizer: type: boolean default: false description: >- Whether to automatically generate lyrics based on the prompt description. When set to true and lyrics is empty, the system will automatically generate lyrics from the prompt. is_instrumental: type: boolean default: false description: >- Whether to generate instrumental music (no vocals). When set to true, the lyrics field is not required. required: - model title: minimax/music-2.6 - type: object properties: model: type: string enum: - minimax/music-cover prompt: type: string minLength: 10 maxLength: 2000 description: >- A description of the music, specifying style, mood, and scenario. Length: 10–2000 characters. reference_audio_url: type: string format: uri description: > A URL or a Base64-encoded of the reference audio. Reference audio constraints: - Duration: 6 seconds to 6 minutes - Size: max 50 MB - Format: common audio formats (mp3, wav, flac, etc.) - Must contain vocals: purely instrumental tracks are rejected, because the cover is built from the detected vocal melody Prefer a Base64 data URI or a fast CDN URL: the provider downloads an external URL itself, so a slow host adds its download time to the request. Mutually exclusive with cover_feature_id. cover_feature_id: type: string minLength: 1 description: >- Identifier of preprocessed reference-audio features, obtained from POST /v2/generate/audio/preprocess. Two-step flow: call the preprocess endpoint, review or edit the formatted_lyrics it returns, then send them here as lyrics together with this id. Valid for 24 hours. Mutually exclusive with reference_audio_url; requires lyrics. lyrics: type: string minLength: 10 maxLength: 3000 audio_setting: type: object properties: sample_rate: type: integer description: The sampling rate of the generated music. enum: - 16000 - 24000 - 32000 - 44100 default: '44100' bitrate: type: integer description: The bit rate of the generated music. enum: - 32000 - 64000 - 128000 - 256000 default: '256000' format: type: string enum: - mp3 - wav - pcm default: mp3 description: The format of the generated music. required: - model - prompt title: minimax/music-cover - type: object properties: model: type: string enum: - lyria2 - google/lyria2 prompt: type: string description: >- Lyrics with optional formatting. You can use a newline to separate each line of lyrics. You can use two newlines to add a pause between lines. You can use double hash marks (##) at the beginning and end of the lyrics to add accompaniment. Maximum 600 characters. negative_prompt: type: string description: >- A description of what to exclude from the generated audio seed: type: integer minimum: 0 description: >- A seed for deterministic generation. If provided, the model will attempt to produce the same audio given the same prompt and other parameters. required: - model - prompt title: lyria2, google/lyria2 - type: object properties: model: type: string enum: - minimax-music prompt: type: string description: >- Lyrics with optional formatting. You can use a newline to separate each line of lyrics. You can use two newlines to add a pause between lines. You can use double hash marks (##) at the beginning and end of the lyrics to add accompaniment. Maximum 600 characters. reference_audio_url: type: string format: uri description: >- Reference song, should contain music and vocals. Must be a .wav or .mp3 file longer than 15 seconds. required: - model - prompt - reference_audio_url title: minimax-music - type: object properties: model: type: string enum: - stable-audio prompt: type: string description: The prompt to generate audio. seconds_start: type: integer maximum: 47 minimum: 1 description: The start point of the audio clip to generate. seconds_total: type: integer maximum: 47 minimum: 1 default: 30 description: The duration of the audio clip to generate. steps: type: integer minimum: 1 maximum: 1000 default: 100 description: The number of steps to denoise the audio. required: - model - prompt title: stable-audio responses: '200': content: application/json: schema: type: object properties: id: type: string description: The ID of the generated audio. example: 60ac7c34-3224-4b14-8e7d-0aa0db708325 status: type: string enum: - queued - generating - completed - error description: The current status of the generation task. example: completed audio_file: type: object nullable: true properties: url: type: string format: uri description: The URL where the file can be downloaded from. example: >- https://cdn.aimlapi.com/generations/hippopotamus/1757963033314-8ca7729d-b78c-4d4c-9ef9-89b2fb3d07e8.mp3 required: - url error: type: object nullable: true properties: name: type: string message: type: string required: - name - message description: Description of the error, if any. meta: type: object nullable: true properties: usage: type: object nullable: true 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 - status get: operationId: _v2_generate_audio requestBody: required: true content: application/json: schema: type: object properties: model: type: string enum: - elevenlabs/eleven_music - test/dummy-audio - minimax/music-1.5 - minimax/music-2.0 - minimax/music-2.6 - minimax/music-cover - lyria2 - minimax-music - stable-audio - google/lyria2 id: type: string required: - model - id title: >- elevenlabs/eleven_music, test/dummy-audio, minimax/music-1.5, minimax/music-2.0, minimax/music-2.6, minimax/music-cover, lyria2, minimax-music, stable-audio, google/lyria2 responses: '200': content: application/json: schema: type: object properties: id: type: string description: The ID of the generated audio. example: 60ac7c34-3224-4b14-8e7d-0aa0db708325 status: type: string enum: - queued - generating - completed - error description: The current status of the generation task. example: completed audio_file: type: object nullable: true properties: url: type: string format: uri description: The URL where the file can be downloaded from. example: >- https://cdn.aimlapi.com/generations/hippopotamus/1757963033314-8ca7729d-b78c-4d4c-9ef9-89b2fb3d07e8.mp3 required: - url error: type: object nullable: true properties: name: type: string message: type: string required: - name - message description: Description of the error, if any. meta: type: object nullable: true properties: usage: type: object nullable: true 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 - status /v1/ocr: post: operationId: _v1_ocr requestBody: required: true content: application/json: schema: anyOf: - type: object properties: model: type: string enum: - gc-document-ai - google/gc-document-ai document: anyOf: - type: string format: uri - type: string description: The document file to be processed by the OCR model. mimeType: type: string enum: - application/pdf - image/gif - image/tiff - image/jpeg - image/png - image/bmp - image/webp - text/html description: The MIME type of the document. pages: anyOf: - type: object properties: type: type: string enum: - start start: type: integer minimum: 1 required: - type - start - type: object properties: type: type: string enum: - end end: type: integer minimum: 1 required: - type - end - type: object properties: type: type: string enum: - range start: type: integer minimum: 1 end: type: integer minimum: 2 required: - type - start - end - type: object properties: type: type: string enum: - indices indices: type: array items: type: integer minimum: 1 maxItems: 15 required: - type - indices description: Specific pages you wants to process required: - model - document title: gc-document-ai, google/gc-document-ai - type: object properties: model: type: string enum: - glm-ocr - zhipu/glm-ocr document: oneOf: - type: object properties: type: type: string enum: - document_url description: Type of document. document_url: type: string format: uri description: >- URL of a document file to be processed by the OCR model. Supported file formats: PDF ≤ 50MB. required: - type - document_url - type: object properties: type: type: string enum: - image_url description: Image URL. image_url: type: string format: uri description: >- URL of a single image to be processed by the OCR model. Supported file formats: JPG, PNG. Single image ≤10MB. required: - type - image_url description: Document to run OCR. pages: anyOf: - type: string - type: array items: type: integer description: Specific pages to process, e.g. "3", "0-2", [0, 3, 4]. include_image_base64: type: boolean description: Include base64 images in response. image_limit: type: integer description: Max images to extract. image_min_size: type: integer description: Minimum height and width of image to extract return_crop_images: type: boolean description: Whether to return screenshot information. need_layout_visualization: type: boolean description: >- Whether to return detailed layout image result information. required: - model - document title: glm-ocr, zhipu/glm-ocr - type: object properties: model: type: string enum: - test/dummy-ocr document: oneOf: - type: object properties: type: type: string enum: - document_url document_url: type: string format: uri required: - type - document_url - type: object properties: type: type: string enum: - image_url image_url: type: string format: uri required: - type - image_url pages: anyOf: - type: string - type: array items: type: integer - nullable: true include_image_base64: type: boolean nullable: true test: type: object properties: delay: type: number pages: type: integer minimum: 1 maximum: 20 errorStatus: type: number required: - model - document title: test/dummy-ocr - type: object properties: model: type: string enum: - mistral-ocr-latest - mistral/mistral-ocr-latest - mistral-ocr-2512 - mistral/mistral-ocr-2512 - mistral-ocr-4-0 - mistral/mistral-ocr-4-0 - mistral-ocr-3 - mistral/mistral-ocr-3 - mistral-ocr-4 - mistral/mistral-ocr-4 document: oneOf: - type: object properties: type: type: string enum: - document_url description: Type of document. document_url: type: string format: uri description: Document URL. required: - type - document_url - type: object properties: type: type: string enum: - image_url description: Image URL. image_url: type: string format: uri description: Type of document. required: - type - image_url description: Document to run OCR pages: anyOf: - type: string - type: array items: type: integer - nullable: true description: Specific pages you wants to process example: '"3" or "0-2" or [0, 3, 4]' include_image_base64: type: boolean nullable: true description: Include base64 images in response image_limit: type: integer nullable: true description: Max images to extract image_min_size: type: integer nullable: true description: Minimum height and width of image to extract bbox_annotation_format: type: object nullable: true properties: type: type: string enum: - json_schema json_schema: type: object properties: name: type: string schema: type: object additionalProperties: nullable: true description: type: string nullable: true strict: type: boolean nullable: true required: - name - schema required: - type - json_schema description: >- JSON schema to structure the annotation of each extracted bounding box (figures, charts, images). Using any annotation format switches the request to the annotated-page rate. document_annotation_format: type: object nullable: true properties: type: type: string enum: - json_schema json_schema: type: object properties: name: type: string schema: type: object additionalProperties: nullable: true description: type: string nullable: true strict: type: boolean nullable: true required: - name - schema required: - type - json_schema description: >- JSON schema to extract structured data from the whole document. Using any annotation format switches the request to the annotated-page rate. document_annotation_prompt: type: string nullable: true description: >- Optional high-level prompt to guide and instruct how the document is annotated. required: - model - document title: >- mistral-ocr-latest, mistral/mistral-ocr-latest, mistral-ocr-2512, mistral/mistral-ocr-2512, mistral-ocr-4-0, mistral/mistral-ocr-4-0, mistral-ocr-3, mistral/mistral-ocr-3, mistral-ocr-4, mistral/mistral-ocr-4 responses: '200': content: application/json: schema: type: object properties: pages: type: array items: type: object properties: index: type: integer description: The page index in a PDF document starting from 0 markdown: type: string description: The markdown string response of the page images: type: array items: type: object properties: id: type: string description: Image ID for extracted image in a page top_left_x: type: integer nullable: true description: >- X coordinate of top-left corner of the extracted image top_left_y: type: integer nullable: true description: >- Y coordinate of top-left corner of the extracted image bottom_right_x: type: integer nullable: true description: >- X coordinate of bottom-right corner of the extracted image bottom_right_y: type: integer nullable: true description: >- Y coordinate of bottom-right corner of the extracted image image_base64: type: string nullable: true format: uri description: Base64 string of the extracted image required: - id - top_left_x - top_left_y - bottom_right_x - bottom_right_y description: List of all extracted images in the page dimensions: type: object nullable: true properties: dpi: type: integer description: Dots per inch of the page-image. height: type: integer description: Height of the image in pixels. width: type: integer description: Width of the image in pixels. required: - dpi - height - width description: The dimensions of the PDF page's screenshot image required: - index - markdown - images - dimensions description: List of OCR info for pages model: type: string description: The model used to generate the OCR. document_annotation: type: string nullable: true description: >- Structured annotation of the whole document as a JSON string, returned when document_annotation_format is provided. usage_info: type: object properties: pages_processed: type: integer description: Number of pages processed doc_size_bytes: type: integer nullable: true description: Document size in bytes required: - pages_processed - doc_size_bytes description: Usage info for the OCR request. meta: type: object nullable: true properties: usage: type: object nullable: true 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: - pages - model - usage_info /v2/generate/audio/preprocess: post: operationId: _v2_generate_audio_preprocess requestBody: required: true content: application/json: schema: type: object properties: model: type: string enum: - minimax/music-cover reference_audio_url: type: string format: uri description: >- A URL or a Base64-encoded data URI of the reference audio to analyze. Reference audio constraints: - Duration: 6 seconds to 6 minutes - Size: max 50 MB - Format: common audio formats (mp3, wav, flac, etc.) - Must contain vocals: purely instrumental tracks are rejected, because the cover is built from the detected vocal melody Prefer a Base64 data URI or a fast CDN URL: the provider downloads an external URL itself, so a slow host adds its download time to the request. The analysis result (cover_feature_id) is valid for 24 hours; pass it to POST /v2/generate/audio together with lyrics to generate the cover. required: - model - reference_audio_url title: minimax/music-cover responses: '200': content: application/json: schema: type: object properties: cover_feature_id: type: string description: >- Identifier of the preprocessed reference-audio features. Valid for 24 hours and only within this platform. Pass it to POST /v2/generate/audio instead of reference_audio_url, together with lyrics. formatted_lyrics: type: string description: >- Lyrics recognized from the reference audio, formatted with section tags such as [Verse] and [Chorus]. Review or edit them and pass as lyrics in the generation call. structure_result: type: string description: >- Detected song structure as a raw JSON string (segment types and timestamps), exactly as returned by the provider. audio_duration: type: number description: Duration of the reference audio in seconds. required: - cover_feature_id - formatted_lyrics - structure_result - audio_duration