AIHubMix · Schema

CreateChatCompletionRequest

CompanyArtificial IntelligenceLLMModel RoutingAI GatewayGenerative AIMCP

Properties

Name Type Description
metadata object
top_logprobs integernull An integer between 0 and 20 specifying the maximum number of most likely tokens to return at each token position, each with an associated log probability. In some cases, the number of returned tokens
temperature object
top_p object
user string This field is being replaced by `safety_identifier` and `prompt_cache_key`. Use `prompt_cache_key` instead to maintain caching optimizations. A stable identifier for your end-users. Used to boost cach
safety_identifier string A stable identifier used to help detect users of your application that may be violating OpenAI's usage policies. The IDs should be a string that uniquely identifies each user, with a maximum length of
prompt_cache_key string Used by OpenAI to cache responses for similar requests to optimize your cache hit rates. Replaces the `user` field. [Learn more](https://developers.openai.com/api/docs/guides/prompt-caching).
service_tier object
prompt_cache_retention object
messages array A list of messages comprising the conversation so far. Depending on the [model](https://developers.openai.com/api/docs/models) you use, different message types (modalities) are supported, like [text](
model object Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the [model guid
modalities object
verbosity object
reasoning_effort object
max_completion_tokens integernull An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).
frequency_penalty numbernull 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 numbernull Number between -2.0 and 2.0. 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.
web_search_options object This tool searches the web for relevant results to use in a response. Learn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search?api-mode=chat).
response_format object An object specifying the format that the model must output. Setting to `{ "type": "json_schema", "json_schema": {...} }` enables Structured Outputs which ensures the model will match your supplied JSO
audio objectnull Parameters for audio output. Required when audio output is requested with `modalities: ["audio"]`. [Learn more](https://developers.openai.com/api/docs/guides/audio).
store booleannull Whether or not to store the output of this chat completion request for use in our [model distillation](https://developers.openai.com/api/docs/guides/distillation) or [evals](https://developers.openai.
stream booleannull If set to true, the model response data will be streamed to the client as it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-se
stop object
logit_bias objectnull 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 10
logprobs booleannull 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`.
max_tokens integernull The maximum number of [tokens](/tokenizer) that can be generated in the chat completion. This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API. This val
n integernull 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 object Configuration for a [Predicted Output](https://developers.openai.com/api/docs/guides/predicted-outputs), which can greatly improve response times when large parts of the model response are known ahead
seed integernull 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. De
stream_options object
tools array A list of tools the model may call. You can provide either [custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) or [function tools](https://developers.openai.com
tool_choice object
parallel_tool_calls object
function_call object Deprecated in favor of `tool_choice`. Controls which (if any) function is called by the model. `none` means the model will not call a function and instead generates a message. `auto` means the model c
functions array Deprecated in favor of `tools`. A list of functions the model may generate JSON inputs for.
top_k integer Top-K sampling — only the K highest-probability tokens are considered. Passed through to Anthropic (pre-Claude-Opus-4.6) / Gemini / Vertex / Cohere. Ignored by OpenAI / Azure.
View JSON Schema on GitHub

JSON Schema

aihubmix-create-chat-completion-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/aihubmix/main/json-schema/aihubmix-create-chat-completion-request-schema.json",
  "title": "CreateChatCompletionRequest",
  "x-generated": "2026-10-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": {
    "from": "avs://openai/official",
    "authority": "official"
  },
  "allOf": [
    {
      "$ref": "#/$defs/CreateModelResponseProperties"
    },
    {
      "type": "object",
      "properties": {
        "messages": {
          "description": "A list of messages comprising the conversation so far. Depending on the\n[model](https://developers.openai.com/api/docs/models) you use, different message types (modalities) are\nsupported, like [text](https://developers.openai.com/api/docs/guides/text-generation),\n[images](https://developers.openai.com/api/docs/guides/vision), and [audio](https://developers.openai.com/api/docs/guides/audio).\n",
          "type": "array",
          "minItems": 1,
          "items": {
            "$ref": "#/$defs/ChatCompletionRequestMessage"
          },
          "x-providers": {
            "anthropic": {
              "transform": "split_system_from_messages"
            },
            "bedrock": {
              "transform": "split_system_from_messages"
            },
            "gemini": {
              "to": [
                "contents"
              ],
              "transform": "openai_messages_to_gemini_contents"
            },
            "vertex": {
              "to": [
                "contents"
              ],
              "transform": "openai_messages_to_gemini_contents"
            }
          }
        },
        "model": {
          "description": "Model ID used to generate the response, like `gpt-4o` or `o3`. OpenAI\noffers a wide range of models with different capabilities, performance\ncharacteristics, and price points. Refer to the [model guide](https://developers.openai.com/api/docs/models)\nto browse and compare available models.\n",
          "$ref": "#/$defs/ModelIdsShared"
        },
        "modalities": {
          "$ref": "#/$defs/ResponseModalities"
        },
        "verbosity": {
          "$ref": "#/$defs/Verbosity"
        },
        "reasoning_effort": {
          "$ref": "#/$defs/ReasoningEffort"
        },
        "max_completion_tokens": {
          "description": "An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://developers.openai.com/api/docs/guides/reasoning).\n",
          "type": [
            "integer",
            "null"
          ]
        },
        "frequency_penalty": {
          "type": [
            "number",
            "null"
          ],
          "default": 0,
          "minimum": -2,
          "maximum": 2,
          "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on\ntheir existing frequency in the text so far, decreasing the model's\nlikelihood to repeat the same line verbatim.\n"
        },
        "presence_penalty": {
          "type": [
            "number",
            "null"
          ],
          "default": 0,
          "minimum": -2,
          "maximum": 2,
          "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on\nwhether they appear in the text so far, increasing the model's likelihood\nto talk about new topics.\n"
        },
        "web_search_options": {
          "type": "object",
          "title": "Web search",
          "description": "This tool searches the web for relevant results to use in a response.\nLearn more about the [web search tool](https://developers.openai.com/api/docs/guides/tools-web-search?api-mode=chat).\n",
          "properties": {
            "user_location": {
              "type": [
                "object",
                "null"
              ],
              "required": [
                "type",
                "approximate"
              ],
              "description": "Approximate location parameters for the search.\n",
              "properties": {
                "type": {
                  "type": "string",
                  "description": "The type of location approximation. Always `approximate`.\n",
                  "enum": [
                    "approximate"
                  ]
                },
                "approximate": {
                  "$ref": "#/$defs/WebSearchLocation"
                }
              }
            },
            "search_context_size": {
              "$ref": "#/$defs/WebSearchContextSize"
            }
          }
        },
        "top_logprobs": {
          "description": "An integer between 0 and 20 specifying the maximum number of most likely\ntokens to return at each token position, each with an associated log\nprobability. In some cases, the number of returned tokens may be fewer than\nrequested.\n`logprobs` must be set to `true` if this parameter is used.\n",
          "type": [
            "integer",
            "null"
          ],
          "minimum": 0,
          "maximum": 20
        },
        "response_format": {
          "description": "An object specifying the format that the model must output.\n\nSetting to `{ \"type\": \"json_schema\", \"json_schema\": {...} }` enables\nStructured Outputs which ensures the model will match your supplied JSON\nschema. Learn more in the [Structured Outputs\nguide](https://developers.openai.com/api/docs/guides/structured-outputs).\n\nSetting to `{ \"type\": \"json_object\" }` enables the older JSON mode, which\nensures the message the model generates is valid JSON. Using `json_schema`\nis preferred for models that support it.\n",
          "oneOf": [
            {
              "$ref": "#/$defs/ResponseFormatText"
            },
            {
              "$ref": "#/$defs/ResponseFormatJsonSchema"
            },
            {
              "$ref": "#/$defs/ResponseFormatJsonObject"
            }
          ]
        },
        "audio": {
          "type": [
            "object",
            "null"
          ],
          "description": "Parameters for audio output. Required when audio output is requested with\n`modalities: [\"audio\"]`. [Learn more](https://developers.openai.com/api/docs/guides/audio).\n",
          "required": [
            "voice",
            "format"
          ],
          "properties": {
            "voice": {
              "$ref": "#/$defs/VoiceIdsOrCustomVoice",
              "description": "The voice the model uses to respond. Supported built-in voices are\n`alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`,\n`sage`, `shimmer`, `marin`, and `cedar`. You may also provide a\ncustom voice object with an `id`, for example `{ \"id\": \"voice_1234\" }`.\n"
            },
            "format": {
              "type": "string",
              "enum": [
                "wav",
                "aac",
                "mp3",
                "flac",
                "opus",
                "pcm16"
              ],
              "description": "Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,\n`opus`, or `pcm16`.\n"
            }
          }
        },
        "store": {
          "type": [
            "boolean",
            "null"
          ],
          "default": false,
          "description": "Whether or not to store the output of this chat completion request for\nuse in our [model distillation](https://developers.openai.com/api/docs/guides/distillation) or\n[evals](https://developers.openai.com/api/docs/guides/evals) products.\n\nSupports text and image inputs. Note: image inputs over 8MB will be dropped.\n"
        },
        "stream": {
          "description": "If set to true, the model response data will be streamed to the client\nas it is generated using [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format).\nSee the [Streaming section below](https://developers.openai.com/api/docs/api-reference/chat/streaming)\nfor more information, along with the [streaming responses](https://developers.openai.com/api/docs/guides/streaming-responses)\nguide for more information on how to handle the streaming events.\n",
          "type": [
            "boolean",
            "null"
          ],
          "default": false
        },
        "stop": {
          "$ref": "#/$defs/StopConfiguration"
        },
        "logit_bias": {
          "type": [
            "object",
            "null"
          ],
          "default": null,
          "additionalProperties": {
            "type": "integer"
          },
          "description": "Modify the likelihood of specified tokens appearing in the completion.\n\nAccepts a JSON object that maps tokens (specified by their token ID in the\ntokenizer) to an associated bias value from -100 to 100. Mathematically,\nthe bias is added to the logits generated by the model prior to sampling.\nThe exact effect will vary per model, but values between -1 and 1 should\ndecrease or increase likelihood of selection; values like -100 or 100\nshould result in a ban or exclusive selection of the relevant token.\n"
        },
        "logprobs": {
          "description": "Whether to return log probabilities of the output tokens or not. If true,\nreturns the log probabilities of each output token returned in the\n`content` of `message`.\n",
          "type": [
            "boolean",
            "null"
          ],
          "default": false
        },
        "max_tokens": {
          "description": "The maximum number of [tokens](/tokenizer) that can be generated in the\nchat completion. This value can be used to control\n[costs](https://openai.com/api/pricing/) for text generated via API.\n\nThis value is now deprecated in favor of `max_completion_tokens`, and is\nnot compatible with [o-series models](https://developers.openai.com/api/docs/guides/reasoning).\n",
          "type": [
            "integer",
            "null"
          ],
          "deprecated": true,
          "x-providers": {
            "openai": {
              "to": [
                "max_completion_tokens"
              ]
            },
            "gemini": {
              "to": [
                "generationConfig",
                "maxOutputTokens"
              ]
            },
            "vertex": {
              "to": [
                "generationConfig",
                "maxOutputTokens"
              ]
            }
          }
        },
        "n": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": 1,
          "maximum": 128,
          "default": 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": {
          "nullable": true,
          "description": "Configuration for a [Predicted Output](https://developers.openai.com/api/docs/guides/predicted-outputs),\nwhich can greatly improve response times when large parts of the model\nresponse are known ahead of time. This is most common when you are\nregenerating a file with only minor changes to most of the content.\n",
          "oneOf": [
            {
              "$ref": "#/$defs/PredictionContent"
            }
          ]
        },
        "seed": {
          "type": [
            "integer",
            "null"
          ],
          "minimum": -9223372036854776000,
          "maximum": 9223372036854776000,
          "deprecated": true,
          "description": "This feature is in Beta.\nIf 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.\nDeterminism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.\n"
        },
        "stream_options": {
          "$ref": "#/$defs/ChatCompletionStreamOptions"
        },
        "tools": {
          "type": "array",
          "description": "A list of tools the model may call. You can provide either\n[custom tools](https://developers.openai.com/api/docs/guides/function-calling#custom-tools) or\n[function tools](https://developers.openai.com/api/docs/guides/function-calling).\n",
          "items": {
            "oneOf": [
              {
                "$ref": "#/$defs/ChatCompletionTool"
              },
              {
                "$ref": "#/$defs/CustomToolChatCompletions"
              }
            ]
          },
          "x-providers": {
            "anthropic": {
              "transform": "openai_tools_to_anthropic_tools"
            },
            "bedrock": {
              "transform": "openai_tools_to_anthropic_tools"
            },
            "gemini": {
              "to": [
                "tools"
              ],
              "transform": "openai_tools_to_gemini_tools"
            },
            "vertex": {
              "to": [
                "tools"
              ],
              "transform": "openai_tools_to_gemini_tools"
            }
          }
        },
        "tool_choice": {
          "$ref": "#/$defs/ChatCompletionToolChoiceOption"
        },
        "parallel_tool_calls": {
          "$ref": "#/$defs/ParallelToolCalls"
        },
        "function_call": {
          "deprecated": true,
          "description": "Deprecated in favor of `tool_choice`.\n\nControls which (if any) function is called by the model.\n\n`none` means the model will not call a function and instead generates a\nmessage.\n\n`auto` means the model can pick between generating a message or calling a\nfunction.\n\nSpecifying a particular function via `{\"name\": \"my_function\"}` forces the\nmodel to call that function.\n\n`none` is the default when no functions are present. `auto` is the default\nif functions are present.\n",
          "oneOf": [
            {
              "type": "string",
              "description": "`none` means the model will not call a function and instead generates a message. `auto` means the model can pick between generating a message or calling a function.\n",
              "enum": [
                "none",
                "auto"
              ]
            },
            {
              "$ref": "#/$defs/ChatCompletionFunctionCallOption"
            }
          ]
        },
        "functions": {
          "deprecated": true,
          "description": "Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.\n",
          "type": "array",
          "minItems": 1,
          "maxItems": 128,
          "items": {
            "$ref": "#/$defs/ChatCompletionFunctions"
          }
        }
      },
      "required": [
        "model",
        "messages"
      ]
    }
  ],
  "properties": {
    "top_k": {
      "type": "integer",
      "minimum": 0,
      "description": "Top-K sampling — only the K highest-probability tokens are\nconsidered. Passed through to Anthropic (pre-Claude-Opus-4.6) /\nGemini / Vertex / Cohere. Ignored by OpenAI / Azure.\n",
      "x-source": {
        "from": "gateway",
        "authority": "derived"
      },
      "x-providers-default": "drop",
      "x-providers": {
        "anthropic": {},
        "bedrock": {},
        "cohere": {},
        "gemini": {
          "to": [
            "generationConfig",
            "topK"
          ]
        },
        "vertex": {
          "to": [
            "generationConfig",
            "topK"
          ]
        }
      }
    }
  },
  "$defs": {
    "ChatCompletionAllowedTools": {
      "type": "object",
      "title": "Allowed tools",
      "description": "Constrains the tools available to the model to a pre-defined set.\n",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "auto",
            "required"
          ],
          "description": "Constrains the tools available to the model to a pre-defined set.\n\n`auto` allows the model to pick from among the allowed tools and generate a\nmessage.\n\n`required` requires the model to call one or more of the allowed tools.\n"
        },
        "tools": {
          "type": "array",
          "description": "A list of tool definitions that the model should be allowed to call.\n\nFor the Chat Completions API, the list of tool definitions might look like:\n```json\n[\n  { \"type\": \"function\", \"function\": { \"name\": \"get_weather\" } },\n  { \"type\": \"function\", \"function\": { \"name\": \"get_time\" } }\n]\n```\n",
          "items": {
            "type": "object",
            "description": "A tool definition that the model should be allowed to call.\n",
            "additionalProperties": true
          }
        }
      },
      "required": [
        "mode",
        "tools"
      ],
      "x-source": {
        "from": "avs://openai/official",
        "authority": "official"
      }
    },
    "ChatCompletionAllowedToolsChoice": {
      "type": "object",
      "title": "Allowed tools",
      "description": "Constrains the tools available to the model to a pre-defined set.\n",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "allowed_tools"
          ],
          "description": "Allowed tool configuration type. Always `allowed_tools`."
        },
        "allowed_tools": {
          "$ref": "#/$defs/ChatCompletionAllowedTools"
        }
      },
      "required": [
        "type",
        "allowed_tools"
      ],
      "x-source": {
        "from": "avs://openai/official",
        "authority": "official"
      }
    },
    "ChatCompletionFunctionCallOption": {
      "type": "object",
      "description": "Specifying a particular function via `{\"name\": \"my_function\"}` forces the model to call that function.\n",
      "properties": {
        "name": {
          "type": "string",
          "description": "The name of the function to call."
        }
      },
      "required": [
        "name"
      ],
      "x-source": {
        "from": "avs://openai/official",
        "authority": "official"
      }
    },
    "ChatCompletionFunctions": {
      "type": "object",
      "deprecated": true,
      "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": {
          "$ref": "#/$defs/FunctionParameters"
        }
      },
      "required": [
        "name"
      ],
      "x-source": {
        "from": "avs://openai/official",
        "authority": "official"
      }
    },
    "ChatCompletionMessageCustomToolCall": {
      "type": "object",
      "title": "Custom tool call",
      "description": "A call to a custom tool created by the model.\n",
      "properties": {
        "id": {
          "type": "string",
          "description": "The ID of the tool call."
        },
        "type": {
          "type": "string",
          "enum": [
            "custom"
          ],
          "description": "The type of the tool. Always `custom`."
        },
        "custom": {
          "type": "object",
          "description": "The custom tool that the model called.",
          "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"
          ]
        }
      },
      "required": [
        "id",
        "type",
        "custom"
      ],
      "x-source": {
        "from": "avs://openai/official",
        "authority": "official"
      }
    },
    "ChatCompletionMessageToolCall": {
      "type": "object",
      "title": "Function tool call",
      "description": "A call to a function tool created by the model.\n",
      "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",
          "description": "The function that the model called.",
          "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"
          ]
        }
      },
      "required": [
        "id",
        "type",
        "function"
      ],
      "x-source": {
        "from": "avs://openai/official",
        "authority": "official"
      }
    },
    "ChatCompletionMessageToolCalls": {
      "type": "array",
      "description": "The tool calls generated by the model, such as function calls.",
      "items": {
        "oneOf": [
          {
            "$ref": "#/$defs/ChatCompletionMessageToolCall"
          },
          {
            "$ref": "#/$defs/ChatCompletionMessageCustomToolCall"
          }
        ]
      },
      "x-source": {
        "from": "avs://openai/official",
        "authority": "official"
      }
    },
    "ChatCompletionNamedToolChoice": {
      "type": "object",
      "title": "Function tool choice",
      "description": "Specifies a tool the model should use. Use to force the model to call a specific function.",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "function"
          ],
          "description": "For function calling, the type is always `function`."
        },
        "function": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the function to call."
            }
          },
          "required": [
            "name"
          ]
        }
      },
      "required": [
        "type",
        "function"
      ],
      "x-source": {
        "from": "avs://openai/official",
        "authority": "official"
      }
    },
    "ChatCompletionNamedToolChoiceCustom": {
      "type": "object",
      "title": "Custom tool choice",
      "description": "Specifies a tool the model should use. Use to force the model to call a specific custom tool.",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "custom"
          ],
          "description": "For custom tool calling, the type is always `custom`."
        },
        "custom": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "description": "The name of the custom tool to call."
            }
          },
          "required": [
            "name"
          ]
        }
      },
      "required": [
        "type",
        "custom"
      ],
      "x-source": {
        "from": "avs://openai/official",
        "authority": "official"
      }
    },
    "ChatCompletionRequestAssistantMessage": {
      "type": "object",
      "title": "Assistant message",
      "description": "Messages sent by the model in response to user messages.\n",
      "properties": {
        "content": {
          "anyOf": [
            {
              "oneOf": [
                {
                  "type": "string",
                  "description": "The contents of the assistant message.",
                  "title": "Text content"
                },
                {
                  "type": "array",
                  "description": "An array of content parts with a defined type. Can be one or more of type `text`, or exactly one of type `refusal`.",
                  "title": "Array of content parts",
                  "items": {
                    "$ref": "#/$defs/ChatCompletionRequestAssistantMessageContentPart"
                  },
                  "minItems": 1
                }
              ],
              "description": "The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.\n"
            },
            {
              "type": "null"
            }
          ]
        },
        "refusal": {
          "anyOf": [
            {
              "type": "string",
              "description": "The refusal message by the assistant."
            },
            {
              "type": "null"
            }
          ]
        },
        "role": {
          "type": "string",
          "enum": [
            "assistant"
          ],
          "description": "The role of the messages author, in this case `assistant`."
        },
        "name": {
          "type": "string",
          "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role."
        },
        "audio": {
          "anyOf": [
            {
              "type": "object",
              "description": "Data about a previous audio response from the model.\n[Learn more](https://developers.openai.com/api/docs/guides/audio).\n",
              "required": [
                "id"
              ],
              "properties": {
                "id": {
                  "type": "string",
                  "description": "Unique identifier for a previous audio response from the model.\n"
                }
              }
            },
            {
              "type": "null"
            }
          ]
        },
        "tool_calls": {
          "$ref": "#/$defs/ChatCompletionMessageToolCalls"
        },
        "function_call": {
          "anyOf": [
            {
              "type": "object",
              "deprecated": true,
              "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model.",
              "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"
              ]
            },
            {
              "type": "null"
            }
          ]
        },
        "reasoning_content": {
          "type": [
            "string",
            "null"
          ],
          "description": "Model-generated reasoning text (thinking / chain-of-thought). Streams\nindependently of `content`. Also accepted on the request side to replay\nthe previous assistant turn's reasoning in multi-turn conversations.\n",
          "x-source": {
            "from": "gateway",
            "authority": "gateway"
          },
          "x-providers-default": "drop",
          "x-providers": {
            "anthropic": {
              "from": [
                "content",
                "*",
                "thinking"
              ],
              "transform": "extract_thinking_text"
            },
            "bedrock": {
              "from": [
                "content",
                "*",
                "thinking"
              ],
              "transform": "extract_thinking_text"
            },
            "deepseek": {
              "from": [
                "choices",
                "0",
                "message",
                "reasoning_content"
              ]
            }
          }
        },
        "reasoning_details": {
          "type": [
            "array",
            "null"
          ],
          "description": "Structured reasoning trace. Each element mirrors the upstream shape\n(Anthropic thinking block / OpenAI Responses reasoning item / Gemini\nthought) — no fixed schema; branch on the `type` field.\n",
          "items": {
            "type": "object",
            "additionalProperties": true
          },
          "x-source": {
            "from": "gateway",
            "authority": "gateway"
          },
          "x-providers-default": "drop",
          "x-providers": {
            "anthropic": {
              "from": [
                "content"
              ],
              "transform": "anthropic_thinking_to_reasoning_details"
            },
            "bedrock": {
              "from": [
                "content"
              ],
              "transform": "anthropic_thinking_to_reasoning_details"
            },
            "gemini": {
              "from": [
                "candidates",
                "0",
                "content",
                "parts"
              ],
              "transform": "gemini_thoughts_to_reasoning_details"
            }
          }
        }
      },
      "required": [
        "role"
      ],
      "x-source": {
        "from": "avs://openai/official",
        "authority": "official"
      }
    },
    "ChatCompletionRequestAssistantMessageContentPart": {
      "oneOf": [
        {
          "$ref": "#/$defs/ChatCompletionRequestMessageContentPartText"
        },
        {
          "$ref": "#/$defs/ChatCompletionRequestMessageContentPartRefusal"
        }
      ],
      "x-source": {
        "from": "avs://openai/official",
        "authority": "official"
      }
    },
    "ChatCompletionRequestDeveloperMessage": {
      "type": "object",
      "title": "Developer message",
      "description": "Developer-provided instructions that the model should follow, regardless of\nmessages sent by the user. With o1 models and newer, `developer` messages\nreplace the previous `system` messages.\n",
      "properties": {
        "content": {
          "description": "The contents of the developer message.",
          "oneOf": [
            {
              "type": "string",
              "description": "The contents of the developer message.",
              "title": "Text content"
            },
            {
              "type": "array",
              "description": "An array of content parts with a defined type. For developer messages, only type `text` is supported.",
              "title": "Array of content parts",
              "items": {
                "$ref": "#/$defs/ChatCompletionRequestMessageContentPartText"
              },
              "minItems": 1
            }
          ]
        },
        "role": {
          "type": "string",
          "enum": [
            "developer"
          ],
          "description": "The role of the messages author, in this case `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"
      ],
      "x-source": {
        "from": "avs://openai/official",
        "authority": "official"
      }
    },
    "ChatCompletionRequestFunctionMessage": {
      "type": "object",
      "title": "Function message",
      "deprecated": true,
      "properties": {
        "role": {
          "type": "string",
          "enum": [
            "function"
          ],
          "description": "The role of the messages author, in this case `function`."
        },
        "content": {
          "anyOf": [
            {
              "type": "string",
              "description": "The contents of the function message."
            },
            {
        

# --- truncated at 32 KB (80 KB total) ---
# Full source: https://artifacts.apis.io/aihubmix/json-schema/aihubmix-create-chat-completion-request-schema.json

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/aihubmix-create-chat-completion-request"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.