{
  "openapi": "3.1.0",
  "info": {
    "title": "chaozapi Public API",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://www.chaozapi.com/api"
    }
  ],
  "paths": {
    "/v1/assets": {
      "get": {
        "operationId": "listApiAssets",
        "parameters": [
          {
            "description": "不传 = all：公共素材在前，然后是我的素材",
            "explode": false,
            "in": "query",
            "name": "scope",
            "schema": {
              "$ref": "#/components/schemas/AssetScope",
              "description": "不传 = all：公共素材在前，然后是我的素材"
            }
          },
          {
            "description": "不传 = 全部类型",
            "explode": false,
            "in": "query",
            "name": "kind",
            "schema": {
              "$ref": "#/components/schemas/MediaKind",
              "description": "不传 = 全部类型"
            }
          },
          {
            "description": "按名称模糊搜索",
            "explode": false,
            "in": "query",
            "name": "search",
            "schema": {
              "description": "按名称模糊搜索",
              "maxLength": 100,
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 24,
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "上一页返回的 nextCursor",
            "explode": false,
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "上一页返回的 nextCursor",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetPage"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "列出可用素材",
        "tags": [
          "public-assets"
        ]
      }
    },
    "/v1/assets/upload-limits": {
      "get": {
        "operationId": "getApiUploadLimits",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadLimits"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "查询上传限制",
        "tags": [
          "public-assets"
        ]
      }
    },
    "/v1/assets/uploads": {
      "post": {
        "description": "默认直传对象存储，未配置云存储返回503。routingMode=auto 时根据节点容量选择直传目的地。建议携带Idempotency-Key，重放恢复原素材。按返回的method、headers、formFields、fileField上传到uploadUrl，然后complete并等待ready；不要把API Key发到上传地址。",
        "operationId": "createApiUpload",
        "parameters": [
          {
            "description": "建议提供；账户内同键同参数恢复同一素材，冲突409，已删除410；与任务幂等键分开计数",
            "in": "header",
            "name": "Idempotency-Key",
            "schema": {
              "description": "建议提供；账户内同键同参数恢复同一素材，冲突409，已删除410；与任务幂等键分开计数",
              "maxLength": 128,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUploadInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadTicket"
                }
              }
            },
            "description": "Created"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "申请素材直传凭证",
        "tags": [
          "public-assets"
        ]
      }
    },
    "/v1/assets/{assetId}": {
      "delete": {
        "operationId": "deleteApiAsset",
        "parameters": [
          {
            "description": "素材 ID",
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "description": "素材 ID",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "删除素材并取消相关任务",
        "tags": [
          "public-assets"
        ]
      },
      "get": {
        "operationId": "getApiAsset",
        "parameters": [
          {
            "description": "素材 ID",
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "description": "素材 ID",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetDetail"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "查询素材与版本",
        "tags": [
          "public-assets"
        ]
      },
      "patch": {
        "operationId": "updateApiAsset",
        "parameters": [
          {
            "description": "素材 ID",
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "description": "素材 ID",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateAssetInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Asset"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "修改素材名称",
        "tags": [
          "public-assets"
        ]
      }
    },
    "/v1/assets/{assetId}/complete": {
      "post": {
        "description": "幂等；校验真实文件格式、大小、尺寸和时长后入库。",
        "operationId": "completeApiUpload",
        "parameters": [
          {
            "description": "素材 ID",
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "description": "素材 ID",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CompleteUploadInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Asset"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Retry-After": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "确认素材上传完成",
        "tags": [
          "public-assets"
        ]
      }
    },
    "/v1/assets/{assetId}/upload-fallback": {
      "post": {
        "operationId": "fallbackApiUpload",
        "parameters": [
          {
            "description": "素材 ID",
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "description": "素材 ID",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FallbackUploadInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadTicket"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "切换备用对象存储上传线路",
        "tags": [
          "public-assets"
        ]
      }
    },
    "/v1/assets/{assetId}/upload-parts": {
      "post": {
        "operationId": "createApiUploadPart",
        "parameters": [
          {
            "description": "素材 ID",
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "description": "素材 ID",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UploadPartInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadTicket"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "申请分片直传凭证",
        "tags": [
          "public-assets"
        ]
      }
    },
    "/v1/assets/{assetId}/upload-session": {
      "post": {
        "operationId": "resumeApiUpload",
        "parameters": [
          {
            "description": "素材 ID",
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "description": "素材 ID",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetUploadSession"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "恢复上传并查询已保存分片",
        "tags": [
          "public-assets"
        ]
      }
    },
    "/v1/assets/{assetId}/upload-status": {
      "get": {
        "operationId": "getApiUploadStatus",
        "parameters": [
          {
            "description": "素材 ID",
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "description": "素材 ID",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiUploadStatus"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "查询素材上传与准备状态（含失败原因）",
        "tags": [
          "public-assets"
        ]
      }
    },
    "/v1/assets/{assetId}/upload-ticket": {
      "post": {
        "operationId": "refreshApiUpload",
        "parameters": [
          {
            "description": "素材 ID",
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "description": "素材 ID",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefreshApiUploadInput"
              }
            }
          }
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UploadTicket"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "刷新原上传会话的临时凭据",
        "tags": [
          "public-assets"
        ]
      }
    },
    "/v1/assets/{assetId}/versions/{versionId}": {
      "delete": {
        "operationId": "deleteApiAssetVersion",
        "parameters": [
          {
            "description": "素材 ID",
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "description": "素材 ID",
              "type": "string"
            }
          },
          {
            "description": "版本 ID",
            "in": "path",
            "name": "versionId",
            "required": true,
            "schema": {
              "description": "版本 ID",
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "删除处理版本",
        "tags": [
          "public-assets"
        ]
      }
    },
    "/v1/assets/{assetId}/versions/{versionId}/download-url": {
      "post": {
        "operationId": "createApiAssetDownloadUrl",
        "parameters": [
          {
            "description": "素材 ID",
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "description": "素材 ID",
              "type": "string"
            }
          },
          {
            "description": "版本 ID",
            "in": "path",
            "name": "versionId",
            "required": true,
            "schema": {
              "description": "版本 ID",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AssetDownloadTicket"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Cache-Control": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "按需获取版本短时下载链接",
        "tags": [
          "public-assets"
        ]
      }
    },
    "/v1/assets/{assetId}/versions/{versionId}/watermark-marks": {
      "put": {
        "operationId": "saveApiWatermarkMarks",
        "parameters": [
          {
            "description": "素材 ID",
            "in": "path",
            "name": "assetId",
            "required": true,
            "schema": {
              "description": "素材 ID",
              "type": "string"
            }
          },
          {
            "description": "版本 ID",
            "in": "path",
            "name": "versionId",
            "required": true,
            "schema": {
              "description": "版本 ID",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SaveWatermarkMarksInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "保存水印标记",
        "tags": [
          "public-assets"
        ]
      }
    },
    "/v1/benefits": {
      "get": {
        "operationId": "getApiSubscriptionBenefits",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SubscriptionBenefits"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "查询 API 账户套餐权益",
        "tags": [
          "public-billing"
        ]
      }
    },
    "/v1/generation-models": {
      "get": {
        "operationId": "getApiGenerationConfig",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationConfig"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "查询生成模型与计费方式",
        "tags": [
          "public-generations"
        ]
      }
    },
    "/v1/generations": {
      "get": {
        "operationId": "listApiGenerations",
        "parameters": [
          {
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "before",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/ApiGeneration"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "查询生成记录列表",
        "tags": [
          "public-generations"
        ]
      },
      "post": {
        "description": "需要 write 权限与 Idempotency-Key。视频可购买 480P 原片（按资金来源报价）或 1080P/2K 成片（含套餐周期积分），交付成功后结算；图片保留 1K 及超分选择。返回 202、Location 与 Retry-After。",
        "operationId": "createApiGeneration",
        "parameters": [
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerationCreateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiGeneration"
                }
              }
            },
            "description": "Accepted",
            "headers": {
              "Location": {
                "schema": {
                  "description": "状态轮询路径",
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "description": "建议下次轮询前的等待秒数",
                  "format": "int64",
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "提交图片或视频生成",
        "tags": [
          "public-generations"
        ]
      }
    },
    "/v1/generations/estimate": {
      "post": {
        "description": "read 权限即可；只读预估，不调用上游或冻结积分。返回生成服务及交付服务的销售积分预估，以及当前商品的可用和不可用余额。",
        "operationId": "estimateApiGeneration",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerationEstimateInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationEstimate"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "预估生成及超分费用",
        "tags": [
          "public-generations"
        ]
      }
    },
    "/v1/generations/{generationId}": {
      "get": {
        "operationId": "getApiGeneration",
        "parameters": [
          {
            "in": "path",
            "name": "generationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiGeneration"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Location": {
                "schema": {
                  "description": "状态轮询路径",
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "description": "建议下次轮询前的等待秒数",
                  "format": "int64",
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "查询生成状态、上游用量与账单明细",
        "tags": [
          "public-generations"
        ]
      }
    },
    "/v1/generations/{generationId}/download-url": {
      "post": {
        "description": "read 权限即可；图片、480P 视频原片及具有原片权益的历史订单可用。1080P/2K 成片通过自动导出任务下载。",
        "operationId": "createApiGenerationOriginalDownloadUrl",
        "parameters": [
          {
            "in": "path",
            "name": "generationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationDownload"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "获取已付费原片下载地址",
        "tags": [
          "public-generations"
        ]
      }
    },
    "/v1/generations/{generationId}/exports": {
      "get": {
        "operationId": "listApiGenerationExports",
        "parameters": [
          {
            "in": "path",
            "name": "generationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 20,
              "format": "int64",
              "maximum": 100,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "before",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/GenerationExport"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "查询生成作品的超分记录",
        "tags": [
          "public-generations"
        ]
      },
      "post": {
        "description": "需要 write 权限与 Idempotency-Key。",
        "operationId": "createApiGenerationExport",
        "parameters": [
          {
            "in": "path",
            "name": "generationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "maxLength": 80,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerationExportInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationExport"
                }
              }
            },
            "description": "Accepted"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "按需创建生成作品超分任务",
        "tags": [
          "public-generations"
        ]
      }
    },
    "/v1/generations/{generationId}/exports/quote": {
      "post": {
        "description": "read 权限即可。",
        "operationId": "quoteApiGenerationExport",
        "parameters": [
          {
            "in": "path",
            "name": "generationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerationExportQuoteRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskQuote"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "获取生成作品超分报价",
        "tags": [
          "public-generations"
        ]
      }
    },
    "/v1/generations/{generationId}/exports/{taskId}": {
      "get": {
        "operationId": "getApiGenerationExport",
        "parameters": [
          {
            "in": "path",
            "name": "generationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "taskId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationExport"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "查询生成作品超分任务",
        "tags": [
          "public-generations"
        ]
      }
    },
    "/v1/generations/{generationId}/exports/{taskId}/download-url": {
      "post": {
        "description": "read 权限即可；只有超分成功且规格相符时签发。",
        "operationId": "createApiGenerationDownloadUrl",
        "parameters": [
          {
            "in": "path",
            "name": "generationId",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "in": "path",
            "name": "taskId",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GenerationDownload"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "获取超分成品下载地址",
        "tags": [
          "public-generations"
        ]
      }
    },
    "/v1/tasks": {
      "get": {
        "operationId": "listApiTasks",
        "parameters": [
          {
            "description": "只看某个素材的任务",
            "explode": false,
            "in": "query",
            "name": "assetId",
            "schema": {
              "description": "只看某个素材的任务",
              "type": "string"
            }
          },
          {
            "description": "只看某个工具的任务（如 detect 取检测报告）",
            "explode": false,
            "in": "query",
            "name": "toolId",
            "schema": {
              "description": "只看某个工具的任务（如 detect 取检测报告）",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "status",
            "schema": {
              "$ref": "#/components/schemas/TaskStatus"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "format": "int64",
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Task"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "查询账户任务记录",
        "tags": [
          "public-tasks"
        ]
      },
      "post": {
        "description": "需要 write 权限与 Idempotency-Key。冻结预估积分并返回 202、Location 和 Retry-After。账户内同键同参数返回原任务，不重复计费；不同参数返回 409。402 余额不足，429 配额已满，503 暂无算力。任务清理后旧幂等键仍保留，重试返回 410。",
        "operationId": "createApiTask",
        "parameters": [
          {
            "description": "一次逻辑提交一个唯一键；网络重试使用原键与原请求体；不同参数复用返回 409",
            "in": "header",
            "name": "Idempotency-Key",
            "required": true,
            "schema": {
              "description": "一次逻辑提交一个唯一键；网络重试使用原键与原请求体；不同参数复用返回 409",
              "maxLength": 128,
              "minLength": 1,
              "pattern": "^[A-Za-z0-9._:-]+$",
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "202": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTask"
                }
              }
            },
            "description": "Accepted",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "description": "建议轮询间隔（秒）",
                  "format": "int64",
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "异步提交处理任务",
        "tags": [
          "public-tasks"
        ]
      }
    },
    "/v1/tasks/page": {
      "get": {
        "description": "按创建时间倒序，返回 items 与 nextCursor；包括账户全部顶层任务，旧 GET /tasks 的数组响应保持不变。",
        "operationId": "pageApiTasks",
        "parameters": [
          {
            "description": "只看某个素材的任务",
            "explode": false,
            "in": "query",
            "name": "assetId",
            "schema": {
              "description": "只看某个素材的任务",
              "type": "string"
            }
          },
          {
            "description": "只看某个工具的任务（如 detect 取检测报告）",
            "explode": false,
            "in": "query",
            "name": "toolId",
            "schema": {
              "description": "只看某个工具的任务（如 detect 取检测报告）",
              "type": "string"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "status",
            "schema": {
              "$ref": "#/components/schemas/TaskStatus"
            }
          },
          {
            "explode": false,
            "in": "query",
            "name": "limit",
            "schema": {
              "default": 50,
              "format": "int64",
              "maximum": 200,
              "minimum": 1,
              "type": "integer"
            }
          },
          {
            "description": "上页 nextCursor；保持筛选条件不变",
            "explode": false,
            "in": "query",
            "name": "cursor",
            "schema": {
              "description": "上页 nextCursor；保持筛选条件不变",
              "maxLength": 512,
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTaskPage"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "分页查询账户任务记录",
        "tags": [
          "public-tasks"
        ]
      }
    },
    "/v1/tasks/quote": {
      "post": {
        "description": "read 权限即可；不创建任务、不扣费。problem 非 null 表示当前无法提交。价格、余额与配额以实际提交时为准。",
        "operationId": "quoteApiTask",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTaskInput"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskQuote"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "查询任务报价",
        "tags": [
          "public-tasks"
        ]
      }
    },
    "/v1/tasks/{taskId}": {
      "get": {
        "operationId": "getApiTask",
        "parameters": [
          {
            "description": "任务 ID",
            "in": "path",
            "name": "taskId",
            "required": true,
            "schema": {
              "description": "任务 ID",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTask"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "description": "建议轮询间隔（秒）",
                  "format": "int64",
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "查询任务状态与进度",
        "tags": [
          "public-tasks"
        ]
      }
    },
    "/v1/tasks/{taskId}/cancel": {
      "post": {
        "description": "幂等。排队中立即取消并释放冻结；运行中在 worker 确认后释放冻结，停止前已完成的照常收费。请继续查询实际状态。",
        "operationId": "cancelApiTask",
        "parameters": [
          {
            "description": "任务 ID",
            "in": "path",
            "name": "taskId",
            "required": true,
            "schema": {
              "description": "任务 ID",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTask"
                }
              }
            },
            "description": "OK",
            "headers": {
              "Location": {
                "schema": {
                  "type": "string"
                }
              },
              "Retry-After": {
                "schema": {
                  "description": "建议轮询间隔（秒）",
                  "format": "int64",
                  "type": "integer"
                }
              }
            }
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "取消异步任务",
        "tags": [
          "public-tasks"
        ]
      }
    },
    "/v1/tasks/{taskId}/result": {
      "get": {
        "description": "任务未成功返回 409；产物已删除返回 410。报告任务返回 report 或 watermarkFind，遮罩预览任务返回 maskPreviewUrl。重复查询刷新文件签名地址，不收费。",
        "operationId": "getApiTaskResult",
        "parameters": [
          {
            "description": "任务 ID",
            "in": "path",
            "name": "taskId",
            "required": true,
            "schema": {
              "description": "任务 ID",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApiTaskResult"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "获取处理结果与临时下载地址",
        "tags": [
          "public-tasks"
        ]
      }
    },
    "/v1/tasks/{taskId}/watermark-analysis": {
      "get": {
        "operationId": "getApiWatermarkAnalysis",
        "parameters": [
          {
            "description": "任务 ID",
            "in": "path",
            "name": "taskId",
            "required": true,
            "schema": {
              "description": "任务 ID",
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WatermarkAnalysis"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "获取水印识别分析报告",
        "tags": [
          "public-tasks"
        ]
      }
    },
    "/v1/tools": {
      "get": {
        "description": "包含全部图像、视频工具及 watermark-find、watermark-mask 辅助步骤。价格为空表示暂未开放。",
        "operationId": "listApiTools",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "items": {
                    "$ref": "#/components/schemas/Tool"
                  },
                  "type": "array"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "开放 API 工具目录与参数",
        "tags": [
          "public-tools"
        ]
      }
    },
    "/v1/wallet": {
      "get": {
        "operationId": "getApiWallet",
        "responses": {
          "200": {
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WalletSummary"
                }
              }
            },
            "description": "OK"
          },
          "default": {
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            },
            "description": "Error"
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ],
        "summary": "查询 API 账户积分余额",
        "tags": [
          "public-billing"
        ]
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ApiKeyAuth": {
        "bearerFormat": "gk_<secret>",
        "description": "在账户设置创建 API Key，仅用于 /api/v1/*。",
        "scheme": "bearer",
        "type": "http"
      }
    },
    "schemas": {
      "AssetScope": {
        "enum": [
          "all",
          "mine",
          "public"
        ],
        "type": "string"
      },
      "MediaKind": {
        "enum": [
          "image",
          "video"
        ],
        "type": "string"
      },
      "AssetPage": {
        "additionalProperties": true,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/Asset"
            },
            "type": "array"
          },
          "nextCursor": {
            "type": [
              "string",
              "null"
            ]
          },
          "total": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "items",
          "nextCursor",
          "total"
        ],
        "type": "object"
      },
      "Asset": {
        "additionalProperties": true,
        "properties": {
          "coverUrl": {
            "description": "视频封面（上传时截取的原件首帧 JPEG，长边不超过 1920）；图片或截取失败时为 null",
            "type": [
              "string",
              "null"
            ]
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "durationMs": {
            "description": "视频与动图有值（动图为各帧时长之和）",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "expiresAt": {
            "description": "素材保留期限；null 表示沿用原保留规则",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "height": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "isPublic": {
            "description": "公共素材（示范素材）：所有用户可见、不可删除；对它发起处理时自动复制到个人素材库，任务的 assetId 为副本",
            "type": "boolean"
          },
          "kind": {
            "$ref": "#/components/schemas/MediaKind"
          },
          "mimeType": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "prepareError": {
            "description": "入库失败原因",
            "type": "string"
          },
          "sizeBytes": {
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/AssetStatus",
            "description": "素材状态：ready 可直接使用；preparing 表示入库探测中"
          },
          "thumbnailUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "url": {
            "description": "原件地址（已签名；列表接口对视频仅签发缩略图/封面时可为空串）",
            "type": "string"
          },
          "versionCount": {
            "description": "现存版本数（含原件；删除的版本不计）",
            "format": "int64",
            "type": "integer"
          },
          "width": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "expiresAt",
          "id",
          "name",
          "kind",
          "status",
          "mimeType",
          "sizeBytes",
          "width",
          "height",
          "durationMs",
          "url",
          "thumbnailUrl",
          "coverUrl",
          "versionCount",
          "isPublic",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "AssetStatus": {
        "enum": [
          "pending",
          "preparing",
          "ready",
          "failed"
        ],
        "type": "string"
      },
      "Problem": {
        "additionalProperties": true,
        "properties": {
          "code": {
            "description": "稳定的机器可读错误码；不要通过 detail 文案判断重试方式",
            "type": "string"
          },
          "detail": {
            "description": "可直接展示给用户的中文文案",
            "type": "string"
          },
          "errors": {
            "description": "参数校验失败的明细（仅 400 / 422）",
            "items": {
              "$ref": "#/components/schemas/ErrorDetail"
            },
            "type": "array"
          },
          "requestId": {
            "description": "本次 HTTP 请求的追踪 ID，与 X-Request-ID 响应头一致",
            "type": "string"
          },
          "status": {
            "description": "HTTP 状态码，与响应状态一致",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "status",
          "detail"
        ],
        "type": "object"
      },
      "ErrorDetail": {
        "additionalProperties": true,
        "properties": {
          "location": {
            "description": "Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'",
            "type": "string"
          },
          "message": {
            "description": "Error message text",
            "type": "string"
          },
          "value": {
            "description": "The value at the given location"
          }
        },
        "type": "object"
      },
      "UploadLimits": {
        "additionalProperties": true,
        "properties": {
          "image": {
            "$ref": "#/components/schemas/MediaLimits"
          },
          "video": {
            "$ref": "#/components/schemas/MediaLimits"
          }
        },
        "required": [
          "image",
          "video"
        ],
        "type": "object"
      },
      "MediaLimits": {
        "additionalProperties": true,
        "properties": {
          "maxAspect": {
            "description": "长边 / 短边上限",
            "format": "int64",
            "type": "integer"
          },
          "maxBytes": {
            "description": "文件大小上限（字节）",
            "format": "int64",
            "type": "integer"
          },
          "maxDurationMs": {
            "description": "视频时长上限（毫秒）",
            "format": "int64",
            "type": "integer"
          },
          "maxFrameRate": {
            "description": "视频帧率上限（帧/秒）",
            "format": "int64",
            "type": "integer"
          },
          "maxFrames": {
            "description": "视频帧数上限",
            "format": "int64",
            "type": "integer"
          },
          "maxPixels": {
            "description": "总像素（宽 × 高）上限",
            "format": "int64",
            "type": "integer"
          },
          "maxSide": {
            "description": "长边上限（像素）",
            "format": "int64",
            "type": "integer"
          },
          "minSide": {
            "description": "短边下限（像素）",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "maxBytes",
          "minSide",
          "maxSide",
          "maxPixels",
          "maxAspect",
          "maxDurationMs",
          "maxFrameRate",
          "maxFrames"
        ],
        "type": "object"
      },
      "CreateUploadInput": {
        "additionalProperties": false,
        "properties": {
          "estDurationMs": {
            "description": "前端预探测时长毫秒（可选）",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "estHeight": {
            "description": "前端预探测高度（可选）",
            "format": "int64",
            "maximum": 65536,
            "minimum": 1,
            "type": "integer"
          },
          "estWidth": {
            "description": "前端预探测宽度（可选）",
            "format": "int64",
            "maximum": 65536,
            "minimum": 1,
            "type": "integer"
          },
          "mimeType": {
            "type": "string"
          },
          "multipart": {
            "description": "用表单（multipart/form-data）POST 上传：给只能发表单的客户端（微信小程序 wx.uploadFile）；默认 PUT 原始字节",
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "resumable": {
            "description": "启用分片与断点续传；调用 resumeUpload 查询进度、createUploadPart 签发分片凭证，最后 completeUpload 合并入库",
            "type": "boolean"
          },
          "routingMode": {
            "description": "auto 按节点容量自动选路；cloud 强制对象存储。开放 API 省略时按 cloud 处理",
            "enum": [
              "auto",
              "cloud"
            ],
            "type": "string"
          },
          "serviceHint": {
            "description": "可选：后续计划使用的工具 ID（用于节点亲和选路）",
            "maxLength": 64,
            "type": "string"
          },
          "sizeBytes": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "name",
          "mimeType",
          "sizeBytes"
        ],
        "type": "object"
      },
      "UploadTicket": {
        "additionalProperties": true,
        "properties": {
          "assetId": {
            "type": "string"
          },
          "chunkSize": {
            "description": "分片大小（字节）；0 表示整文件直传",
            "format": "int64",
            "type": "integer"
          },
          "cos": {
            "$ref": "#/components/schemas/COSDirectUpload",
            "description": "腾讯云 COS STS 临时密钥（仅 Web SPA 直传 COS 时返回）"
          },
          "estimatedQueueSeconds": {
            "description": "目标节点预估排队秒数",
            "format": "int64",
            "type": "integer"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "fileField": {
            "description": "method 为 POST（表单上传）时文件所在的字段名；PUT 为 null",
            "type": [
              "string",
              "null"
            ]
          },
          "formFields": {
            "description": "表单 POST 直传对象存储时附带的签名字段",
            "items": {
              "items": {
                "type": "string"
              },
              "maxItems": 2,
              "minItems": 2,
              "type": "array"
            },
            "type": "array"
          },
          "headers": {
            "items": {
              "items": {
                "type": "string"
              },
              "maxItems": 2,
              "minItems": 2,
              "type": "array"
            },
            "type": "array"
          },
          "method": {
            "$ref": "#/components/schemas/UploadMethod"
          },
          "nodeId": {
            "description": "直传节点 ID",
            "type": "string"
          },
          "route": {
            "description": "上传路径：node_direct 或 object_store",
            "type": "string"
          },
          "routeGeneration": {
            "description": "上传会话代次",
            "format": "int64",
            "type": "integer"
          },
          "status": {
            "$ref": "#/components/schemas/AssetStatus",
            "description": "pending可上传；幂等恢复返回preparing/ready时uploadUrl为空，不应重传"
          },
          "uploadUrl": {
            "type": "string"
          }
        },
        "required": [
          "assetId",
          "uploadUrl",
          "method",
          "headers",
          "fileField",
          "expiresAt",
          "chunkSize"
        ],
        "type": "object"
      },
      "COSDirectUpload": {
        "additionalProperties": true,
        "properties": {
          "bucket": {
            "description": "COS 存储桶名称（含 APPID，如 bucket-1250000000）",
            "type": "string"
          },
          "expiredTime": {
            "description": "临时密钥过期时间戳（秒）",
            "format": "int64",
            "type": "integer"
          },
          "key": {
            "description": "包含存储前缀的完整对象路径",
            "type": "string"
          },
          "region": {
            "description": "COS 地域（如 ap-guangzhou）",
            "type": "string"
          },
          "sessionToken": {
            "description": "STS 临时安全令牌 XCosSecurityToken",
            "type": "string"
          },
          "startTime": {
            "description": "临时密钥生效时间戳（秒）",
            "format": "int64",
            "type": "integer"
          },
          "tmpSecretId": {
            "description": "STS 临时 SecretId",
            "type": "string"
          },
          "tmpSecretKey": {
            "description": "STS 临时 SecretKey",
            "type": "string"
          }
        },
        "required": [
          "bucket",
          "region",
          "key",
          "tmpSecretId",
          "tmpSecretKey",
          "sessionToken",
          "startTime",
          "expiredTime"
        ],
        "type": "object"
      },
      "UploadMethod": {
        "enum": [
          "PUT",
          "POST"
        ],
        "type": "string"
      },
      "AssetDetail": {
        "additionalProperties": true,
        "properties": {
          "asset": {
            "$ref": "#/components/schemas/Asset"
          },
          "versions": {
            "items": {
              "$ref": "#/components/schemas/AssetVersion"
            },
            "type": "array"
          }
        },
        "required": [
          "asset",
          "versions"
        ],
        "type": "object"
      },
      "AssetVersion": {
        "additionalProperties": true,
        "properties": {
          "assetId": {
            "type": "string"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "downloadUrl": {
            "description": "下载地址（响应带 Content-Disposition: attachment，文件名形如 原名_V2_超分.mp4）",
            "type": "string"
          },
          "durationMs": {
            "description": "视频与动图有值（动图为各帧时长之和）",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "frameCount": {
            "description": "帧数，视频与动图有值（图片的 frameCount > 1 即动图，按帧计费）；旧版本为 null",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "frameRate": {
            "description": "平均帧率（帧/秒），视频与动图有值（动图各帧时长不同，只用于展示）；旧版本为 null",
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "height": {
            "format": "int64",
            "type": "integer"
          },
          "id": {
            "type": "string"
          },
          "index": {
            "description": "版本号，0 = 原件；只增不减，删除过的版本号不复用（版本列表可能不连续）",
            "format": "int64",
            "type": "integer"
          },
          "label": {
            "type": "string"
          },
          "maskUrl": {
            "description": "去水印的识别遮罩视频（H.264，与输入版本 sourceVersionId 按时间对齐，亮 = 被修复的像素，分辨率可能低于原视频），前端对比时叠加在原视频上；其他版本为 null",
            "type": [
              "string",
              "null"
            ]
          },
          "mimeType": {
            "type": "string"
          },
          "previewPending": {
            "description": "预览正在后台转码，完成后 previewUrl 才有值；期间可轮询 getAsset",
            "type": "boolean"
          },
          "previewUrl": {
            "description": "浏览器可播放的 H.264 预览；为 null 时直接播放 url（原视频浏览器可播放、图片、转码失败）",
            "type": [
              "string",
              "null"
            ]
          },
          "sizeBytes": {
            "format": "int64",
            "type": "integer"
          },
          "sourceVersionId": {
            "description": "由哪个版本处理而来（前端默认与它对比）；原件为 null；该版本可能已被删除",
            "type": [
              "string",
              "null"
            ]
          },
          "thumbnailUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "toolId": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "description": "原始文件地址（已签名）",
            "type": "string"
          },
          "watermarkMarks": {
            "description": "用户在这个版本上的去水印标记（随版本保存，下次打开继续编辑）；没有为空数组",
            "items": {
              "$ref": "#/components/schemas/MaskRegionResponse"
            },
            "type": "array"
          },
          "watermarkObjects": {
            "description": "用户给这个版本上各个水印起的名字；没有为空数组（前端显示「水印 n」）",
            "items": {
              "$ref": "#/components/schemas/WatermarkObjectResponse"
            },
            "type": "array"
          },
          "width": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "id",
          "assetId",
          "index",
          "label",
          "toolId",
          "sourceVersionId",
          "url",
          "thumbnailUrl",
          "previewUrl",
          "previewPending",
          "downloadUrl",
          "mimeType",
          "sizeBytes",
          "width",
          "height",
          "durationMs",
          "frameRate",
          "frameCount",
          "maskUrl",
          "watermarkMarks",
          "watermarkObjects",
          "createdAt"
        ],
        "type": "object"
      },
      "MaskRegionResponse": {
        "additionalProperties": true,
        "properties": {
          "color": {
            "description": "纯色水印的颜色（#rrggbb，如白字 #ffffff）；不填表示不按颜色收紧遮罩",
            "pattern": "^#[0-9a-fA-F]{6}$",
            "type": "string"
          },
          "endMs": {
            "description": "作用区间的结束时间（毫秒，含），须带 timeMs 且不早于它；不填表示只作用于 timeMs 这一帧。positive 带 endMs 表示确认这一段要修复",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "height": {
            "description": "高度（占画面高度的比例）",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "kind": {
            "$ref": "#/components/schemas/MaskRegionKind",
            "description": "标记类型：positive（默认）这里有水印；negative 减选，这里不是水印；absent 这一段没有这个水印（须带 objectId）；suggested 自动查找的建议，用户确认（改成 positive）前不参与识别"
          },
          "objectId": {
            "description": "水印编号（前端同一种颜色）：同一编号在不同时间点的标记是同一个水印，各自向前后跟踪到彼此相遇；不填表示每处标记各是一个水印",
            "format": "int64",
            "maximum": 7,
            "minimum": 0,
            "type": "integer"
          },
          "strokes": {
            "description": "涂抹的画笔轨迹；为空表示框选（整个框都是水印）",
            "items": {
              "$ref": "#/components/schemas/BrushStrokeResponse"
            },
            "maxItems": 64,
            "type": "array"
          },
          "timeMs": {
            "description": "标记时的视频时间点（毫秒）；不填表示整段视频固定位置",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "width": {
            "description": "宽度（占画面宽度的比例）",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "x": {
            "description": "左边缘（占画面宽度的比例）",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "y": {
            "description": "上边缘（占画面高度的比例）",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "x",
          "y",
          "width",
          "height"
        ],
        "type": "object"
      },
      "MaskRegionKind": {
        "enum": [
          "positive",
          "negative",
          "absent",
          "suggested"
        ],
        "type": "string"
      },
      "BrushStrokeResponse": {
        "additionalProperties": true,
        "properties": {
          "points": {
            "description": "轨迹点 [x, y]（相对画面）",
            "items": {
              "items": {
                "format": "double",
                "type": "number"
              },
              "maxItems": 2,
              "minItems": 2,
              "type": "array"
            },
            "maxItems": 4000,
            "minItems": 1,
            "type": "array"
          },
          "radius": {
            "description": "画笔半径（占画面宽度的比例）",
            "format": "double",
            "maximum": 0.25,
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "radius",
          "points"
        ],
        "type": "object"
      },
      "WatermarkObjectResponse": {
        "additionalProperties": true,
        "properties": {
          "name": {
            "description": "水印名称",
            "maxLength": 24,
            "minLength": 1,
            "type": "string"
          },
          "objectId": {
            "format": "int64",
            "maximum": 7,
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "objectId",
          "name"
        ],
        "type": "object"
      },
      "UpdateAssetInput": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "description": "素材名称（首尾空白会去掉）；可与其他素材重名",
            "maxLength": 255,
            "minLength": 1,
            "type": "string"
          }
        },
        "type": "object"
      },
      "CompleteUploadInput": {
        "additionalProperties": false,
        "properties": {
          "parts": {
            "items": {
              "$ref": "#/components/schemas/CompletedPartInput"
            },
            "maxItems": 1024,
            "type": "array"
          },
          "routeGeneration": {
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          }
        },
        "type": "object"
      },
      "CompletedPartInput": {
        "additionalProperties": false,
        "properties": {
          "etag": {
            "maxLength": 256,
            "type": "string"
          },
          "number": {
            "format": "int64",
            "maximum": 1024,
            "minimum": 1,
            "type": "integer"
          },
          "sha256": {
            "maxLength": 64,
            "type": "string"
          }
        },
        "required": [
          "number"
        ],
        "type": "object"
      },
      "FallbackUploadInput": {
        "additionalProperties": false,
        "properties": {
          "multipart": {
            "type": "boolean"
          },
          "reason": {
            "description": "触发换路原因（如 slow_speed、timeout、network_error）",
            "maxLength": 120,
            "type": "string"
          },
          "resumable": {
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "UploadPartInput": {
        "additionalProperties": false,
        "properties": {
          "multipart": {
            "description": "小程序使用表单 POST 上传分片",
            "type": "boolean"
          },
          "number": {
            "format": "int64",
            "maximum": 1024,
            "minimum": 1,
            "type": "integer"
          },
          "routeGeneration": {
            "description": "续传时使用当前上传线路代次",
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "sha256": {
            "description": "本分片原始字节的 SHA-256，小写十六进制",
            "pattern": "^[a-f0-9]{64}$",
            "type": "string"
          }
        },
        "required": [
          "number",
          "sha256"
        ],
        "type": "object"
      },
      "AssetUploadSession": {
        "additionalProperties": true,
        "properties": {
          "assetId": {
            "type": "string"
          },
          "chunkSize": {
            "format": "int64",
            "type": "integer"
          },
          "complete": {
            "type": "boolean"
          },
          "cos": {
            "$ref": "#/components/schemas/COSDirectUpload",
            "description": "腾讯云 COS STS 临时密钥（SPA 断点续传刷新凭证时返回）"
          },
          "maxConcurrency": {
            "format": "int64",
            "type": "integer"
          },
          "parts": {
            "items": {
              "$ref": "#/components/schemas/UploadedPart"
            },
            "type": "array"
          },
          "resumeUntil": {
            "description": "继续上传或查询会话会续期；超过有效期后临时文件会被清理",
            "format": "date-time",
            "type": "string"
          },
          "route": {
            "type": "string"
          },
          "routeGeneration": {
            "format": "int64",
            "type": "integer"
          },
          "sizeBytes": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "assetId",
          "sizeBytes",
          "chunkSize",
          "parts",
          "complete",
          "maxConcurrency",
          "resumeUntil"
        ],
        "type": "object"
      },
      "UploadedPart": {
        "additionalProperties": true,
        "properties": {
          "etag": {
            "type": "string"
          },
          "number": {
            "format": "int64",
            "type": "integer"
          },
          "sha256": {
            "type": "string"
          },
          "sizeBytes": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "number",
          "sizeBytes",
          "sha256"
        ],
        "type": "object"
      },
      "ApiUploadStatus": {
        "additionalProperties": true,
        "properties": {
          "assetId": {
            "type": "string"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "errorCode": {
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/AssetStatus"
          }
        },
        "required": [
          "assetId",
          "status",
          "errorCode",
          "error"
        ],
        "type": "object"
      },
      "RefreshApiUploadInput": {
        "additionalProperties": false,
        "properties": {
          "multipart": {
            "description": "使用表单POST；默认PUT；不创建新的素材或分片会话",
            "type": "boolean"
          }
        },
        "type": "object"
      },
      "AssetDownloadTicket": {
        "additionalProperties": true,
        "properties": {
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "filename": {
            "type": "string"
          },
          "locationVersion": {
            "format": "int64",
            "type": "integer"
          },
          "mimeType": {
            "type": "string"
          },
          "sha256": {
            "type": "string"
          },
          "sizeBytes": {
            "format": "int64",
            "type": "integer"
          },
          "url": {
            "description": "实时按需签发的短有效期下载链接（含 Content-Disposition: attachment）",
            "type": "string"
          }
        },
        "required": [
          "url",
          "filename",
          "mimeType",
          "sizeBytes",
          "sha256",
          "locationVersion",
          "expiresAt"
        ],
        "type": "object"
      },
      "SaveWatermarkMarksInput": {
        "additionalProperties": false,
        "properties": {
          "objects": {
            "description": "各个水印的名字（整体替换）；不传 = 清空",
            "items": {
              "$ref": "#/components/schemas/WatermarkObject"
            },
            "maxItems": 8,
            "type": "array"
          },
          "regions": {
            "description": "该版本上的全部标记（整体替换）；空数组 = 清空",
            "items": {
              "$ref": "#/components/schemas/MaskRegion"
            },
            "maxItems": 64,
            "type": "array"
          }
        },
        "required": [
          "regions"
        ],
        "type": "object"
      },
      "WatermarkObject": {
        "additionalProperties": false,
        "properties": {
          "name": {
            "description": "水印名称",
            "maxLength": 24,
            "minLength": 1,
            "type": "string"
          },
          "objectId": {
            "format": "int64",
            "maximum": 7,
            "minimum": 0,
            "type": "integer"
          }
        },
        "required": [
          "objectId",
          "name"
        ],
        "type": "object"
      },
      "MaskRegion": {
        "additionalProperties": false,
        "properties": {
          "color": {
            "description": "纯色水印的颜色（#rrggbb，如白字 #ffffff）；不填表示不按颜色收紧遮罩",
            "pattern": "^#[0-9a-fA-F]{6}$",
            "type": "string"
          },
          "endMs": {
            "description": "作用区间的结束时间（毫秒，含），须带 timeMs 且不早于它；不填表示只作用于 timeMs 这一帧。positive 带 endMs 表示确认这一段要修复",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "height": {
            "description": "高度（占画面高度的比例）",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "kind": {
            "$ref": "#/components/schemas/MaskRegionKind",
            "description": "标记类型：positive（默认）这里有水印；negative 减选，这里不是水印；absent 这一段没有这个水印（须带 objectId）；suggested 自动查找的建议，用户确认（改成 positive）前不参与识别"
          },
          "objectId": {
            "description": "水印编号（前端同一种颜色）：同一编号在不同时间点的标记是同一个水印，各自向前后跟踪到彼此相遇；不填表示每处标记各是一个水印",
            "format": "int64",
            "maximum": 7,
            "minimum": 0,
            "type": "integer"
          },
          "strokes": {
            "description": "涂抹的画笔轨迹；为空表示框选（整个框都是水印）",
            "items": {
              "$ref": "#/components/schemas/BrushStroke"
            },
            "maxItems": 64,
            "type": "array"
          },
          "timeMs": {
            "description": "标记时的视频时间点（毫秒）；不填表示整段视频固定位置",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "width": {
            "description": "宽度（占画面宽度的比例）",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "x": {
            "description": "左边缘（占画面宽度的比例）",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "y": {
            "description": "上边缘（占画面高度的比例）",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "x",
          "y",
          "width",
          "height"
        ],
        "type": "object"
      },
      "BrushStroke": {
        "additionalProperties": false,
        "properties": {
          "points": {
            "description": "轨迹点 [x, y]（相对画面）",
            "items": {
              "items": {
                "format": "double",
                "type": "number"
              },
              "maxItems": 2,
              "minItems": 2,
              "type": "array"
            },
            "maxItems": 4000,
            "minItems": 1,
            "type": "array"
          },
          "radius": {
            "description": "画笔半径（占画面宽度的比例）",
            "format": "double",
            "maximum": 0.25,
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "radius",
          "points"
        ],
        "type": "object"
      },
      "SubscriptionBenefits": {
        "additionalProperties": true,
        "properties": {
          "concurrency": {
            "description": "普通积分任务的实际并发上限；0 表示不限，图片包任务另有单独上限",
            "format": "int64",
            "type": "integer"
          },
          "imagesRemaining": {
            "format": "int64",
            "type": "integer"
          },
          "maxVideoMinutes": {
            "format": "int64",
            "type": "integer"
          },
          "paidPlan": {
            "type": "boolean"
          },
          "periodEndsAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "planId": {
            "type": "string"
          },
          "retentionDays": {
            "format": "int64",
            "type": "integer"
          },
          "rushesRemaining": {
            "format": "int64",
            "type": "integer"
          },
          "storageGB": {
            "format": "int64",
            "type": "integer"
          },
          "subscriptions": {
            "items": {
              "$ref": "#/components/schemas/SubscriptionTerm"
            },
            "type": "array"
          },
          "topupBonusPercent": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "planId",
          "paidPlan",
          "concurrency",
          "storageGB",
          "retentionDays",
          "maxVideoMinutes",
          "topupBonusPercent",
          "imagesRemaining",
          "rushesRemaining",
          "periodEndsAt",
          "subscriptions"
        ],
        "type": "object"
      },
      "SubscriptionTerm": {
        "additionalProperties": true,
        "properties": {
          "endsAt": {
            "format": "date-time",
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "planId": {
            "type": "string"
          },
          "startsAt": {
            "format": "date-time",
            "type": "string"
          }
        },
        "required": [
          "id",
          "planId",
          "startsAt",
          "endsAt"
        ],
        "type": "object"
      },
      "GenerationConfig": {
        "additionalProperties": true,
        "properties": {
          "enabled": {
            "type": "boolean"
          },
          "models": {
            "items": {
              "$ref": "#/components/schemas/GenerationModel"
            },
            "type": "array"
          }
        },
        "required": [
          "enabled",
          "models"
        ],
        "type": "object"
      },
      "GenerationModel": {
        "additionalProperties": true,
        "properties": {
          "available": {
            "type": "boolean"
          },
          "availableAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "billingMode": {
            "description": "该模型上游计费方式",
            "enum": [
              "tokens",
              "duration",
              "image"
            ],
            "type": "string"
          },
          "downloadResolutions": {
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "generationResolution": {
            "type": "string"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "image",
              "video"
            ],
            "type": "string"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "kind",
          "billingMode",
          "available",
          "availableAt",
          "generationResolution",
          "downloadResolutions"
        ],
        "type": "object"
      },
      "ApiGeneration": {
        "additionalProperties": true,
        "properties": {
          "autoError": {
            "type": [
              "string",
              "null"
            ]
          },
          "autoStatus": {
            "enum": [
              "none",
              "pending",
              "submitted",
              "failed"
            ],
            "type": "string"
          },
          "autoTaskId": {
            "description": "自动超分任务 ID；可用 getGenerationExport 查询",
            "type": [
              "string",
              "null"
            ]
          },
          "bill": {
            "$ref": "#/components/schemas/GenerationBill",
            "description": "平台积分消耗拆解（生成费 + 超分服务费）"
          },
          "completionTokens": {
            "description": "上游返回的产生 token 数；详见 usage",
            "format": "int64",
            "type": "integer"
          },
          "costCredits": {
            "description": "实际已收生成步骤积分；含自动超分的总消耗见 bill.totalCredits",
            "format": "int64",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "deliveryOnly": {
            "description": "仅交付高清成片的新视频，status 表示成片状态，下载请使用 autoTaskId 的导出接口",
            "type": "boolean"
          },
          "downloadResolution": {
            "type": [
              "string",
              "null"
            ]
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "enum": [
              "image",
              "video"
            ],
            "type": "string"
          },
          "mode": {
            "enum": [
              "preview",
              "auto_upscale"
            ],
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "officialReferenceCredits": {
            "description": "创建时同条件官方1080档公开价预估快照",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "originalUpgradeAvailable": {
            "description": "按现行原片规则购买、已成功入库的 480P 视频，可按成片价补差升级",
            "type": "boolean"
          },
          "packageCredits": {
            "description": "历史固定套餐总价快照；当前商品为 null",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "previewExpiresAt": {
            "description": "按供应商 24 小时有效期保守估计；第三方可能提前失效",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "previewUrl": {
            "description": "火山引擎原始预览地址；未完成或过期为 null，不代理媒体流量",
            "type": [
              "string",
              "null"
            ]
          },
          "reservedCredits": {
            "format": "int64",
            "type": "integer"
          },
          "resolution": {
            "description": "上游生成基础规格，成片交付规格见 downloadResolution",
            "enum": [
              "480p",
              "1k"
            ],
            "type": "string"
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourceError": {
            "type": [
              "string",
              "null"
            ]
          },
          "sourceStatus": {
            "description": "原件转存状态；ready 后可申请超分",
            "enum": [
              "pending",
              "ready",
              "failed"
            ],
            "type": "string"
          },
          "status": {
            "enum": [
              "queued",
              "submitting",
              "running",
              "succeeded",
              "failed",
              "submission_unknown"
            ],
            "type": "string"
          },
          "updatedAt": {
            "format": "date-time",
            "type": "string"
          },
          "urls": {
            "$ref": "#/components/schemas/ApiGenerationURLs"
          },
          "usage": {
            "$ref": "#/components/schemas/GenerationUsage",
            "description": "上游实际产生的计费用量（token 数或时长秒数）"
          }
        },
        "required": [
          "urls",
          "originalUpgradeAvailable",
          "deliveryOnly",
          "sku",
          "packageCredits",
          "officialReferenceCredits",
          "mode",
          "downloadResolution",
          "autoTaskId",
          "autoStatus",
          "autoError",
          "completionTokens",
          "usage",
          "bill",
          "id",
          "model",
          "kind",
          "resolution",
          "status",
          "previewUrl",
          "previewExpiresAt",
          "sourceStatus",
          "error",
          "sourceError",
          "reservedCredits",
          "costCredits",
          "createdAt",
          "updatedAt"
        ],
        "type": "object"
      },
      "GenerationBill": {
        "additionalProperties": true,
        "properties": {
          "generationCredits": {
            "description": "已结算的生成服务积分；480P 原片生成成功时结算，1080P/2K 与交付服务一起在成片成功时结算",
            "format": "int64",
            "type": "integer"
          },
          "totalCredits": {
            "description": "当前已结算合计消耗积分（生成实收积分 + 已结算超分积分）",
            "format": "int64",
            "type": "integer"
          },
          "upscaleCredits": {
            "description": "我方超分步骤实收积分；原片直出完成后为 0，自动超分进行中为 null",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "generationCredits",
          "upscaleCredits",
          "totalCredits"
        ],
        "type": "object"
      },
      "ApiGenerationURLs": {
        "additionalProperties": true,
        "properties": {
          "exports": {
            "type": "string"
          },
          "originalDownload": {
            "description": "图片、480P 视频原片和具有原片权益的历史订单提供此链接，高清成片订单为空字符串",
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        },
        "required": [
          "status",
          "originalDownload",
          "exports"
        ],
        "type": "object"
      },
      "GenerationUsage": {
        "additionalProperties": true,
        "properties": {
          "billedSeconds": {
            "description": "按时长计费的供应商计费秒数，无计费时长时为 null",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "billingMode": {
            "description": "上游计费维度：按 token、按时长（秒）或按张",
            "enum": [
              "tokens",
              "duration",
              "image"
            ],
            "type": "string"
          },
          "completionTokens": {
            "description": "上游报告的实际 token 数；未报告时为 null，交付失败也可有供应商用量",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "billingMode",
          "completionTokens",
          "billedSeconds"
        ],
        "type": "object"
      },
      "GenerationCreateInput": {
        "additionalProperties": false,
        "properties": {
          "downloadResolution": {
            "description": "auto_upscale 必填；新视频仅提供1080p、2k成片",
            "enum": [
              "1080p",
              "2k",
              "2x",
              "4x"
            ],
            "type": "string"
          },
          "duration": {
            "description": "仅视频；默认5秒。edit模式忽略此值，按来源时长预估费用；2.0按来源秒数向上取整生成，2.5系列由模型匹配原片时长，可能缩短不超过0.4秒",
            "format": "int64",
            "maximum": 30,
            "minimum": 4,
            "type": "integer"
          },
          "generateAudio": {
            "description": "仅视频；默认生成音频",
            "type": "boolean"
          },
          "maxCostCredits": {
            "description": "用户确认的积分预算上限。480P 原片按报价资金组计价，1080P/2K 成片可用完整付费套餐积分。成功后按实际计费，多余释放",
            "format": "int64",
            "maximum": 1000000,
            "minimum": 1,
            "type": "integer"
          },
          "mode": {
            "description": "preview 直接交付图片或 480P 视频原片；auto_upscale 交付所选高清成片",
            "enum": [
              "preview",
              "auto_upscale"
            ],
            "type": "string"
          },
          "model": {
            "enum": [
              "seedance-2.0",
              "seedance-2.5",
              "seedance-2.5-flash",
              "seedream-5.5",
              "seedream-5.0-flash"
            ],
            "type": "string"
          },
          "originalFunding": {
            "description": "购买 480P 时可回传报价的资金组锁定费率；未传按可用余额及预算选择",
            "enum": [
              "permanent",
              "plan",
              "mixed"
            ],
            "type": "string"
          },
          "originalQuoteKey": {
            "description": "与 originalFunding 一起原样回传以确认本人的 480P 原片报价；报价失效时重新估价",
            "maxLength": 128,
            "minLength": 1,
            "type": "string"
          },
          "prompt": {
            "maxLength": 10000,
            "minLength": 1,
            "type": "string"
          },
          "ratio": {
            "description": "默认16:9；adaptive仅用于2.5的首尾帧、编辑与延长",
            "enum": [
              "16:9",
              "9:16",
              "1:1",
              "4:3",
              "3:4",
              "21:9",
              "adaptive"
            ],
            "type": "string"
          },
          "referenceMode": {
            "description": "视频参考方式；默认omni。frames按顺序为首帧、尾帧；multi_frame按顺序为关键帧；edit/extend/replicate须一段目标视频。2.5系列首尾帧、编辑、延长比例须adaptive；2.5系列edit时长由模型匹配原片，可能缩短不超过0.4秒，不保证逐帧保长。自适应来源须上传或选素材库",
            "enum": [
              "omni",
              "frames",
              "multi_frame",
              "edit",
              "extend",
              "replicate"
            ],
            "type": "string"
          },
          "references": {
            "description": "按提示词引用顺序提供素材；Seedance 2.5 最多 30 图、10 视频、10 音频；Flash 最多 10 图、5 视频、5 音频；2.0 最多 9 图、3 视频、3 音频且合计 12 份；生图最多 10 图",
            "items": {
              "$ref": "#/components/schemas/GenerationReference"
            },
            "maxItems": 50,
            "type": "array"
          },
          "sku": {
            "description": "Seedance 视频支持 preview（480P 原片）、hd_1080p 和 ultra_1440p。可省略 SKU，由模式和交付分辨率确定",
            "enum": [
              "preview",
              "hd_1080p",
              "ultra_1440p",
              "ultra_4x"
            ],
            "type": "string"
          }
        },
        "required": [
          "model",
          "mode",
          "prompt",
          "maxCostCredits"
        ],
        "type": "object"
      },
      "GenerationReference": {
        "additionalProperties": false,
        "properties": {
          "assetId": {
            "description": "本人素材库中的素材 ID；使用其原件，与 url 二选一",
            "maxLength": 36,
            "minLength": 36,
            "type": "string"
          },
          "type": {
            "enum": [
              "image",
              "video",
              "audio"
            ],
            "type": "string"
          },
          "url": {
            "description": "公网 HTTPS 素材地址；与 assetId 二选一",
            "maxLength": 4096,
            "minLength": 1,
            "type": "string"
          }
        },
        "required": [
          "type"
        ],
        "type": "object"
      },
      "GenerationEstimateInput": {
        "additionalProperties": false,
        "properties": {
          "duration": {
            "description": "仅视频；默认5秒。edit模式忽略此值，按来源时长预估费用；2.0按来源秒数向上取整生成，2.5系列由模型匹配原片时长，可能缩短不超过0.4秒",
            "format": "int64",
            "maximum": 30,
            "minimum": 4,
            "type": "integer"
          },
          "model": {
            "enum": [
              "seedance-2.0",
              "seedance-2.5",
              "seedance-2.5-flash",
              "seedream-5.5",
              "seedream-5.0-flash"
            ],
            "type": "string"
          },
          "ratio": {
            "enum": [
              "16:9",
              "9:16",
              "1:1",
              "4:3",
              "3:4",
              "21:9",
              "adaptive"
            ],
            "type": "string"
          },
          "referenceMode": {
            "description": "与创建任务一致",
            "enum": [
              "omni",
              "frames",
              "multi_frame",
              "edit",
              "extend",
              "replicate"
            ],
            "type": "string"
          },
          "references": {
            "description": "与创建任务传入相同的参考素材；计入图片输入成本和视频参考费率",
            "items": {
              "$ref": "#/components/schemas/GenerationReference"
            },
            "maxItems": 50,
            "type": "array"
          },
          "resolution": {
            "description": "480p 估算原片；兼容 preview SKU 搭配 2x 的旧请求",
            "enum": [
              "480p",
              "1080p",
              "2k",
              "2x",
              "4x"
            ],
            "type": "string"
          },
          "sku": {
            "enum": [
              "preview",
              "hd_1080p",
              "ultra_1440p",
              "ultra_4x"
            ],
            "type": "string"
          }
        },
        "required": [
          "model",
          "ratio",
          "resolution"
        ],
        "type": "object"
      },
      "GenerationEstimate": {
        "additionalProperties": true,
        "properties": {
          "balanceCredits": {
            "description": "当前可用于 AI 生成的积分余额，已扣除冻结额度",
            "format": "int64",
            "type": "integer"
          },
          "comparison": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/GenerationPriceComparison",
                "description": "官方1080P公开价格比较依据；含参考视频或自适应尺寸时为空"
              },
              {
                "type": "null"
              }
            ],
            "description": "官方1080P公开价格比较依据；含参考视频或自适应尺寸时为空"
          },
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "generationCredits": {
            "description": "所选商品的生成服务费预估，含参考素材用量；外链参考视频按最大允许输入时长估算",
            "format": "int64",
            "type": "integer"
          },
          "giftCredits": {
            "description": "当前商品不可用的余额。480P 原片按资金组返回可用余额，1080P/2K 成片可用完整套餐周期积分",
            "format": "int64",
            "type": "integer"
          },
          "officialReferenceCredits": {
            "description": "同参数官方原生1080档公开价预估，向上取整积分，仅供对比；外链视频时长未知时为 null",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "original480pCredits": {
            "description": "480P 视频原片单购预估，按报价的资金来源折算。图片无此字段",
            "format": "int64",
            "type": "integer"
          },
          "originalFunding": {
            "description": "480P 原片预估使用的资金组：已核实的永久充值、常规套餐或混合/低价来源。创建原片时可回传",
            "enum": [
              "permanent",
              "plan",
              "mixed"
            ],
            "type": "string"
          },
          "originalQuoteKey": {
            "description": "本次 480P 原片报价的不透明凭据；购买时与 originalFunding 一起原样回传",
            "type": "string"
          },
          "outputHeight": {
            "format": "int64",
            "type": "integer"
          },
          "outputWidth": {
            "description": "所选交付规格的预计宽度",
            "format": "int64",
            "type": "integer"
          },
          "packageCredits": {
            "description": "历史固定套餐价格；当前商品使用分项报价，为 null",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "packageProblem": {
            "type": [
              "string",
              "null"
            ]
          },
          "qualityOptions": {
            "description": "视频1080P及2K成片的已发布价目预估，独立于节点在线状态；图片为空数组，不代表可提交",
            "items": {
              "$ref": "#/components/schemas/GenerationQualityEstimate"
            },
            "type": "array"
          },
          "upscaleCredits": {
            "description": "所选规格的交付服务费预估，节点不可用时为 null",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "upscaleProblem": {
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "qualityOptions",
          "comparison",
          "packageCredits",
          "officialReferenceCredits",
          "packageProblem",
          "outputWidth",
          "outputHeight",
          "generationCredits",
          "upscaleCredits",
          "upscaleProblem",
          "balanceCredits",
          "giftCredits",
          "expiresAt"
        ],
        "type": "object"
      },
      "GenerationPriceComparison": {
        "additionalProperties": true,
        "properties": {
          "credits": {
            "description": "同参数公开价预估积分，向上取整；不是实际账单",
            "format": "int64",
            "type": "integer"
          },
          "model": {
            "description": "官方比较型号；Flash也比较Seedance 2.5标准版",
            "type": "string"
          },
          "resolution": {
            "enum": [
              "1080p"
            ],
            "type": "string"
          },
          "sourceUrl": {
            "description": "官方价格来源",
            "type": "string"
          },
          "verifiedOn": {
            "description": "公开单价核验日期，YYYY-MM-DD",
            "type": "string"
          }
        },
        "required": [
          "model",
          "resolution",
          "credits",
          "verifiedOn",
          "sourceUrl"
        ],
        "type": "object"
      },
      "GenerationQualityEstimate": {
        "additionalProperties": true,
        "properties": {
          "outputHeight": {
            "format": "int64",
            "type": "integer"
          },
          "outputWidth": {
            "format": "int64",
            "type": "integer"
          },
          "resolution": {
            "enum": [
              "1080p",
              "2k"
            ],
            "type": "string"
          },
          "savingsPercent": {
            "description": "相比官方1080P的预计节省整数百分比，向下取整；无优惠、参考视频最低用量未核验或adaptive尺寸不确定时为空",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "sku": {
            "enum": [
              "hd_1080p",
              "ultra_1440p"
            ],
            "type": "string"
          },
          "totalCredits": {
            "description": "生成与超分合计预估，不含冻结额度余量",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "upscaleCredits": {
            "description": "按本次源视频工作量和交付尺寸估算的成片处理服务费",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          }
        },
        "required": [
          "sku",
          "resolution",
          "outputWidth",
          "outputHeight",
          "upscaleCredits",
          "totalCredits",
          "savingsPercent"
        ],
        "type": "object"
      },
      "GenerationDownload": {
        "additionalProperties": true,
        "properties": {
          "expiresAt": {
            "format": "date-time",
            "type": "string"
          },
          "height": {
            "format": "int64",
            "type": "integer"
          },
          "url": {
            "type": "string"
          },
          "width": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "url",
          "expiresAt",
          "width",
          "height"
        ],
        "type": "object"
      },
      "GenerationExport": {
        "additionalProperties": true,
        "properties": {
          "generationId": {
            "type": "string"
          },
          "resolution": {
            "type": "string"
          },
          "task": {
            "$ref": "#/components/schemas/Task"
          }
        },
        "required": [
          "generationId",
          "resolution",
          "task"
        ],
        "type": "object"
      },
      "Task": {
        "additionalProperties": true,
        "properties": {
          "assetDeleted": {
            "description": "源素材已删除（原件与衍生文件已清理，处理记录保留用于对账）",
            "type": "boolean"
          },
          "assetId": {
            "type": "string"
          },
          "assetName": {
            "type": "string"
          },
          "cancelRequested": {
            "description": "已收到取消请求；running 时表示正在停止，终态以 status 为准",
            "type": "boolean"
          },
          "costCredits": {
            "description": "最终实际消耗的整数积分；待结算、失败或取消的新任务为 0",
            "format": "int64",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "finishedAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "maskPreviewUrl": {
            "description": "去水印识别预览（watermark-mask）成功后的识别遮罩视频（H.264 灰度，亮 = 将被修复的像素，与输入版本按时间对齐）；其他任务为 null",
            "type": [
              "string",
              "null"
            ]
          },
          "modelLoading": {
            "description": "处理节点正在加载模型（冷启动或空闲卸载后重新加载），此时进度不前进；只在 running 时可能为 true",
            "type": "boolean"
          },
          "outputVersionDeleted": {
            "description": "产出的版本已被用户删除（文件已删，记录保留用于对账）",
            "type": "boolean"
          },
          "outputVersionId": {
            "description": "成功后产出的素材版本；其他状态为 null；检测类工具不产出版本",
            "type": [
              "string",
              "null"
            ]
          },
          "outputVersionIndex": {
            "description": "产出的版本号，与 outputVersionId 同时有值；版本删除后不变（对账用）",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "params": {
            "$ref": "#/components/schemas/TaskParamsResponse"
          },
          "processingStartProgress": {
            "description": "processingStartedAt 时的进度 0 ~ 1",
            "format": "double",
            "type": "number"
          },
          "processingStartedAt": {
            "description": "本轮推理开始的时间（认领或模型加载完成时），估算剩余时间的起点；非运行中或加载模型中为 null",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "progress": {
            "description": "0 ~ 1",
            "format": "double",
            "type": "number"
          },
          "queuePosition": {
            "description": "排队中时在同一队列中的位置（从 1 开始，1 = 下一个被处理）；其他状态为 null",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "queueRunning": {
            "description": "排队中时同一队列正在处理的任务数（所有用户，含分段），>0 说明算力已占满在等待；其他状态为 null",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "report": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DetectReport",
                "description": "检测类工具成功后的报告；其他任务为 null"
              },
              {
                "type": "null"
              }
            ],
            "description": "检测类工具成功后的报告；其他任务为 null"
          },
          "sourceVersionId": {
            "description": "以哪个版本为输入；null 表示原件",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceVersionIndex": {
            "description": "输入版本号（0 = 原件），建任务时记下，版本删除后不变",
            "format": "int64",
            "type": "integer"
          },
          "sourceWaitReason": {
            "description": "等待源文件时的原因：source_node_offline 节点离线、source_transfer 文件同步、source_unavailable 源文件暂不可用",
            "type": "string"
          },
          "startedAt": {
            "description": "开始处理的时间（第一次被 worker 认领）",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/TaskStatus"
          },
          "steps": {
            "description": "保存的步骤参数，包含各超分步骤的服务等级",
            "items": {
              "$ref": "#/components/schemas/TaskWorkflowStepResponse"
            },
            "type": "array"
          },
          "toolId": {
            "type": "string"
          },
          "toolIds": {
            "description": "多工具工作流的完整执行顺序，单工具任务省略",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "toolName": {
            "description": "工具名称（含不在工具列表里的隐藏工具，如水印追踪）",
            "type": "string"
          },
          "watermarkAnalysis": {
            "description": "有识别分析报告（每个水印每一段的状态、需要复核的区间），用 getWatermarkAnalysis 读取；水印追踪、本机去水印成功后才有",
            "type": "boolean"
          },
          "watermarkFind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WatermarkFindReport",
                "description": "自动查找水印（watermark-find）成功后的候选水印；其他任务为 null"
              },
              {
                "type": "null"
              }
            ],
            "description": "自动查找水印（watermark-find）成功后的候选水印；其他任务为 null"
          },
          "watermarkRevision": {
            "description": "这次水印追踪的原尺寸遮罩可复用：提交去水印时 params.value.revisionId 传本任务 ID，直接用这份遮罩、不再重新识别",
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "assetId",
          "assetName",
          "assetDeleted",
          "sourceVersionId",
          "sourceVersionIndex",
          "toolId",
          "toolName",
          "params",
          "costCredits",
          "status",
          "progress",
          "modelLoading",
          "queuePosition",
          "queueRunning",
          "error",
          "outputVersionId",
          "outputVersionIndex",
          "outputVersionDeleted",
          "report",
          "maskPreviewUrl",
          "watermarkAnalysis",
          "watermarkRevision",
          "watermarkFind",
          "createdAt",
          "startedAt",
          "processingStartedAt",
          "processingStartProgress",
          "finishedAt"
        ],
        "type": "object"
      },
      "TaskParamsResponse": {
        "oneOf": [
          {
            "additionalProperties": true,
            "properties": {
              "type": {
                "const": "none",
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "tier": {
                "$ref": "#/components/schemas/ProcessingTier"
              },
              "type": {
                "const": "scale",
                "type": "string"
              },
              "value": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "type",
              "value"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "type": {
                "const": "fps",
                "type": "string"
              },
              "value": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "type",
              "value"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "type": {
                "const": "faceProtect",
                "type": "string"
              },
              "value": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "type": {
                "const": "regions",
                "type": "string"
              },
              "value": {
                "items": {
                  "$ref": "#/components/schemas/MaskRegionResponse"
                },
                "minItems": 1,
                "type": "array"
              }
            },
            "required": [
              "type",
              "value"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "type": {
                "const": "watermark",
                "type": "string"
              },
              "value": {
                "$ref": "#/components/schemas/WatermarkParamsResponse"
              }
            },
            "required": [
              "type",
              "value"
            ],
            "type": "object"
          }
        ]
      },
      "ProcessingTier": {
        "enum": [
          "fast",
          "pro"
        ],
        "type": "string"
      },
      "WatermarkParamsResponse": {
        "additionalProperties": true,
        "properties": {
          "objects": {
            "description": "水印名称（只用于显示，不影响识别）",
            "items": {
              "$ref": "#/components/schemas/WatermarkObjectResponse"
            },
            "maxItems": 8,
            "type": "array"
          },
          "regions": {
            "description": "全部标记",
            "items": {
              "$ref": "#/components/schemas/MaskRegionResponse"
            },
            "maxItems": 64,
            "type": "array"
          },
          "revisionId": {
            "description": "复用的识别结果：同一输入版本、同一组标记、成功的 watermark-mask 任务 ID。去水印直接用它的原尺寸遮罩，不再重新识别；标记变了、识别版本过期时返回 409",
            "type": "string"
          }
        },
        "required": [
          "regions"
        ],
        "type": "object"
      },
      "DetectReport": {
        "additionalProperties": true,
        "properties": {
          "degraded": {
            "description": "有检测器失败，结果可信度降低",
            "type": "boolean"
          },
          "detectors": {
            "description": "各检测器的判定依据",
            "items": {
              "$ref": "#/components/schemas/DetectorEvidence"
            },
            "type": "array"
          },
          "probability": {
            "description": "校准后的 AI 概率，用于判定",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "score": {
            "description": "AI 率展示分 0 ~ 100，越高越像 AI；展示模型不可用时为 null",
            "format": "double",
            "maximum": 100,
            "minimum": 0,
            "type": [
              "number",
              "null"
            ]
          },
          "threshold": {
            "description": "判定阈值：probability ≥ threshold 判为 AI",
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "verdict": {
            "$ref": "#/components/schemas/DetectVerdict",
            "description": "判定结论（权威）"
          }
        },
        "required": [
          "score",
          "probability",
          "threshold",
          "verdict",
          "degraded",
          "detectors"
        ],
        "type": "object"
      },
      "DetectorEvidence": {
        "additionalProperties": true,
        "properties": {
          "id": {
            "description": "中性检测项编号，如 check-1",
            "type": "string"
          },
          "margin": {
            "description": "归一化偏离度：> 0 倾向 AI，< 0 倾向真实；检测器失败时为 null",
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          }
        },
        "required": [
          "id",
          "margin"
        ],
        "type": "object"
      },
      "DetectVerdict": {
        "enum": [
          "ai",
          "real"
        ],
        "type": "string"
      },
      "TaskStatus": {
        "enum": [
          "queued",
          "running",
          "succeeded",
          "failed",
          "canceled"
        ],
        "type": "string"
      },
      "TaskWorkflowStepResponse": {
        "additionalProperties": true,
        "properties": {
          "params": {
            "$ref": "#/components/schemas/TaskParamsResponse"
          },
          "toolId": {
            "type": "string"
          }
        },
        "required": [
          "toolId",
          "params"
        ],
        "type": "object"
      },
      "WatermarkFindReport": {
        "additionalProperties": true,
        "properties": {
          "candidates": {
            "description": "候选水印，按出现时长从长到短",
            "items": {
              "$ref": "#/components/schemas/WatermarkCandidate"
            },
            "type": "array"
          }
        },
        "required": [
          "candidates"
        ],
        "type": "object"
      },
      "WatermarkCandidate": {
        "additionalProperties": true,
        "properties": {
          "box": {
            "$ref": "#/components/schemas/WatermarkBox"
          },
          "endMs": {
            "description": "大致消失的时间；一直到结尾为 null",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "evidence": {
            "description": "找到它的依据：stable（时间上稳定的笔画）、text（文字检测）、concept（概念分割）、short_event（只在首尾短暂出现，证据较少）",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "keyframesMs": {
            "description": "建议标记的时间点（毫秒）：第一次稳定出现、中间、最后；位置以 box 为准",
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "name": {
            "description": "可信的文字识别结果（如账号名）；没有为 null，前端显示「水印 n」，不编造名称",
            "type": [
              "string",
              "null"
            ]
          },
          "objectId": {
            "description": "建议的水印编号",
            "format": "int64",
            "maximum": 7,
            "minimum": 0,
            "type": "integer"
          },
          "startMs": {
            "description": "大致出现的时间",
            "format": "int64",
            "type": "integer"
          },
          "subtitle": {
            "description": "更像字幕（画面下方居中、内容在变）：默认不选",
            "type": "boolean"
          },
          "thumbnail": {
            "description": "候选所在画面的缩略图（JPEG data URI），给建议清单核对用；没有为 null",
            "maxLength": 65536,
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "objectId",
          "name",
          "box",
          "keyframesMs",
          "startMs",
          "endMs",
          "evidence",
          "subtitle",
          "thumbnail"
        ],
        "type": "object"
      },
      "WatermarkBox": {
        "additionalProperties": true,
        "properties": {
          "height": {
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "width": {
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "x": {
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          },
          "y": {
            "format": "double",
            "maximum": 1,
            "minimum": 0,
            "type": "number"
          }
        },
        "required": [
          "x",
          "y",
          "width",
          "height"
        ],
        "type": "object"
      },
      "GenerationExportInput": {
        "additionalProperties": false,
        "properties": {
          "maxCostCredits": {
            "description": "确认的超分积分上限；不足返回409，不创建任务",
            "format": "int64",
            "minimum": 1,
            "type": "integer"
          },
          "resolution": {
            "description": "已购 480P 原片升级 1080p/2k 使用对应成片画布；历史导出沿用原规格。2x/4x 为原件宽高各放大 2/4 倍",
            "enum": [
              "1080p",
              "2k",
              "2x",
              "4x"
            ],
            "type": "string"
          }
        },
        "required": [
          "resolution",
          "maxCostCredits"
        ],
        "type": "object"
      },
      "GenerationExportQuoteRequestBody": {
        "additionalProperties": false,
        "properties": {
          "resolution": {
            "enum": [
              "1080p",
              "2k",
              "2x",
              "4x"
            ],
            "type": "string"
          }
        },
        "required": [
          "resolution"
        ],
        "type": "object"
      },
      "TaskQuote": {
        "additionalProperties": true,
        "properties": {
          "balanceCredits": {
            "description": "当前积分余额，前端据此提示「积分不足 · 去购买」",
            "format": "int64",
            "type": "integer"
          },
          "canFit": {
            "description": "素材只在分辨率上超出工具上限，传 fitToLimits = true 可先缩小再处理",
            "type": "boolean"
          },
          "costCredits": {
            "description": "预估的整数积分，提交时冻结；完成后按实际产物精确结算，仅产生一笔最终费用",
            "format": "int64",
            "type": "integer"
          },
          "expiresAt": {
            "description": "报价有效期；过期后需重新报价",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "fixedCredits": {
            "description": "每任务固定费（积分）",
            "format": "int64",
            "type": "integer"
          },
          "imageUnits": {
            "format": "int64",
            "type": "integer"
          },
          "minCredits": {
            "description": "最低消耗（积分）",
            "format": "int64",
            "type": "integer"
          },
          "needsTopup": {
            "description": "problem 可通过购买积分解决（没买过积分的账户的视频时长限制）",
            "type": "boolean"
          },
          "outputHeight": {
            "format": "int64",
            "type": "integer"
          },
          "outputWidth": {
            "description": "处理后的画面宽度；problem 非 null 时为 0",
            "format": "int64",
            "type": "integer"
          },
          "priceId": {
            "description": "本次使用的价目版本 id",
            "type": [
              "string",
              "null"
            ]
          },
          "problem": {
            "description": "不能提交的原因（与 createTask 返回 400 时的文案一致）；null 表示可以提交",
            "type": [
              "string",
              "null"
            ]
          },
          "quoteId": {
            "description": "有效报价的 id；problem 非空时为 null",
            "type": [
              "string",
              "null"
            ]
          },
          "resized": {
            "description": "是否会先缩小输入（fitToLimits = true 且素材超出工具上限）",
            "type": "boolean"
          },
          "unitCredits": {
            "description": "单价（积分 / U；按次计费为每次的积分；分档计价为所在档每张的积分，动图为每帧）",
            "format": "int64",
            "type": "integer"
          },
          "unitDivisor": {
            "description": "单价分母；实际单价为 unitCredits / unitDivisor",
            "format": "int64",
            "type": "integer"
          },
          "unitSize": {
            "description": "计量单位像素或像素帧数；0 表示媒体默认单位",
            "format": "int64",
            "type": "integer"
          },
          "unitsMilli": {
            "description": "计费量 U × 1000，单位由 unitSize 指定；0 表示媒体默认单位。只用于展示，实际费用按未取整的用量计算",
            "format": "int64",
            "type": "integer"
          },
          "usesFreeRush": {
            "type": "boolean"
          }
        },
        "required": [
          "imageUnits",
          "usesFreeRush",
          "quoteId",
          "expiresAt",
          "priceId",
          "fixedCredits",
          "unitSize",
          "unitDivisor",
          "costCredits",
          "unitsMilli",
          "unitCredits",
          "minCredits",
          "balanceCredits",
          "outputWidth",
          "outputHeight",
          "resized",
          "problem",
          "canFit",
          "needsTopup"
        ],
        "type": "object"
      },
      "CreateTaskInput": {
        "additionalProperties": false,
        "properties": {
          "assetId": {
            "type": "string"
          },
          "fitToLimits": {
            "description": "素材分辨率超出工具上限时，先等比缩小到上限内再处理（见 TaskQuote.canFit）；不传 = 超限直接拒绝",
            "type": "boolean"
          },
          "maxCostCredits": {
            "description": "用户确认的最终扣费上限，默认报价金额。预估超过时返回409；实际结算超过时任务失败并释放冻结额度",
            "format": "int64",
            "minimum": 0,
            "type": "integer"
          },
          "nextSteps": {
            "description": "首个工具之后依次运行的同类型工具。静态图片用 PNG、视频用 FFV1 无损交接，整个工作流按一次任务提交与结算",
            "items": {
              "$ref": "#/components/schemas/TaskWorkflowStep"
            },
            "maxItems": 5,
            "type": "array"
          },
          "params": {
            "$ref": "#/components/schemas/TaskParams"
          },
          "quoteId": {
            "description": "quoteTask 返回的报价 id；有效期内按原报价成交，一份报价只创建一个任务",
            "type": "string"
          },
          "rush": {
            "description": "加急处理；图片包不能加急",
            "type": "boolean"
          },
          "sourceVersionId": {
            "description": "以哪个版本为输入；不传表示原件",
            "type": "string"
          },
          "toolId": {
            "type": "string"
          },
          "useImagePack": {
            "description": "使用图片畅享包额度，仅增强静态图片超分可用",
            "type": "boolean"
          }
        },
        "required": [
          "assetId",
          "toolId",
          "params"
        ],
        "type": "object"
      },
      "TaskWorkflowStep": {
        "additionalProperties": false,
        "properties": {
          "params": {
            "$ref": "#/components/schemas/TaskParams"
          },
          "toolId": {
            "type": "string"
          }
        },
        "required": [
          "toolId",
          "params"
        ],
        "type": "object"
      },
      "TaskParams": {
        "oneOf": [
          {
            "additionalProperties": false,
            "properties": {
              "type": {
                "const": "none",
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "tier": {
                "$ref": "#/components/schemas/ProcessingTier"
              },
              "type": {
                "const": "scale",
                "type": "string"
              },
              "value": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "type",
              "value"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "type": {
                "const": "fps",
                "type": "string"
              },
              "value": {
                "format": "int64",
                "type": "integer"
              }
            },
            "required": [
              "type",
              "value"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "type": {
                "const": "faceProtect",
                "type": "string"
              },
              "value": {
                "type": "boolean"
              }
            },
            "required": [
              "type",
              "value"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "type": {
                "const": "regions",
                "type": "string"
              },
              "value": {
                "items": {
                  "$ref": "#/components/schemas/MaskRegion"
                },
                "minItems": 1,
                "type": "array"
              }
            },
            "required": [
              "type",
              "value"
            ],
            "type": "object"
          },
          {
            "additionalProperties": false,
            "properties": {
              "type": {
                "const": "watermark",
                "type": "string"
              },
              "value": {
                "$ref": "#/components/schemas/WatermarkParams"
              }
            },
            "required": [
              "type",
              "value"
            ],
            "type": "object"
          }
        ]
      },
      "WatermarkParams": {
        "additionalProperties": false,
        "properties": {
          "objects": {
            "description": "水印名称（只用于显示，不影响识别）",
            "items": {
              "$ref": "#/components/schemas/WatermarkObject"
            },
            "maxItems": 8,
            "type": "array"
          },
          "regions": {
            "description": "全部标记",
            "items": {
              "$ref": "#/components/schemas/MaskRegion"
            },
            "maxItems": 64,
            "type": "array"
          },
          "revisionId": {
            "description": "复用的识别结果：同一输入版本、同一组标记、成功的 watermark-mask 任务 ID。去水印直接用它的原尺寸遮罩，不再重新识别；标记变了、识别版本过期时返回 409",
            "type": "string"
          }
        },
        "required": [
          "regions"
        ],
        "type": "object"
      },
      "ApiTask": {
        "additionalProperties": true,
        "properties": {
          "assetDeleted": {
            "description": "源素材已删除（原件与衍生文件已清理，处理记录保留用于对账）",
            "type": "boolean"
          },
          "assetId": {
            "type": "string"
          },
          "assetName": {
            "type": "string"
          },
          "cancelRequested": {
            "description": "已收到取消请求；running 时表示正在停止，终态以 status 为准",
            "type": "boolean"
          },
          "costCredits": {
            "description": "最终实际消耗的整数积分；待结算、失败或取消的新任务为 0",
            "format": "int64",
            "type": "integer"
          },
          "createdAt": {
            "format": "date-time",
            "type": "string"
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "errorCode": {
            "description": "失败时为 TASK_FAILED；详细原因见 error。终态不会自动重跑",
            "type": "string"
          },
          "estimatedRemainingSeconds": {
            "description": "按本轮推理进度估算的剩余秒数；排队、加载模型、进度不足或任务结束时为 null",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "finishedAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "maskPreviewUrl": {
            "description": "去水印识别预览（watermark-mask）成功后的识别遮罩视频（H.264 灰度，亮 = 将被修复的像素，与输入版本按时间对齐）；其他任务为 null",
            "type": [
              "string",
              "null"
            ]
          },
          "modelLoading": {
            "description": "处理节点正在加载模型（冷启动或空闲卸载后重新加载），此时进度不前进；只在 running 时可能为 true",
            "type": "boolean"
          },
          "outputVersionDeleted": {
            "description": "产出的版本已被用户删除（文件已删，记录保留用于对账）",
            "type": "boolean"
          },
          "outputVersionId": {
            "description": "成功后产出的素材版本；其他状态为 null；检测类工具不产出版本",
            "type": [
              "string",
              "null"
            ]
          },
          "outputVersionIndex": {
            "description": "产出的版本号，与 outputVersionId 同时有值；版本删除后不变（对账用）",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "params": {
            "$ref": "#/components/schemas/TaskParamsResponse"
          },
          "processingStartProgress": {
            "description": "processingStartedAt 时的进度 0 ~ 1",
            "format": "double",
            "type": "number"
          },
          "processingStartedAt": {
            "description": "本轮推理开始的时间（认领或模型加载完成时），估算剩余时间的起点；非运行中或加载模型中为 null",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "progress": {
            "description": "0 ~ 1",
            "format": "double",
            "type": "number"
          },
          "queuePosition": {
            "description": "排队中时在同一队列中的位置（从 1 开始，1 = 下一个被处理）；其他状态为 null",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "queueRunning": {
            "description": "排队中时同一队列正在处理的任务数（所有用户，含分段），>0 说明算力已占满在等待；其他状态为 null",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "report": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DetectReport",
                "description": "检测类工具成功后的报告；其他任务为 null"
              },
              {
                "type": "null"
              }
            ],
            "description": "检测类工具成功后的报告；其他任务为 null"
          },
          "sourceVersionId": {
            "description": "以哪个版本为输入；null 表示原件",
            "type": [
              "string",
              "null"
            ]
          },
          "sourceVersionIndex": {
            "description": "输入版本号（0 = 原件），建任务时记下，版本删除后不变",
            "format": "int64",
            "type": "integer"
          },
          "sourceWaitReason": {
            "description": "等待源文件时的原因：source_node_offline、source_transfer 或 source_unavailable",
            "type": "string"
          },
          "startedAt": {
            "description": "开始处理的时间（第一次被 worker 认领）",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "status": {
            "$ref": "#/components/schemas/TaskStatus"
          },
          "steps": {
            "description": "保存的步骤参数，包含各超分步骤的服务等级",
            "items": {
              "$ref": "#/components/schemas/TaskWorkflowStepResponse"
            },
            "type": "array"
          },
          "toolId": {
            "type": "string"
          },
          "toolIds": {
            "description": "多工具工作流的完整执行顺序，单工具任务省略",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "toolName": {
            "description": "工具名称（含不在工具列表里的隐藏工具，如水印追踪）",
            "type": "string"
          },
          "urls": {
            "$ref": "#/components/schemas/ApiTaskURLs"
          },
          "watermarkAnalysis": {
            "description": "有识别分析报告（每个水印每一段的状态、需要复核的区间），用 getWatermarkAnalysis 读取；水印追踪、本机去水印成功后才有",
            "type": "boolean"
          },
          "watermarkFind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WatermarkFindReport",
                "description": "自动查找水印（watermark-find）成功后的候选水印；其他任务为 null"
              },
              {
                "type": "null"
              }
            ],
            "description": "自动查找水印（watermark-find）成功后的候选水印；其他任务为 null"
          },
          "watermarkRevision": {
            "description": "这次水印追踪的原尺寸遮罩可复用：提交去水印时 params.value.revisionId 传本任务 ID，直接用这份遮罩、不再重新识别",
            "type": "boolean"
          }
        },
        "required": [
          "urls",
          "estimatedRemainingSeconds",
          "id",
          "assetId",
          "assetName",
          "assetDeleted",
          "sourceVersionId",
          "sourceVersionIndex",
          "toolId",
          "toolName",
          "params",
          "costCredits",
          "status",
          "progress",
          "modelLoading",
          "queuePosition",
          "queueRunning",
          "error",
          "outputVersionId",
          "outputVersionIndex",
          "outputVersionDeleted",
          "report",
          "maskPreviewUrl",
          "watermarkAnalysis",
          "watermarkRevision",
          "watermarkFind",
          "createdAt",
          "startedAt",
          "processingStartedAt",
          "processingStartProgress",
          "finishedAt"
        ],
        "type": "object"
      },
      "ApiTaskURLs": {
        "additionalProperties": true,
        "properties": {
          "cancel": {
            "description": "POST 取消任务的同源相对路径",
            "type": "string"
          },
          "result": {
            "description": "获取结果及刷新签名下载地址的同源相对路径",
            "type": "string"
          },
          "status": {
            "description": "查询任务状态的同源相对路径",
            "type": "string"
          }
        },
        "required": [
          "status",
          "result",
          "cancel"
        ],
        "type": "object"
      },
      "ApiTaskPage": {
        "additionalProperties": true,
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/ApiTask"
            },
            "type": "array"
          },
          "nextCursor": {
            "description": "下一页游标；null 表示没有更多记录",
            "type": [
              "string",
              "null"
            ]
          }
        },
        "required": [
          "items",
          "nextCursor"
        ],
        "type": "object"
      },
      "ApiTaskResult": {
        "additionalProperties": true,
        "properties": {
          "maskPreviewUrl": {
            "type": [
              "string",
              "null"
            ]
          },
          "output": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/AssetVersion",
                "description": "文件处理任务的输出版本；报告与遮罩预览类任务为空"
              },
              {
                "type": "null"
              }
            ],
            "description": "文件处理任务的输出版本；报告与遮罩预览类任务为空"
          },
          "report": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/DetectReport"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "$ref": "#/components/schemas/TaskStatus"
          },
          "taskId": {
            "type": "string"
          },
          "urlExpiresAt": {
            "description": "本次签名文件链接的有效期；到期重新 GET result，勿重新提交任务",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "watermarkAnalysisUrl": {
            "description": "使用 API Key 请求的分析报告地址",
            "type": [
              "string",
              "null"
            ]
          },
          "watermarkFind": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WatermarkFindReport"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "taskId",
          "status",
          "output",
          "report",
          "watermarkFind",
          "maskPreviewUrl",
          "watermarkAnalysisUrl",
          "urlExpiresAt"
        ],
        "type": "object"
      },
      "WatermarkAnalysis": {
        "additionalProperties": true,
        "properties": {
          "frames": {
            "format": "int64",
            "type": "integer"
          },
          "height": {
            "format": "int64",
            "type": "integer"
          },
          "marksHash": {
            "description": "标记的规范化哈希",
            "type": "string"
          },
          "objects": {
            "description": "每个水印（同一水印同时出现在几处时各一项，objectId 相同）",
            "items": {
              "$ref": "#/components/schemas/WatermarkAnalysisObject"
            },
            "type": "array"
          },
          "policy": {
            "description": "不确定策略：skip / legacy / bridge",
            "type": "string"
          },
          "rate": {
            "description": "帧率（帧号与毫秒的换算）",
            "format": "double",
            "type": "number"
          },
          "review": {
            "description": "需要复核的区间（按时间排序）",
            "items": {
              "$ref": "#/components/schemas/WatermarkReview"
            },
            "type": "array"
          },
          "static": {
            "description": "不带时间的标记（整段固定处理）的说明",
            "items": {
              "$ref": "#/components/schemas/WatermarkStaticNote"
            },
            "type": "array"
          },
          "version": {
            "format": "int64",
            "type": "integer"
          },
          "width": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "version",
          "marksHash",
          "policy",
          "frames",
          "rate",
          "width",
          "height",
          "objects",
          "review",
          "static"
        ],
        "type": "object"
      },
      "WatermarkAnalysisObject": {
        "additionalProperties": true,
        "properties": {
          "color": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WatermarkColor",
                "description": "自动估计的水印颜色；没有稳定的纯色证据为 null"
              },
              {
                "type": "null"
              }
            ],
            "description": "自动估计的水印颜色；没有稳定的纯色证据为 null"
          },
          "intervals": {
            "description": "有候选的时间段（没有候选的时间不在其中）",
            "items": {
              "$ref": "#/components/schemas/WatermarkInterval"
            },
            "type": "array"
          },
          "name": {
            "description": "内部名称（#0、#0.1）",
            "type": "string"
          },
          "objectId": {
            "description": "水印编号；旧标记没有编号为 null",
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "pose": {
            "description": "位姿检测的每次尝试",
            "items": {
              "$ref": "#/components/schemas/WatermarkPoseAttempt"
            },
            "type": "array"
          },
          "shape": {
            "$ref": "#/components/schemas/WatermarkShape"
          }
        },
        "required": [
          "objectId",
          "name",
          "intervals",
          "shape",
          "color",
          "pose"
        ],
        "type": "object"
      },
      "WatermarkColor": {
        "additionalProperties": true,
        "properties": {
          "alpha": {
            "description": "不透明度中位数（启发式）",
            "format": "double",
            "type": "number"
          },
          "rgb": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "maxItems": 3,
            "minItems": 3,
            "type": "array"
          },
          "samples": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "rgb",
          "samples",
          "alpha"
        ],
        "type": "object"
      },
      "WatermarkInterval": {
        "additionalProperties": true,
        "properties": {
          "endFrame": {
            "format": "int64",
            "type": "integer"
          },
          "endMs": {
            "format": "int64",
            "type": "integer"
          },
          "reasons": {
            "description": "原因码（前端按码显示说明），如 match、bg_clutter、score_between、template_ambiguous（分数够但模板在背景上也能到这么高）、arb_rejected（这一帧没有可靠位置）、pose_inferred（位姿插值 / 延伸的推断帧）、handoff_conflict、bridged、auto_color",
            "items": {
              "type": "string"
            },
            "type": "array"
          },
          "source": {
            "description": "决定来源：observed / pose / bridge / manual / user-absent；空串 = 没有选中的候选",
            "type": "string"
          },
          "startFrame": {
            "format": "int64",
            "type": "integer"
          },
          "startMs": {
            "format": "int64",
            "type": "integer"
          },
          "state": {
            "$ref": "#/components/schemas/WatermarkState"
          }
        },
        "required": [
          "startFrame",
          "endFrame",
          "startMs",
          "endMs",
          "state",
          "source",
          "reasons"
        ],
        "type": "object"
      },
      "WatermarkState": {
        "enum": [
          "present",
          "bridge",
          "manual",
          "uncertain",
          "absent"
        ],
        "type": "string"
      },
      "WatermarkPoseAttempt": {
        "additionalProperties": true,
        "properties": {
          "detail": {
            "type": "string"
          },
          "ok": {
            "type": "boolean"
          },
          "reason": {
            "description": "失败原因码：too_few_anchors / align_failed / no_separation / empty",
            "type": "string"
          },
          "source": {
            "type": "string"
          }
        },
        "required": [
          "source",
          "ok",
          "reason",
          "detail"
        ],
        "type": "object"
      },
      "WatermarkShape": {
        "additionalProperties": true,
        "properties": {
          "quality": {
            "description": "refined / user / box / keyframe / fallback / sibling（碎片，用另一关键帧的形状）/ invalid（形状无效，不执行）/ stroke（涂抹按笔画收紧）",
            "type": "string"
          },
          "reason": {
            "description": "自动收紧失败的原因",
            "type": "string"
          }
        },
        "required": [
          "quality",
          "reason"
        ],
        "type": "object"
      },
      "WatermarkReview": {
        "additionalProperties": true,
        "properties": {
          "box": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/WatermarkBox",
                "description": "检测到的位置（相对画面）：audit_event 有，其余为 null"
              },
              {
                "type": "null"
              }
            ],
            "description": "检测到的位置（相对画面）：audit_event 有，其余为 null"
          },
          "endFrame": {
            "format": "int64",
            "type": "integer"
          },
          "endMs": {
            "format": "int64",
            "type": "integer"
          },
          "name": {
            "type": "string"
          },
          "objectId": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "reason": {
            "description": "handoff_conflict（几个来源的位置冲突）/ bridged（短空档补全）/ long_uncertain（较长时间不确定）/ position_jump（位置跳变）/ appear / disappear / pose_failed / pose_unconfirmed（只有位姿检测、接不上可信证据，未处理）/ layout_conflict（与一起移动的另一个水印在其关键帧上的位置对不上，未处理）/ shape_invalid（关键帧上只认出水印的碎片，未处理）/ blurred_unseen（画面太糊、看不见水印，未处理）/ layout_unverified（按一起移动的另一个水印推算的位置没能确认，未处理）/ audit_event（首尾、跳变处在没处理的位置检测到短暂出现的水印，未处理，见 box）/ residue（去除后疑似残留）",
            "type": "string"
          },
          "score": {
            "description": "检测分数（启发式的 z 分数，不是置信度）：audit_event 有，其余为 null",
            "format": "double",
            "type": [
              "number",
              "null"
            ]
          },
          "startFrame": {
            "format": "int64",
            "type": "integer"
          },
          "startMs": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "objectId",
          "name",
          "startFrame",
          "endFrame",
          "startMs",
          "endMs",
          "reason",
          "box",
          "score"
        ],
        "type": "object"
      },
      "WatermarkStaticNote": {
        "additionalProperties": true,
        "properties": {
          "name": {
            "type": "string"
          },
          "objectId": {
            "format": "int64",
            "type": [
              "integer",
              "null"
            ]
          },
          "reason": {
            "type": "string"
          },
          "shape": {
            "type": "string"
          }
        },
        "required": [
          "objectId",
          "name",
          "shape",
          "reason"
        ],
        "type": "object"
      },
      "Tool": {
        "additionalProperties": true,
        "properties": {
          "animated": {
            "description": "能处理动图（多帧的 GIF / WebP / APNG / AVIF）：每一帧都处理，产物沿用原格式；为 false 的图片工具不接受动图",
            "type": "boolean"
          },
          "animatedPrice": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolPrice",
                "description": "处理动图的价格（积分）：bands 非空时按每帧分档；为空时按视频 U 连续计价，另加 fixedCredits 并受 minCredits 限制。null 表示不处理动图或暂未开放"
              },
              {
                "type": "null"
              }
            ],
            "description": "处理动图的价格（积分）：bands 非空时按每帧分档；为空时按视频 U 连续计价，另加 fixedCredits 并受 minCredits 限制。null 表示不处理动图或暂未开放"
          },
          "billing": {
            "$ref": "#/components/schemas/ToolBilling"
          },
          "description": {
            "type": "string"
          },
          "group": {
            "$ref": "#/components/schemas/ToolGroup"
          },
          "id": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/MediaKind"
          },
          "limits": {
            "$ref": "#/components/schemas/MediaLimits",
            "description": "对处理后画面的上限（超分按放大后的尺寸计算；时长、帧数按输入计算），超限的任务会被拒绝"
          },
          "name": {
            "type": "string"
          },
          "param": {
            "$ref": "#/components/schemas/ToolParamSpec"
          },
          "price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolPrice",
                "description": "当前价格（积分）；null 表示暂未开放。实际消耗以 quoteTask 为准"
              },
              {
                "type": "null"
              }
            ],
            "description": "当前价格（积分）；null 表示暂未开放。实际消耗以 quoteTask 为准"
          },
          "tiers": {
            "description": "超分服务等级；其他工具为空数组",
            "items": {
              "$ref": "#/components/schemas/ToolTier"
            },
            "type": "array"
          }
        },
        "required": [
          "tiers",
          "id",
          "name",
          "description",
          "kind",
          "group",
          "param",
          "price",
          "billing",
          "limits",
          "animated",
          "animatedPrice"
        ],
        "type": "object"
      },
      "ToolPrice": {
        "additionalProperties": true,
        "properties": {
          "bands": {
            "description": "按输出像素分档的每次价格（像素上限递增）；为空表示不分档",
            "items": {
              "$ref": "#/components/schemas/PriceBandResponse"
            },
            "type": "array"
          },
          "fixedCredits": {
            "description": "每任务固定费（积分）；整单费用不低于 minCredits",
            "format": "int64",
            "type": "integer"
          },
          "minCredits": {
            "format": "int64",
            "type": "integer"
          },
          "unitCredits": {
            "format": "int64",
            "type": "integer"
          },
          "unitDivisor": {
            "description": "单价分母，实际单价为 unitCredits / unitDivisor；用整数精确表达小数价格",
            "format": "int64",
            "type": "integer"
          },
          "unitSize": {
            "description": "每计量单位的像素或像素帧数；0 表示沿用默认 U，图片为1600万像素、视频为62208000像素帧",
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "unitCredits",
          "minCredits",
          "fixedCredits",
          "unitSize",
          "unitDivisor",
          "bands"
        ],
        "type": "object"
      },
      "PriceBandResponse": {
        "additionalProperties": true,
        "properties": {
          "credits": {
            "description": "这一档每次的积分",
            "format": "int64",
            "maximum": 10000000,
            "minimum": 0,
            "type": "integer"
          },
          "maxPixels": {
            "description": "这一档输出像素（宽 × 高）的上限",
            "format": "int64",
            "maximum": 1000000000,
            "minimum": 1,
            "type": "integer"
          }
        },
        "required": [
          "maxPixels",
          "credits"
        ],
        "type": "object"
      },
      "ToolBilling": {
        "enum": [
          "fixed",
          "work"
        ],
        "type": "string"
      },
      "ToolGroup": {
        "enum": [
          "enhance",
          "restore",
          "detect"
        ],
        "type": "string"
      },
      "ToolParamSpec": {
        "oneOf": [
          {
            "additionalProperties": true,
            "properties": {
              "type": {
                "const": "none",
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "default": {
                "format": "int64",
                "type": "integer"
              },
              "options": {
                "items": {
                  "format": "int64",
                  "type": "integer"
                },
                "type": "array"
              },
              "smallInputMaxPixels": {
                "format": "int64",
                "type": "integer"
              },
              "smallInputMaxSide": {
                "format": "int64",
                "type": "integer"
              },
              "type": {
                "const": "scale",
                "type": "string"
              }
            },
            "required": [
              "type",
              "default",
              "options",
              "smallInputMaxPixels",
              "smallInputMaxSide"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "default": {
                "format": "int64",
                "type": "integer"
              },
              "options": {
                "items": {
                  "format": "int64",
                  "type": "integer"
                },
                "type": "array"
              },
              "type": {
                "const": "fps",
                "type": "string"
              }
            },
            "required": [
              "type",
              "default",
              "options"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "adjustable": {
                "type": "boolean"
              },
              "default": {
                "type": "boolean"
              },
              "type": {
                "const": "faceProtect",
                "type": "string"
              }
            },
            "required": [
              "type",
              "adjustable",
              "default"
            ],
            "type": "object"
          },
          {
            "additionalProperties": true,
            "properties": {
              "maxRegions": {
                "format": "int64",
                "type": "integer"
              },
              "type": {
                "const": "regions",
                "type": "string"
              }
            },
            "required": [
              "type",
              "maxRegions"
            ],
            "type": "object"
          }
        ]
      },
      "ToolTier": {
        "additionalProperties": true,
        "properties": {
          "animatedAvailable": {
            "description": "此等级已配置动图价格且节点支持动图输出",
            "type": "boolean"
          },
          "animatedPrice": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolPrice",
                "description": "此等级的动图价格；null 表示暂未开放"
              },
              {
                "type": "null"
              }
            ],
            "description": "此等级的动图价格；null 表示暂未开放"
          },
          "animatedScales": {
            "description": "动图可用倍率；与静态图片分别检查价格和节点能力",
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          },
          "available": {
            "description": "等级已定价且节点支持相应输出格式；具体尺寸和中间步骤能力以报价为准",
            "type": "boolean"
          },
          "description": {
            "type": "string"
          },
          "id": {
            "$ref": "#/components/schemas/ProcessingTier"
          },
          "imageUnitMultiplier": {
            "description": "图片畅享包标准张数倍率",
            "format": "int64",
            "type": "integer"
          },
          "limits": {
            "$ref": "#/components/schemas/MediaLimits"
          },
          "name": {
            "type": "string"
          },
          "price": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/ToolPrice"
              },
              {
                "type": "null"
              }
            ]
          },
          "scales": {
            "items": {
              "format": "int64",
              "type": "integer"
            },
            "type": "array"
          }
        },
        "required": [
          "id",
          "name",
          "description",
          "scales",
          "price",
          "limits",
          "available",
          "animatedScales",
          "animatedPrice",
          "animatedAvailable",
          "imageUnitMultiplier"
        ],
        "type": "object"
      },
      "WalletSummary": {
        "additionalProperties": true,
        "properties": {
          "balanceCredits": {
            "description": "可用积分余额（含未到期的赠送积分，不含进行中任务的冻结额度）",
            "format": "int64",
            "type": "integer"
          },
          "generationAvailableCredits": {
            "description": "图片生成可用余额，已扣除冻结积分。视频生成请以所选模型和规格的预估为准。",
            "format": "int64",
            "type": "integer"
          },
          "giftCredits": {
            "description": "其中当前可用的免费赠送积分，含历史永久注册礼",
            "format": "int64",
            "type": "integer"
          },
          "giftExpiresAt": {
            "description": "最早一批免费赠送积分的到期时间；没有有期限的免费赠分时为 null",
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "giftExpiringCredits": {
            "description": "最早到期的那一批还剩的积分",
            "format": "int64",
            "type": "integer"
          },
          "processingOnlyCredits": {
            "description": "钱包可用余额中无法用于图片生成的部分，其中符合条件的套餐积分也可用于 Seedance 高清成片。",
            "format": "int64",
            "type": "integer"
          },
          "purchasedCredits": {
            "format": "int64",
            "type": "integer"
          },
          "reservedCredits": {
            "description": "进行中任务冻结的积分，不是消费；成功后仅按实际用量记一笔消费，失败或取消释放",
            "format": "int64",
            "type": "integer"
          },
          "seedanceHDAvailableCredits": {
            "description": "新 Seedance 高清成片可用的已核验付款余额，含符合费率下限的充值与套餐积分，扣除冻结。480P 可用额度按资金组报价。",
            "format": "int64",
            "type": "integer"
          },
          "subscriptionCredits": {
            "format": "int64",
            "type": "integer"
          },
          "subscriptionExpiresAt": {
            "format": "date-time",
            "type": [
              "string",
              "null"
            ]
          },
          "subscriptionExpiringCredits": {
            "format": "int64",
            "type": "integer"
          }
        },
        "required": [
          "generationAvailableCredits",
          "seedanceHDAvailableCredits",
          "processingOnlyCredits",
          "reservedCredits",
          "subscriptionExpiresAt",
          "subscriptionExpiringCredits",
          "subscriptionCredits",
          "purchasedCredits",
          "balanceCredits",
          "giftCredits",
          "giftExpiresAt",
          "giftExpiringCredits"
        ],
        "type": "object"
      }
    }
  }
}