{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scale-ai/json-schema/scale-ai-chat-completion-request-schema.json",
  "title": "ChatCompletionRequest",
  "x-generated": "2026-10-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scale-ai-sgp-v5-openapi.yml#/components/schemas/ChatCompletionRequest",
  "properties": {
    "top_k": {
      "title": "Top K",
      "description": "Only sample from the top K options for each subsequent token",
      "type": "integer"
    },
    "frequency_penalty": {
      "title": "Frequency Penalty",
      "description": "Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far.",
      "type": "number",
      "maximum": 2,
      "minimum": -2
    },
    "function_call": {
      "title": "Function Call",
      "description": "Deprecated in favor of tool_choice. Controls which function is called by the model.",
      "additionalProperties": true,
      "type": "object"
    },
    "functions": {
      "title": "Functions",
      "description": "Deprecated in favor of tools. A list of functions the model may generate JSON inputs for.",
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array"
    },
    "logit_bias": {
      "title": "Logit Bias",
      "description": "Modify the likelihood of specified tokens appearing in the completion. Maps tokens to bias values from -100 to 100.",
      "additionalProperties": {
        "type": "integer"
      },
      "type": "object"
    },
    "logprobs": {
      "title": "Logprobs",
      "description": "Whether to return log probabilities of the output tokens or not.",
      "type": "boolean"
    },
    "max_completion_tokens": {
      "title": "Max Completion Tokens",
      "description": "An upper bound for the number of tokens that can be generated, including visible output tokens and reasoning tokens.",
      "type": "integer"
    },
    "max_tokens": {
      "title": "Max Tokens",
      "description": "Deprecated in favor of max_completion_tokens. The maximum number of tokens to generate.",
      "type": "integer"
    },
    "metadata": {
      "title": "Metadata",
      "description": "Developer-defined tags and values used for filtering completions in the dashboard.",
      "additionalProperties": {
        "type": "string"
      },
      "type": "object"
    },
    "modalities": {
      "title": "Modalities",
      "description": "Output types that you would like the model to generate for this request.",
      "items": {
        "type": "string"
      },
      "type": "array"
    },
    "n": {
      "title": "N",
      "description": "How many chat completion choices to generate for each input message.",
      "type": "integer"
    },
    "parallel_tool_calls": {
      "title": "Parallel Tool Calls",
      "description": "Whether to enable parallel function calling during tool use.",
      "type": "boolean"
    },
    "prediction": {
      "title": "Prediction",
      "description": "Static predicted output content, such as the content of a text file being regenerated.",
      "additionalProperties": true,
      "type": "object"
    },
    "presence_penalty": {
      "title": "Presence Penalty",
      "description": "Number between -2.0 and 2.0. Positive values penalize tokens based on whether they appear in the text so far.",
      "type": "number",
      "maximum": 2,
      "minimum": -2
    },
    "reasoning_effort": {
      "title": "Reasoning Effort",
      "description": "For o1 models only. Constrains effort on reasoning. Values: low, medium, high.",
      "type": "string"
    },
    "response_format": {
      "title": "Response Format",
      "description": "An object specifying the format that the model must output.",
      "additionalProperties": true,
      "type": "object"
    },
    "seed": {
      "title": "Seed",
      "description": "If specified, system will attempt to sample deterministically for repeated requests with same seed.",
      "type": "integer"
    },
    "stop": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "items": {
            "type": "string"
          },
          "type": "array"
        }
      ],
      "title": "Stop",
      "description": "Up to 4 sequences where the API will stop generating further tokens."
    },
    "store": {
      "title": "Store",
      "description": "Whether to store the output for use in model distillation or evals products.",
      "type": "boolean"
    },
    "stream": {
      "title": "Stream",
      "description": "If true, partial message deltas will be sent as server-sent events.",
      "type": "boolean"
    },
    "stream_options": {
      "title": "Stream Options",
      "description": "Options for streaming response. Only set this when stream is true.",
      "additionalProperties": true,
      "type": "object"
    },
    "temperature": {
      "title": "Temperature",
      "description": "What sampling temperature to use. Higher values make output more random, lower more focused.",
      "type": "number",
      "maximum": 2,
      "minimum": 0
    },
    "tool_choice": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "additionalProperties": true,
          "type": "object"
        }
      ],
      "title": "Tool Choice",
      "description": "Controls which tool is called by the model. Values: none, auto, required, or specific tool."
    },
    "tools": {
      "title": "Tools",
      "description": "A list of tools the model may call. Currently, only functions are supported. Max 128 functions.",
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array"
    },
    "top_logprobs": {
      "title": "Top Logprobs",
      "description": "Number of most likely tokens to return at each position, with associated log probability.",
      "type": "integer",
      "maximum": 20,
      "minimum": 0
    },
    "top_p": {
      "title": "Top P",
      "description": "Alternative to temperature. Only tokens comprising top_p probability mass are considered.",
      "type": "number",
      "maximum": 1,
      "minimum": 0
    },
    "audio": {
      "title": "Audio",
      "description": "Parameters for audio output. Required when audio output is requested with modalities: ['audio'].",
      "additionalProperties": true,
      "type": "object"
    },
    "model": {
      "type": "string",
      "title": "Model",
      "description": "model specified as `model_vendor/model`, for example `openai/gpt-4o`"
    },
    "messages": {
      "items": {
        "additionalProperties": true,
        "type": "object"
      },
      "type": "array",
      "title": "Messages",
      "description": "openai standard message format"
    }
  },
  "additionalProperties": true,
  "type": "object",
  "required": [
    "model",
    "messages"
  ]
}