{
  "openapi": "3.0.3",
  "info": {
    "title": "WacaoAI 常用 API 接入",
    "version": "1.0.0",
    "description": "按当前网站使用流程整理：获取模型、上传登记、选择创作能力、批次查询。可选字段保留完整定义，无需全部传入。"
  },
  "servers": [
    {
      "url": "https://wacaoai.com/api/v1",
      "description": "生产；私有部署请替换站点域名"
    }
  ],
  "paths": {
    "/models": {
      "get": {
        "summary": "获取模型",
        "description": "无需鉴权。category 可选 IMAGE / VIDEO / EDIT；工具模型根据 supportModes 筛选。价格、支持比例、清晰度、参考图数量和上传限制以实时响应为准。",
        "tags": [
          "基础"
        ],
        "operationId": "api0",
        "responses": {
          "200": {
            "description": "检查业务 code，0 成功，非 0 为错误",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "traceId": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Models"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "403": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "500": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "category",
            "in": "query",
            "required": false,
            "description": "IMAGE / VIDEO / EDIT",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/upload/policy": {
      "post": {
        "summary": "获取上传表单",
        "description": "返回 OSS PostObject 凭证。向 host 发送 multipart/form-data，不携带网站 Authorization；key 为 dir + 随机文件名。文件大小不得超过 maxSizeBytes，expire 为 Unix 秒。",
        "tags": [
          "上传"
        ],
        "operationId": "api3",
        "responses": {
          "200": {
            "description": "检查业务 code，0 成功，非 0 为错误",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "traceId": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/UploadPolicy"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "403": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "500": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ]
      }
    },
    "/upload/callback": {
      "post": {
        "summary": "登记上传",
        "description": "OSS 上传成功后必须登记，否则不能作为任务素材使用。ossKey 必须属于当前账户；url 为临时签名地址。",
        "tags": [
          "上传"
        ],
        "operationId": "api4",
        "responses": {
          "200": {
            "description": "检查业务 code，0 成功，非 0 为错误",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "traceId": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/UploadResult"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "403": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "500": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "ossKey": {
                    "type": "string",
                    "description": "上传时使用的 key"
                  },
                  "fileName": {
                    "type": "string",
                    "description": "原始文件名"
                  },
                  "sizeBytes": {
                    "type": "integer",
                    "description": "文件字节数"
                  },
                  "mime": {
                    "type": "string",
                    "description": "如 image/png 或 video/mp4"
                  },
                  "width": {
                    "type": "integer",
                    "description": "图片宽度"
                  },
                  "height": {
                    "type": "integer",
                    "description": "图片高度"
                  }
                },
                "required": [
                  "ossKey"
                ]
              },
              "example": {
                "ossKey": "<dir>input.png",
                "fileName": "input.png",
                "sizeBytes": 12345,
                "mime": "image/png",
                "width": 1024,
                "height": 1024
              }
            }
          }
        }
      }
    },
    "/gen/image": {
      "post": {
        "summary": "生成图片",
        "description": "提交后立即返回批次和任务，尚未生成完成。n 张图各有独立任务和计费。不要传外部 URL 替代 OSS key。",
        "tags": [
          "生成"
        ],
        "operationId": "api6",
        "responses": {
          "200": {
            "description": "检查业务 code，0 成功，非 0 为错误",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "traceId": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Submission"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "403": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "500": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "modelCode": {
                    "type": "string",
                    "description": "从 /models 取得，图片用 IMAGE，视频用 VIDEO"
                  },
                  "mode": {
                    "type": "string",
                    "description": "T2I（文字生图）/ I2I（参考图生图），不传由模型和素材推断"
                  },
                  "prompt": {
                    "type": "string",
                    "description": "非空，最多 10000 字",
                    "minLength": 1,
                    "maxLength": 10000
                  },
                  "aspectRatio": {
                    "type": "string",
                    "description": "模型 aspectRatios 中的值"
                  },
                  "size": {
                    "type": "string",
                    "description": "模型 sizes 中的值"
                  },
                  "imageSize": {
                    "type": "string",
                    "description": "1K / 2K / 4K，仅模型支持的比例和档位生效"
                  },
                  "refImageKeys": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "本人上传登记的 OSS key；文生模式不要传。首尾帧按首帧、尾帧排列"
                  },
                  "n": {
                    "type": "integer",
                    "description": "默认 1，可传 1–4",
                    "minimum": 1,
                    "maximum": 4
                  }
                },
                "required": [
                  "modelCode",
                  "prompt"
                ]
              },
              "example": {
                "modelCode": "<imageModelCode>",
                "prompt": "白色背景上的商品摄影"
              }
            }
          }
        }
      }
    },
    "/gen/video": {
      "post": {
        "summary": "生成视频",
        "description": "模式、时长和尺寸由模型配置决定；接口没有 duration 字段。一次只出一个视频。首尾帧模式需要两张参考图。",
        "tags": [
          "生成"
        ],
        "operationId": "api7",
        "responses": {
          "200": {
            "description": "检查业务 code，0 成功，非 0 为错误",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "traceId": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Submission"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "403": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "500": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "modelCode": {
                    "type": "string",
                    "description": "从 /models 取得，图片用 IMAGE，视频用 VIDEO"
                  },
                  "mode": {
                    "type": "string",
                    "description": "T2V / I2V_REF / I2V_FL，以模型支持为准；首尾帧场景建议明确传 I2V_FL"
                  },
                  "prompt": {
                    "type": "string",
                    "description": "非空，最多 10000 字",
                    "minLength": 1,
                    "maxLength": 10000
                  },
                  "aspectRatio": {
                    "type": "string",
                    "description": "模型 aspectRatios 中的值"
                  },
                  "size": {
                    "type": "string",
                    "description": "模型 sizes 中的值"
                  },
                  "imageSize": {
                    "type": "string",
                    "description": "1K / 2K / 4K，仅模型支持的比例和档位生效"
                  },
                  "refImageKeys": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "本人上传登记的 OSS key；文生模式不要传。首尾帧按首帧、尾帧排列"
                  },
                  "n": {
                    "type": "integer",
                    "description": "网站固定传 1，API 可省略；视频固定只生成一条",
                    "minimum": 1,
                    "maximum": 4
                  }
                },
                "required": [
                  "modelCode",
                  "prompt"
                ]
              },
              "example": {
                "modelCode": "<videoModelCode>",
                "prompt": "镜头缓缓推进，展示商品细节"
              }
            }
          }
        }
      }
    },
    "/gen/matting": {
      "post": {
        "summary": "智能抠图",
        "description": "产出透明背景图片。一张素材对应一条任务，每张独立收费和退款。接口最多 20 张，后台批量设置可能进一步限制。",
        "tags": [
          "图像工具"
        ],
        "operationId": "api8",
        "responses": {
          "200": {
            "description": "检查业务 code，0 成功，非 0 为错误",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "traceId": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Submission"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "403": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "500": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "modelCode": {
                    "type": "string",
                    "description": "省略使用当前启用的工具默认模型；可从 /models?category=EDIT 按 supportModes 筛选"
                  },
                  "imageKeys": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "1–20 个本人上传的 key",
                    "minItems": 1,
                    "maxItems": 20
                  }
                },
                "required": [
                  "imageKeys"
                ]
              },
              "example": {
                "modelCode": "<mattingModelCode>",
                "imageKeys": [
                  "<ossKey>"
                ]
              }
            }
          }
        }
      }
    },
    "/gen/inpaint": {
      "post": {
        "summary": "涂抹消除",
        "description": "原图和蒙版分别上传并登记。蒙版与原图尺寸相同，黑色保留、白色消除，使用 PNG 避免压缩破坏蒙版。 原图需无透明通道的 RGB 图片，参考网站预处理说明。",
        "tags": [
          "图像工具"
        ],
        "operationId": "api9",
        "responses": {
          "200": {
            "description": "检查业务 code，0 成功，非 0 为错误",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "traceId": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Submission"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "403": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "500": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "modelCode": {
                    "type": "string",
                    "description": "省略使用当前启用的工具默认模型；可从 /models?category=EDIT 按 supportModes 筛选"
                  },
                  "imageKey": {
                    "type": "string",
                    "description": "本人上传登记的原图 key"
                  },
                  "maskKey": {
                    "type": "string",
                    "description": "本人上传登记的蒙版 key"
                  }
                },
                "required": [
                  "imageKey",
                  "maskKey"
                ]
              },
              "example": {
                "modelCode": "<inpaintModelCode>",
                "imageKey": "<imageKey>",
                "maskKey": "<maskKey>"
              }
            }
          }
        }
      }
    },
    "/gen/upscale": {
      "post": {
        "summary": "高清放大",
        "description": "无需提示词，不支持自定义倍率；具体输出由当前工具模型决定。",
        "tags": [
          "图像工具"
        ],
        "operationId": "api10",
        "responses": {
          "200": {
            "description": "检查业务 code，0 成功，非 0 为错误",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "traceId": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Submission"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "403": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "500": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "modelCode": {
                    "type": "string",
                    "description": "省略使用当前启用的工具默认模型；可从 /models?category=EDIT 按 supportModes 筛选"
                  },
                  "imageKey": {
                    "type": "string",
                    "description": "本人上传登记的原图 key"
                  }
                },
                "required": [
                  "imageKey"
                ]
              },
              "example": {
                "modelCode": "<upscaleModelCode>",
                "imageKey": "<ossKey>"
              }
            }
          }
        }
      }
    },
    "/gen/translate/image": {
      "post": {
        "summary": "图片翻译",
        "description": "批量 1–20 张，每张独立任务。每个任务按 ceil(宽/1920) × ceil(高/1920) × 模型单价扣积分，尺寸由服务端读取，750×8246 按 5 张计费；失败退回该任务实际扣费。语言使用站内语种码，如 CHS→ENG，不要使用 zh-CN。图片源语言 CHS/CHT/ENG/JPN/KOR/DEU/ESP/PT/RUS/ROM/VIN；完整目标语言见本页语种表。",
        "tags": [
          "翻译"
        ],
        "operationId": "api11",
        "responses": {
          "200": {
            "description": "检查业务 code，0 成功，非 0 为错误",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "traceId": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Submission"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "403": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "500": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "imageKeys": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    },
                    "description": "本人上传的图片 key，最多 20 张",
                    "minItems": 1,
                    "maxItems": 20
                  },
                  "sourceLanguage": {
                    "type": "string",
                    "description": "源语言码"
                  },
                  "targetLanguage": {
                    "type": "string",
                    "description": "目标语言码"
                  },
                  "productTextProtect": {
                    "type": "boolean",
                    "description": "默认 false，保护商品本身的文字"
                  },
                  "modelCode": {
                    "type": "string",
                    "description": "省略使用当前启用的工具默认模型；可从 /models?category=EDIT 按 supportModes 筛选"
                  }
                },
                "required": [
                  "imageKeys",
                  "sourceLanguage",
                  "targetLanguage"
                ]
              },
              "example": {
                "imageKeys": [
                  "<ossKey>"
                ],
                "sourceLanguage": "CHS",
                "targetLanguage": "ENG",
                "modelCode": "<imageTranslateModelCode>"
              }
            }
          }
        }
      }
    },
    "/gen/translate/video": {
      "post": {
        "summary": "视频翻译",
        "description": "字幕或配音由 modelCode 决定。源语言只支持 CHS/CHT/ENG/JPN。计费为模型每分钟单价 × ceil(服务端探测秒数 / 60)，不信客户端时长。字幕默认烧录，原文默认擦除。",
        "tags": [
          "翻译"
        ],
        "operationId": "api12",
        "responses": {
          "200": {
            "description": "检查业务 code，0 成功，非 0 为错误",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "traceId": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Submission"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "403": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "500": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "videoKey": {
                    "type": "string",
                    "description": "本人上传登记的视频 key"
                  },
                  "sourceLanguage": {
                    "type": "string",
                    "description": "CHS / CHT / ENG / JPN"
                  },
                  "targetLanguage": {
                    "type": "string",
                    "description": "目标语言码"
                  },
                  "modelCode": {
                    "type": "string",
                    "description": "省略使用当前启用的工具默认模型；可从 /models?category=EDIT 按 supportModes 筛选"
                  },
                  "dubbingOptions": {
                    "type": "object",
                    "description": "配音：gender / style / volume / name，具体可用值受引擎限制"
                  },
                  "bgmOptions": {
                    "type": "object",
                    "description": "mode: random/style/silence/original/original_bgm；volume"
                  },
                  "burnSubtitle": {
                    "type": "boolean",
                    "description": "默认 true"
                  },
                  "eraseOriginalText": {
                    "type": "boolean",
                    "description": "默认 true"
                  }
                },
                "required": [
                  "videoKey",
                  "sourceLanguage",
                  "targetLanguage"
                ]
              },
              "example": {
                "videoKey": "<ossKey>",
                "sourceLanguage": "CHS",
                "targetLanguage": "ENG",
                "modelCode": "<videoTranslateModelCode>"
              }
            }
          }
        }
      }
    },
    "/tasks/batch/{batchNo}": {
      "get": {
        "summary": "批次任务",
        "description": "返回当前账户该批次的任务数组；不要只检查第一条，必须逐条判断状态。",
        "tags": [
          "任务"
        ],
        "operationId": "api14",
        "responses": {
          "200": {
            "description": "检查业务 code，0 成功，非 0 为错误",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "integer"
                    },
                    "message": {
                      "type": "string"
                    },
                    "traceId": {
                      "type": "string"
                    },
                    "data": {
                      "$ref": "#/components/schemas/Tasks"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "403": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          },
          "500": {
            "description": "鉴权或系统错误",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Envelope"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "batchNo",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "wc_sk_ API Key；密钥管理必须使用网站登录 Token"
      }
    },
    "schemas": {
      "Asset": {
        "type": "object",
        "properties": {
          "assetType": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "coverUrl": {
            "type": "string"
          },
          "expireAt": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "assetId": {
            "type": "integer"
          },
          "width": {
            "type": "integer"
          },
          "height": {
            "type": "integer"
          },
          "durationMs": {
            "type": "integer"
          },
          "sizeBytes": {
            "type": "integer"
          },
          "hasWatermark": {
            "type": "boolean"
          },
          "isPublic": {
            "type": "boolean"
          }
        }
      },
      "Task": {
        "type": "object",
        "properties": {
          "taskNo": {
            "type": "string"
          },
          "batchNo": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "modelCode": {
            "type": "string"
          },
          "modelName": {
            "type": "string"
          },
          "actualModelCode": {
            "type": "string"
          },
          "mode": {
            "type": "string"
          },
          "prompt": {
            "type": "string"
          },
          "aspectRatio": {
            "type": "string"
          },
          "size": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "errorMessage": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "finishAt": {
            "type": "string"
          },
          "sourceUrl": {
            "type": "string"
          },
          "sourceName": {
            "type": "string"
          },
          "batchSeq": {
            "type": "integer"
          },
          "progress": {
            "type": "integer"
          },
          "priceCredits": {
            "type": "integer"
          },
          "refundCredits": {
            "type": "integer"
          },
          "estSeconds": {
            "type": "integer"
          },
          "costMs": {
            "type": "integer"
          },
          "downgraded": {
            "type": "boolean"
          },
          "assets": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Asset"
            }
          }
        }
      },
      "Submission": {
        "type": "object",
        "properties": {
          "batchNo": {
            "type": "string"
          },
          "count": {
            "type": "integer"
          },
          "totalCredits": {
            "type": "integer"
          },
          "tasks": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          }
        }
      },
      "Tasks": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Task"
        }
      },
      "TaskPage": {
        "type": "object",
        "properties": {
          "list": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Task"
            }
          },
          "total": {
            "type": "integer"
          },
          "pageNum": {
            "type": "integer"
          },
          "pageSize": {
            "type": "integer"
          }
        }
      },
      "Estimate": {
        "type": "object",
        "properties": {
          "modelCode": {
            "type": "string"
          },
          "modelName": {
            "type": "string"
          },
          "effectiveTier": {
            "type": "string"
          },
          "unitPrice": {
            "type": "integer"
          },
          "count": {
            "type": "integer"
          },
          "totalPrice": {
            "type": "integer"
          },
          "balance": {
            "type": "integer"
          },
          "estSeconds": {
            "type": "integer"
          },
          "enough": {
            "type": "boolean"
          }
        }
      },
      "Model": {
        "type": "object",
        "properties": {
          "modelCode": {
            "type": "string"
          },
          "category": {
            "type": "string"
          },
          "series": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "coverUrl": {
            "type": "string"
          },
          "resolutionTier": {
            "type": "string"
          },
          "maxRefImages": {
            "type": "integer"
          },
          "maxEdge": {
            "type": "integer"
          },
          "maxUploadKb": {
            "type": "integer"
          },
          "durationSec": {
            "type": "integer"
          },
          "priceCredits": {
            "type": "integer"
          },
          "estSeconds": {
            "type": "integer"
          },
          "supportModes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "aspectRatios": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sizes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "supportedTiers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tieredRatios": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "tierPrices": {
            "type": "object",
            "additionalProperties": {
              "type": "integer"
            }
          },
          "isHot": {
            "type": "boolean"
          },
          "isNew": {
            "type": "boolean"
          }
        }
      },
      "Models": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Model"
        }
      },
      "Wallet": {
        "type": "object",
        "properties": {
          "balance": {
            "type": "integer"
          },
          "frozenBalance": {
            "type": "integer"
          },
          "totalConsumed": {
            "type": "integer"
          },
          "lots": {
            "type": "array",
            "items": {
              "type": "object"
            }
          },
          "nextExpire": {
            "type": "object"
          }
        }
      },
      "UploadPolicy": {
        "type": "object",
        "properties": {
          "host": {
            "type": "string"
          },
          "dir": {
            "type": "string"
          },
          "accessKeyId": {
            "type": "string"
          },
          "policy": {
            "type": "string"
          },
          "signature": {
            "type": "string"
          },
          "securityToken": {
            "type": "string"
          },
          "expire": {
            "type": "integer"
          },
          "maxSizeBytes": {
            "type": "integer"
          }
        }
      },
      "Sts": {
        "type": "object",
        "properties": {
          "accessKeyId": {
            "type": "string"
          },
          "accessKeySecret": {
            "type": "string"
          },
          "securityToken": {
            "type": "string"
          },
          "expiration": {
            "type": "string"
          },
          "bucket": {
            "type": "string"
          },
          "endpoint": {
            "type": "string"
          },
          "region": {
            "type": "string"
          },
          "allowedPrefix": {
            "type": "string"
          }
        }
      },
      "UploadResult": {
        "type": "object",
        "properties": {
          "uploadId": {
            "type": "integer"
          },
          "ossKey": {
            "type": "string"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "Key": {
        "type": "object",
        "properties": {
          "id": {
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "prefix": {
            "type": "string"
          },
          "expiresAt": {
            "type": "string"
          },
          "revokedAt": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          }
        }
      },
      "Keys": {
        "type": "array",
        "items": {
          "$ref": "#/components/schemas/Key"
        }
      },
      "CreatedKey": {
        "type": "object",
        "properties": {
          "key": {
            "$ref": "#/components/schemas/Key"
          },
          "secret": {
            "type": "string"
          }
        }
      },
      "Platforms": {
        "type": "array",
        "items": {
          "type": "object",
          "additionalProperties": true
        }
      },
      "DetailJobs": {
        "type": "array",
        "items": {
          "type": "object",
          "additionalProperties": true
        }
      },
      "DetailJob": {
        "type": "object",
        "properties": {
          "jobNo": {
            "type": "string"
          },
          "refImages": {
            "type": "string",
            "description": "JSON 编码字符串，需要解析后读取或修改"
          },
          "userPrompt": {
            "type": "string"
          },
          "knownInfo": {
            "type": "string"
          },
          "platformCode": {
            "type": "string"
          },
          "outputLanguage": {
            "type": "string"
          },
          "textMode": {
            "type": "string"
          },
          "outputMode": {
            "type": "string"
          },
          "aspectRatio": {
            "type": "string"
          },
          "imageSize": {
            "type": "string"
          },
          "modelCode": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "brief": {
            "type": "string",
            "description": "JSON 编码字符串，需要解析后读取或修改"
          },
          "shotsPlan": {
            "type": "string",
            "description": "JSON 编码字符串，需要解析后读取或修改"
          },
          "sectionPlan": {
            "type": "string",
            "description": "JSON 编码字符串，需要解析后读取或修改"
          },
          "errorMsg": {
            "type": "string"
          },
          "createdAt": {
            "type": "string"
          },
          "updatedAt": {
            "type": "string"
          },
          "id": {
            "type": "integer"
          },
          "userId": {
            "type": "integer"
          },
          "shotCount": {
            "type": "integer"
          },
          "sectionCount": {
            "type": "integer"
          },
          "variantCount": {
            "type": "integer"
          },
          "selectedDraftId": {
            "type": "integer"
          },
          "sectionsPerImage": {
            "type": "integer"
          },
          "briefVersion": {
            "type": "integer"
          },
          "analyzeCredits": {
            "type": "integer"
          },
          "genCredits": {
            "type": "integer"
          }
        }
      },
      "ChainQuote": {
        "type": "object",
        "properties": {
          "sections": {
            "type": "integer"
          },
          "images": {
            "type": "integer"
          },
          "pendingSections": {
            "type": "integer"
          },
          "unitPrice": {
            "type": "integer"
          },
          "totalPrice": {
            "type": "integer"
          },
          "balance": {
            "type": "integer"
          },
          "enough": {
            "type": "boolean"
          }
        }
      },
      "ChainResult": {
        "type": "object",
        "properties": {
          "submitted": {
            "type": "integer"
          },
          "charged": {
            "type": "integer"
          },
          "stopReason": {
            "type": "string"
          },
          "done": {
            "type": "boolean"
          }
        }
      },
      "Detail": {
        "type": "object",
        "properties": {
          "job": {
            "$ref": "#/components/schemas/DetailJob"
          },
          "shots": {
            "type": "array",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "refImageUrls": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "Envelope": {
        "type": "object",
        "properties": {
          "code": {
            "type": "integer"
          },
          "message": {
            "type": "string"
          },
          "traceId": {
            "type": "string"
          }
        }
      }
    }
  }
}
