{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/apipass/json-schema/apipass-create-task-request-schema.json",
  "title": "CreateTaskRequest",
  "description": "创建任务请求",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/apipass-jobs-api-openapi.yml#/components/schemas/CreateTaskRequest",
  "properties": {
    "model": {
      "type": "string",
      "title": "Model",
      "description": "模型类型"
    },
    "callBackUrl": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "title": "Callbackurl",
      "description": "回调URL"
    },
    "input": {
      "additionalProperties": true,
      "type": "object",
      "title": "Input",
      "description": "输入参数"
    },
    "channel": {
      "type": "string",
      "title": "Channel",
      "description": "主模型渠道选择：starter / enterprise / regular / official / auto，默认 auto",
      "default": "auto"
    },
    "fallback_models": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/FallbackModelEntry"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "title": "Fallback Models",
      "description": "备选模型列表，按优先级排序。格式为 [{model, channel, input}, ...]，input 必填"
    }
  },
  "type": "object",
  "required": [
    "model",
    "input"
  ],
  "$defs": {
    "FallbackModelEntry": {
      "properties": {
        "model": {
          "type": "string",
          "title": "Model",
          "description": "备选模型名称"
        },
        "channel": {
          "type": "string",
          "title": "Channel",
          "description": "该备选模型走哪个渠道：starter / enterprise / regular / official / auto，默认 auto",
          "default": "auto"
        },
        "input": {
          "additionalProperties": true,
          "type": "object",
          "title": "Input",
          "description": "该备选模型自己的输入参数，不会和主模型 input 自动合并"
        }
      },
      "type": "object",
      "required": [
        "model",
        "input"
      ],
      "title": "FallbackModelEntry",
      "description": "fallback_models 的单条目结构（新格式）"
    }
  }
}