Scale AI · Schema

ChatCompletionV2Request

Data EngineLabelingRLHFGenAI PlatformDonovanDefense AILiDARSensor FusionREST API

Properties

Name Type Description
best_of object Number of output sequences that are generated from the prompt. From these `best_of` sequences, the top `n` sequences are returned. `best_of` must be greater than or equal to `n`. This is treated as th
top_k object Controls the number of top tokens to consider. -1 means consider all tokens.
min_p object Float that represents the minimum probability for a token to be considered, relative to the probability of the most likely token. Must be in [0, 1]. Set to 0 to disable this.
use_beam_search object Whether to use beam search for sampling.
length_penalty object Float that penalizes sequences based on their length. Used in beam search.
repetition_penalty object Float that penalizes new tokens based on whether they appear in the prompt and the generated text so far. Values > 1 encourage the model to use new tokens, while values < 1 encourage the model to repe
early_stopping object Controls the stopping condition for beam search. It accepts the following values: `True`, where the generation stops as soon as there are `best_of` complete candidates; `False`, where an heuristic is
stop_token_ids object List of tokens that stop the generation when they are generated. The returned output will contain the stop tokens unless the stop tokens are special tokens.
include_stop_str_in_output object Whether to include the stop strings in output text. Defaults to False.
ignore_eos object Whether to ignore the EOS token and continue generating tokens after the EOS token is generated.
min_tokens object Minimum number of tokens to generate per output sequence before EOS or stop_token_ids can be generated
skip_special_tokens object Whether to skip special tokens in the output. Only supported in vllm.
spaces_between_special_tokens object Whether to add spaces between special tokens in the output. Only supported in vllm.
echo object If true, the new message will be prepended with the last message if they belong to the same role.
add_generation_prompt object If true, the generation prompt will be added to the chat template. This is a parameter used by chat template in tokenizer config of the model.
continue_final_message object If this is set, the chat will be formatted so that the final message in the chat is open-ended, without any EOS tokens. The model will continue this message rather than starting a new one. This allows
add_special_tokens object If true, special tokens (e.g. BOS) will be added to the prompt on top of what is added by the chat template. For most models, the chat template takes care of adding the special tokens so this should b
documents object A list of dicts representing documents that will be accessible to the model if it is performing RAG (retrieval-augmented generation). If the template does not support RAG, this argument will have no e
chat_template object A Jinja template to use for this conversion. As of transformers v4.44, default chat template is no longer allowed, so you must provide a chat template if the model's tokenizer does not define one and
chat_template_kwargs object Additional kwargs to pass to the template renderer. Will be accessible by the chat template.
guided_json object JSON schema for guided decoding. Only supported in vllm.
guided_regex object Regex for guided decoding. Only supported in vllm.
guided_choice object Choices for guided decoding. Only supported in vllm.
guided_grammar object Context-free grammar for guided decoding. Only supported in vllm.
guided_decoding_backend object If specified, will override the default guided decoding backend of the server for this specific request. If set, must be either 'outlines' / 'lm-format-enforcer'
guided_whitespace_pattern object If specified, will override the default whitespace pattern for guided json decoding.
priority object The priority of the request (lower means earlier handling; default: 0). Any priority other than 0 will raise an error if the served model does not use priority scheduling.
metadata object
temperature object 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 recomm
top_p object 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 1
user object A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).
service_tier object
messages array A list of messages comprising the conversation so far. Depending on the [model](/docs/models) you use, different message types (modalities) are supported, like [text](/docs/guides/text-generation), [i
model string ID of the model to use.
modalities object
reasoning_effort object
max_completion_tokens object An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](/docs/guides/reasoning).
frequency_penalty object 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 object 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](/docs/guides/tools-web-search?api-mode=chat).
top_logprobs object 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
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 object Parameters for audio output. Required when audio output is requested with `modalities: ["audio"]`. [Learn more](/docs/guides/audio).
store object Whether or not to store the output of this chat completion request for use in our [model distillation](/docs/guides/distillation) or [evals](/docs/guides/evals) products.
stream object If set, partial message deltas will be sent. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_st
stop object
logit_bias object 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 object 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 object 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 object 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](/docs/guides/predicted-outputs), which can greatly improve response times when large parts of the model response are known ahead of time. This is most common whe
seed object 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 object 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 suppor
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 object Deprecated in favor of `tools`. A list of functions the model may generate JSON inputs for.
View JSON Schema on GitHub

JSON Schema

scale-ai-chat-completion-v2-request-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scale-ai/json-schema/scale-ai-chat-completion-v2-request-schema.json",
  "title": "ChatCompletionV2Request",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scale-ai-llm-engine-openapi.yml#/components/schemas/ChatCompletionV2Request",
  "properties": {
    "best_of": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Best Of",
      "description": "Number of output sequences that are generated from the prompt.\n            From these `best_of` sequences, the top `n` sequences are returned.\n            `best_of` must be greater than or equal to `n`. This is treated as\n            the beam width when `use_beam_search` is True. By default, `best_of`\n            is set to `n`."
    },
    "top_k": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": -1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Top K",
      "description": "Controls the number of top tokens to consider. -1 means consider all tokens."
    },
    "min_p": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Min P",
      "description": "Float that represents the minimum probability for a token to be\n            considered, relative to the probability of the most likely token.\n            Must be in [0, 1]. Set to 0 to disable this."
    },
    "use_beam_search": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Use Beam Search",
      "description": "Whether to use beam search for sampling."
    },
    "length_penalty": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Length Penalty",
      "description": "Float that penalizes sequences based on their length.\n            Used in beam search."
    },
    "repetition_penalty": {
      "anyOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ],
      "title": "Repetition Penalty",
      "description": "Float that penalizes new tokens based on whether\n            they appear in the prompt and the generated text so far. Values > 1\n            encourage the model to use new tokens, while values < 1 encourage\n            the model to repeat tokens."
    },
    "early_stopping": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Early Stopping",
      "description": "Controls the stopping condition for beam search. It\n            accepts the following values: `True`, where the generation stops as\n            soon as there are `best_of` complete candidates; `False`, where an\n            heuristic is applied and the generation stops when is it very\n            unlikely to find better candidates; `\"never\"`, where the beam search\n            procedure only stops when there cannot be better candidates\n            (canonical beam search algorithm)."
    },
    "stop_token_ids": {
      "anyOf": [
        {
          "items": {
            "type": "integer"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Stop Token Ids",
      "description": "List of tokens that stop the generation when they are\n            generated. The returned output will contain the stop tokens unless\n            the stop tokens are special tokens."
    },
    "include_stop_str_in_output": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Include Stop Str In Output",
      "description": "Whether to include the stop strings in\n            output text. Defaults to False."
    },
    "ignore_eos": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Ignore Eos",
      "description": "Whether to ignore the EOS token and continue generating\n            tokens after the EOS token is generated."
    },
    "min_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Min Tokens",
      "description": "Minimum number of tokens to generate per output sequence\n            before EOS or stop_token_ids can be generated"
    },
    "skip_special_tokens": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Skip Special Tokens",
      "description": "Whether to skip special tokens in the output. Only supported in vllm.",
      "default": true
    },
    "spaces_between_special_tokens": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Spaces Between Special Tokens",
      "description": "Whether to add spaces between special tokens in the output. Only supported in vllm.",
      "default": true
    },
    "echo": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Echo",
      "description": "If true, the new message will be prepended with the last message if they belong to the same role."
    },
    "add_generation_prompt": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Add Generation Prompt",
      "description": "If true, the generation prompt will be added to the chat template. This is a parameter used by chat template in tokenizer config of the model."
    },
    "continue_final_message": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Continue Final Message",
      "description": "If this is set, the chat will be formatted so that the final message in the chat is open-ended, without any EOS tokens. The model will continue this message rather than starting a new one. This allows you to \"prefill\" part of the model's response for it. Cannot be used at the same time as `add_generation_prompt`."
    },
    "add_special_tokens": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Add Special Tokens",
      "description": "If true, special tokens (e.g. BOS) will be added to the prompt on top of what is added by the chat template. For most models, the chat template takes care of adding the special tokens so this should be set to false (as is the default)."
    },
    "documents": {
      "anyOf": [
        {
          "items": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Documents",
      "description": "A list of dicts representing documents that will be accessible to the model if it is performing RAG (retrieval-augmented generation). If the template does not support RAG, this argument will have no effect. We recommend that each document should be a dict containing \"title\" and \"text\" keys."
    },
    "chat_template": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Chat Template",
      "description": "A Jinja template to use for this conversion. As of transformers v4.44, default chat template is no longer allowed, so you must provide a chat template if the model's tokenizer does not define one and no override template is given"
    },
    "chat_template_kwargs": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Chat Template Kwargs",
      "description": "Additional kwargs to pass to the template renderer. Will be accessible by the chat template."
    },
    "guided_json": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Guided Json",
      "description": "JSON schema for guided decoding. Only supported in vllm."
    },
    "guided_regex": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Guided Regex",
      "description": "Regex for guided decoding. Only supported in vllm."
    },
    "guided_choice": {
      "anyOf": [
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Guided Choice",
      "description": "Choices for guided decoding. Only supported in vllm."
    },
    "guided_grammar": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Guided Grammar",
      "description": "Context-free grammar for guided decoding. Only supported in vllm."
    },
    "guided_decoding_backend": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Guided Decoding Backend",
      "description": "If specified, will override the default guided decoding backend of the server for this specific request. If set, must be either 'outlines' / 'lm-format-enforcer'"
    },
    "guided_whitespace_pattern": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Guided Whitespace Pattern",
      "description": "If specified, will override the default whitespace pattern for guided json decoding."
    },
    "priority": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "Priority",
      "description": "The priority of the request (lower means earlier handling; default: 0). Any priority other than 0 will raise an error if the served model does not use priority scheduling."
    },
    "metadata": {
      "anyOf": [
        {
          "$ref": "#/$defs/Metadata"
        },
        {
          "type": "null"
        }
      ]
    },
    "temperature": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 2.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Temperature",
      "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.\nWe generally recommend altering this or `top_p` but not both.\n",
      "default": 1
    },
    "top_p": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 1.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Top P",
      "description": "An alternative to sampling with temperature, called nucleus sampling,\nwhere the model considers the results of the tokens with top_p probability\nmass. So 0.1 means only the tokens comprising the top 10% probability mass\nare considered.\n\nWe generally recommend altering this or `temperature` but not both.\n",
      "default": 1
    },
    "user": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "User",
      "description": "A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](/docs/guides/safety-best-practices#end-user-ids).\n"
    },
    "service_tier": {
      "anyOf": [
        {
          "$ref": "#/$defs/ServiceTier"
        },
        {
          "type": "null"
        }
      ]
    },
    "messages": {
      "items": {
        "$ref": "#/$defs/ChatCompletionRequestMessage"
      },
      "type": "array",
      "minItems": 1,
      "title": "Messages",
      "description": "A list of messages comprising the conversation so far. Depending on the\n[model](/docs/models) you use, different message types (modalities) are\nsupported, like [text](/docs/guides/text-generation),\n[images](/docs/guides/vision), and [audio](/docs/guides/audio).\n"
    },
    "model": {
      "type": "string",
      "title": "Model",
      "description": "ID of the model to use."
    },
    "modalities": {
      "anyOf": [
        {
          "$ref": "#/$defs/ResponseModalities"
        },
        {
          "type": "null"
        }
      ]
    },
    "reasoning_effort": {
      "anyOf": [
        {
          "$ref": "#/$defs/ReasoningEffort"
        },
        {
          "type": "null"
        }
      ]
    },
    "max_completion_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "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](/docs/guides/reasoning).\n"
    },
    "frequency_penalty": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 2.0,
          "minimum": -2.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Frequency Penalty",
      "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",
      "default": 0
    },
    "presence_penalty": {
      "anyOf": [
        {
          "type": "number",
          "maximum": 2.0,
          "minimum": -2.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Presence Penalty",
      "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",
      "default": 0
    },
    "web_search_options": {
      "anyOf": [
        {
          "$ref": "#/$defs/WebSearchOptions"
        },
        {
          "type": "null"
        }
      ],
      "title": "Web search",
      "description": "This tool searches the web for relevant results to use in a response.\nLearn more about the [web search tool](/docs/guides/tools-web-search?api-mode=chat).\n"
    },
    "top_logprobs": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 20.0,
          "minimum": 0.0
        },
        {
          "type": "null"
        }
      ],
      "title": "Top Logprobs",
      "description": "An integer between 0 and 20 specifying the number of most likely tokens to\nreturn at each token position, each with an associated log probability.\n`logprobs` must be set to `true` if this parameter is used.\n"
    },
    "response_format": {
      "anyOf": [
        {
          "$ref": "#/$defs/ResponseFormatText"
        },
        {
          "$ref": "#/$defs/ResponseFormatJsonSchema"
        },
        {
          "$ref": "#/$defs/ResponseFormatJsonObject"
        },
        {
          "type": "null"
        }
      ],
      "title": "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](/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"
    },
    "audio": {
      "anyOf": [
        {
          "$ref": "#/$defs/Audio2"
        },
        {
          "type": "null"
        }
      ],
      "description": "Parameters for audio output. Required when audio output is requested with\n`modalities: [\"audio\"]`. [Learn more](/docs/guides/audio).\n"
    },
    "store": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Store",
      "description": "Whether or not to store the output of this chat completion request for \nuse in our [model distillation](/docs/guides/distillation) or\n[evals](/docs/guides/evals) products.\n",
      "default": false
    },
    "stream": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "Stream",
      "description": "If set, partial message deltas will be sent. Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format) as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).\n",
      "default": false
    },
    "stop": {
      "anyOf": [
        {
          "$ref": "#/$defs/StopConfiguration"
        },
        {
          "type": "null"
        }
      ]
    },
    "logit_bias": {
      "anyOf": [
        {
          "additionalProperties": {
            "type": "integer"
          },
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "title": "Logit Bias",
      "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": {
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ],
      "title": "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",
      "default": false
    },
    "max_tokens": {
      "anyOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ],
      "title": "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](/docs/guides/reasoning).\n"
    },
    "n": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 128.0,
          "minimum": 1.0
        },
        {
          "type": "null"
        }
      ],
      "title": "N",
      "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.",
      "default": 1
    },
    "prediction": {
      "anyOf": [
        {
          "$ref": "#/$defs/PredictionContent"
        },
        {
          "type": "null"
        }
      ],
      "description": "Configuration for a [Predicted Output](/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"
    },
    "seed": {
      "anyOf": [
        {
          "type": "integer",
          "maximum": 9.223372036854776e+18,
          "minimum": -9.223372036854776e+18
        },
        {
          "type": "null"
        }
      ],
      "title": "Seed",
      "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": {
      "anyOf": [
        {
          "$ref": "#/$defs/ChatCompletionStreamOptions"
        },
        {
          "type": "null"
        }
      ]
    },
    "tools": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ChatCompletionTool"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Tools",
      "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.\n"
    },
    "tool_choice": {
      "anyOf": [
        {
          "$ref": "#/$defs/ChatCompletionToolChoiceOption"
        },
        {
          "type": "null"
        }
      ]
    },
    "parallel_tool_calls": {
      "anyOf": [
        {
          "$ref": "#/$defs/ParallelToolCalls"
        },
        {
          "type": "null"
        }
      ]
    },
    "function_call": {
      "anyOf": [
        {
          "type": "string",
          "enum": [
            "none",
            "auto"
          ]
        },
        {
          "$ref": "#/$defs/ChatCompletionFunctionCallOption"
        },
        {
          "type": "null"
        }
      ],
      "title": "Function Call",
      "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"
    },
    "functions": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/ChatCompletionFunctions"
          },
          "type": "array",
          "maxItems": 128,
          "minItems": 1
        },
        {
          "type": "null"
        }
      ],
      "title": "Functions",
      "description": "Deprecated in favor of `tools`.\n\nA list of functions the model may generate JSON inputs for.\n"
    }
  },
  "type": "object",
  "required": [
    "messages",
    "model"
  ],
  "$defs": {
    "Audio": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "Unique identifier for a previous audio response from the model.\n"
        }
      },
      "type": "object",
      "required": [
        "id"
      ],
      "title": "Audio"
    },
    "Audio2": {
      "properties": {
        "voice": {
          "$ref": "#/$defs/VoiceIdsShared",
          "description": "The voice the model uses to respond. Supported voices are \n`alloy`, `ash`, `ballad`, `coral`, `echo`, `fable`, `nova`, `onyx`, `sage`, and `shimmer`.\n"
        },
        "format": {
          "type": "string",
          "enum": [
            "wav",
            "aac",
            "mp3",
            "flac",
            "opus",
            "pcm16"
          ],
          "title": "Format",
          "description": "Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`,\n`opus`, or `pcm16`.\n"
        }
      },
      "type": "object",
      "required": [
        "voice",
        "format"
      ],
      "title": "Audio2"
    },
    "ChatCompletionFunctionCallOption": {
      "properties": {
        "name": {
          "type": "string",
          "title": "Name",
          "description": "The name of the function to call."
        }
      },
      "type": "object",
      "required": [
        "name"
      ],
      "title": "ChatCompletionFunctionCallOption"
    },
    "ChatCompletionFunctions": {
      "properties": {
        "description": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Description",
          "description": "A description of what the function does, used by the model to choose when and how to call the function."
        },
        "name": {
          "type": "string",
          "title": "Name",
          "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": {
          "anyOf": [
            {
              "$ref": "#/$defs/FunctionParameters"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "type": "object",
      "required": [
        "name"
      ],
      "title": "ChatCompletionFunctions"
    },
    "ChatCompletionMessageToolCall": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id",
          "description": "The ID of the tool call."
        },
        "type": {
          "type": "string",
          "const": "function",
          "title": "Type",
          "description": "The type of the tool. Currently, only `function` is supported."
        },
        "function": {
          "$ref": "#/$defs/Function1",
          "description": "The function that the model called."
        }
      },
      "type": "object",
      "required": [
        "id",
        "type",
        "function"
      ],
      "title": "ChatCompletionMessageToolCall"
    },
    "ChatCompletionMessageToolCalls-Input": {
      "items": {
        "$ref": "#/$defs/ChatCompletionMessageToolCall"
      },
      "type": "array",
      "title": "ChatCompletionMessageToolCalls",
      "description": "The tool calls generated by the model, such as function calls."
    },
    "ChatCompletionNamedToolChoice": {
      "properties": {
        "type": {
          "type": "string",
          "const": "function",
          "title": "Type",
          "description": "The type of the tool. Currently, only `function` is supported."
        },
        "function": {
          "$ref": "#/$defs/Function3"
        }
      },
      "type": "object",
      "required": [
        "type",
        "function"
      ],
      "title": "ChatCompletionNamedToolChoice"
    },
    "ChatCompletionRequestAssistantMessage": {
      "properties": {
        "content": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/$defs/Content"
            },
            {
              "type": "null"
            }
          ],
          "title": "Content",
          "description": "The contents of the assistant message. Required unless `tool_calls` or `function_call` is specified.\n"
        },
        "refusal": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Refusal",
          "description": "The refusal message by the assistant."
        },
        "role": {
          "type": "string",
          "const": "assistant",
          "title": "Role",
          "description": "The role of the messages author, in this case `assistant`."
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name",
          "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role."
        },
        "audio": {
          "anyOf": [
            {
              "$ref": "#/$defs/Audio"
            },
            {
              "type": "null"
            }
          ],
          "description": "Data about a previous audio response from the model. \n[Learn more](/docs/guides/audio).\n"
        },
        "tool_calls": {
          "anyOf": [
            {
              "$ref": "#/$defs/ChatCompletionMessageToolCalls-Input"
            },
            {
              "type": "null"
            }
          ]
        },
        "function_call": {
          "anyOf": [
            {
              "$ref": "#/$defs/FunctionCall"
            },
            {
              "type": "null"
            }
          ],
          "description": "Deprecated and replaced by `tool_calls`. The name and arguments of a function that should be called, as generated by the model."
        }
      },
      "type": "object",
      "required": [
        "role"
      ],
      "title": "ChatCompletionRequestAssistantMessage"
    },
    "ChatCompletionRequestAssistantMessageContentPart": {
      "anyOf": [
        {
          "$ref": "#/$defs/ChatCompletionRequestMessageContentPartText"
        },
        {
          "$ref": "#/$defs/ChatCompletionRequestMessageContentPartRefusal"
        }
      ],
      "title": "ChatCompletionRequestAssistantMessageContentPart"
    },
    "ChatCompletionRequestDeveloperMessage": {
      "properties": {
        "content": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "$ref": "#/$defs/Content1"
            }
          ],
          "title": "Content",
          "description": "The contents of the developer message."
        },
        "role": {
          "type": "string",
          "const": "developer",
          "title": "Role",
          "description": "The role of the messages author, in this case `developer`."
        },
        "name": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Name",
          "description": "An optional name for the participant. Provides the model information to differentiate between participants of the same role."
        }
      },
      "type": "object",
      "required": [
        "content",
        "role"
      ],
      "title": "ChatCompletionRequestDeveloperMessage"
    },
    "ChatCompletionRequestFunctionMessage": {
      "properties": {
        "role": {
          "type": "string",
          "const": "function",
          "title": "Role",
          "description": "The role of the messages author, in this case `function`."
        },
        "content": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Content",
          "description": "The contents of the function message."
        },
        "name": {
          "type": "string",
          "title": "Name",
          "description": "The name of the function to call."
        }
      },
      "type": "object",
      "required": [
        "role",
        "name"
      ],
      "title": "ChatCompletionRequestFunctionMessage"
    },
    "ChatCompletionRequestMessage": {
      "anyOf": [
        {
          "$ref": "#/$defs/ChatCompletionRequestDeveloperMessage"
        },
        {
          "$ref": "#/$defs/ChatCompletionRequestSystemMessage"
        },
        {
          "$ref": "#/$defs/ChatCompletionRequestUserMessage"
        },
        {
          "$ref": "#/$defs/ChatCompletionRequestAssistantMessage"
        },
        {
          "$ref": "#/$defs/ChatCompletionRequestToolMessage"
        },
        {
          "$ref": "#/$defs/ChatCompletionRequestFunctionMessage"
        }
      ],
      "title": "ChatCompletionRequestMessage"
    },
    "ChatCompletionRequestMessageContentPartAudio": {
      "properties": {
        "type": {
          "type": "string",
          "const": "input_audio",
          "title": "Type",
          

# --- truncated at 32 KB (59 KB total) ---
# Full source: https://artifacts.apis.io/scale-ai/json-schema/scale-ai-chat-completion-v2-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/scale-ai-chat-completion-v2-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.