{
  "openapi": "3.0.0",
  "info": {
    "title": "AI 视频生成器",
    "description": "# 概览\nYouCam AI 视频生成器能把文字提示和图片变成引人入胜的视频，操作轻松。依托先进 AI 技术，生成逼真的动态效果，让您的点子与照片活起来。还有大量经过专业调校的模板，静态图片很快就能变成好看好玩的高画质视频内容。\n\n想用 AI 生成 AI 视频，请挑一张背景干净、人物清楚的照片。上传图片即可，剩下的交给 YouCam AI 视频生成器，转眼之间就把您的文字提示与照片做成一段动感视频。\n\n使用场景：\n\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/webp_Animate%20Photo_047_d9e1cff579.jpg)\n\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/AI_Dance_Video_61cf4c58d1.png)\n\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/241216_AI_Kiss_image05_c3b7f1ac5b.jpg)\n\n\n## 文件规格与错误码\n\n* 支持的格式与尺寸\n\n|AI 功能|支持尺寸|支持文件大小|支持格式|\n|  ----  | ----  | ----  | ----  |\n| V1.0 图生视频（标准版） |输入：>= 300*300px，宽高比介于 1:2.5 ~ 2.5:1。输出：最高 720p 30fps|输入：<10MB。输出：5 秒或 10 秒|jpg/jpeg/png|\n| V1.0 图生视频（专业版） |输入：>= 300*300px，宽高比介于 1:2.5 ~ 2.5:1。输出：最高 1080p 30fps|输入：<10MB。输出：5 秒或 10 秒|jpg/jpeg/png|\n| V2.0 图生视频 | 输入图片长边不超过 4096 像素，宽高比介于 1:2.5 与 2.5:1 之间。 <br> 支持的输出分辨率为 480p、720p、1080p。若输入图片短边大于所选分辨率，或长边小于目标分辨率，引擎会自动缩放，使短边与所选分辨率一致。 |输入：<10MB。输出：5 秒或 10 秒|jpg/jpeg/png|\n\n* 错误码\n\n| 错误类别 | 场景 / 说明 | 建议处理 |\n| -------------- | ---------------------- | ---------------- |\n| 请求参数无效 | 请求参数无效或缺失 | 确认所有请求参数填写正确 |\n| | 参数取值无效（例如密钥有误、取值不合法） | 查看响应中的错误信息字段，修正请求参数 |\n| | 请求方法有误 | 查阅接口文档，改用正确的 HTTP 方法 |\n| | 请求的资源不存在（例如模型未找到） | 参照响应中的错误信息字段修正请求参数|\n| 触发策略 | 触发平台策略 | 检查是否有违反平台策略之处 |\n| | 触发内容安全策略  | 检查并修改输入内容后重新发起请求 |\n| | 请求频率过高（超出限流）| 降低请求频率、稍后重试，或联系客服提升额度 |\n| | 并发或 QPS 超出配额   | 降低请求频率，或稍后重试 |\n| 内部错误  | 服务器内部错误 | 稍后重试或联系客服 |\n| | 服务器暂时不可用 | 稍后重试或联系客服 |\n| | 请求积压导致内部超时| 稍后重试或联系客服 |\n\n---\n\n## 点数消耗\n\n| AI 功能 | 消耗点数 |\n|---|---|\n| AI 视频生成器（标准版） V1.0 | 3（每秒）* |\n| AI 视频生成器（专业版） V1.0 | 6（每秒）* |\n| AI 视频生成器（图生视频） V2.0 | 1 点数（480p / 每秒）* <br> 2 点数（720p / 每秒）* <br> 3 点数（1080p / 每秒）* |\n| AI 视频生成器（文生视频） V2.0 | 2 点数（720p / 每秒）* <br> 3 点数（1080p / 每秒）* |\n\n    > *若图片数量或视频时长不能整除，点数按向上取整计算。\n\n---\n",
    "version": "",
    "termsOfService": "https://www.makeupar.com/perfectbeauty/youcam/terms-of-service-api",
    "contact": {
      "email": "YouCamOnlineEditor_API@perfectcorp.com"
    },
    "license": {
      "name": "Privacy policy",
      "url": "https://www.makeupar.com/perfectbeauty/youcam/privacy-policy-api"
    }
  },
  "servers": [
    {
      "url": "https://yce-api-01.makeupar.com"
    }
  ],
  "tags": [
    {
      "name": "V2.0",
      "description": "用 AI 图生视频让照片动起来：上传一张图片、写一段描述，系统就会借助先进 AI 技术把它变成充满动感的画面。不用学任何剪辑工具，就能享受高质量的图生视频。"
    },
    {
      "name": "V1.0",
      "description": "用 AI 图生视频，只需一张照片就能看到它动起来、有了神采。先进的人工智能把静态图片变成动态画面，没有任何剪辑经验也能做出出色视频，体验最好的 AI 图生视频创作。"
    }
  ],
  "paths": {
    "/s2s/v2.0/task/template/image-to-video": {
      "get": {
        "summary": "列出预置模板。",
        "tags": [
          "V1.0"
        ],
        "security": [
          {
            "BearerAuthenticationV2": []
          }
        ],
        "parameters": [
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "example": 20
            },
            "description": "本页返回的条目数量，取值 1 到 20，默认 20。"
          },
          {
            "name": "starting_token",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "73a3c9e69b89"
            },
            "description": "本页的起始 token。第一页传 `null`，之后用上一次响应里的 `next_token` 作为下一页的起点"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/TemplateResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidParameters"
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          }
        }
      }
    },
    "/s2s/v2.0/task/image-to-video": {
      "post": {
        "summary": "执行 AI 图片生成器视频 任务。",
        "description": "本接口用于发起 AI 图片生成器视频流程。您需要提供模板 ID 与源文件（URL 或文件 ID）。任务会异步处理，您可以使用本响应返回的 task_id 查询其状态。\n",
        "tags": [
          "V1.0"
        ],
        "security": [
          {
            "BearerAuthenticationV2": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/RunWithSingleTemplateAndSrcUrl"
                  },
                  {
                    "type": "object",
                    "required": [
                      "dst_duration"
                    ],
                    "properties": {
                      "dst_duration": {
                        "type": "integer",
                        "description": "视频时长（秒），只接受 5 秒或 10 秒\n",
                        "enum": [
                          5,
                          10
                        ]
                      },
                      "mode": {
                        "type": "string",
                        "enum": [
                          "std",
                          "pro"
                        ],
                        "description": "画质模式。标准模式（std）速度更快、画质够用；专业模式（pro）画质最佳、细节更丰富。未提供时按风格自动选择最合适的模式。"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "任务执行成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasicRunTaskResponseV2"
                }
              }
            }
          },
          "400": {
            "description": "任务执行失败",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RunError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/s2s/v2.0/task/image-to-video/{task_id}": {
      "get": {
        "summary": "查询 AI 图片生成器视频 任务的状态。",
        "tags": [
          "V1.0"
        ],
        "security": [
          {
            "BearerAuthenticationV2": []
          }
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe"
            },
            "description": "要查询的任务 ID"
          }
        ],
        "responses": {
          "200": {
            "description": "任务状态查询成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VidTaskStatusResponseV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidTaskId"
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "500": {
            "$ref": "#/components/responses/TaskTimeout"
          }
        }
      }
    },
    "/s2s/v2.0/task/image-to-video/youcam": {
      "post": {
        "summary": "执行 AI 图片生成器视频（V2） 任务。",
        "description": "AI 任务是异步处理的。功能支持 Webhook 时，优先用 Webhook 来接收完成通知。配置好您的 Webhook 端点、校验 Webhook 签名，收到 `success` 或 `error` 通知后，用收到的 `task_id` 查询任务结果。配置与校验的细节请见 [Webhook 接入指南](/develop/webhook.md)。\n\n若功能不支持 Webhook，或您的接入方式用不了 Webhook，就请实现轮询。提交 AI 任务后，按固定间隔（例如每 10 秒）轮询状态接口，直到任务状态变为 `success` 或 `error`。\n",
        "tags": [
          "V2.0"
        ],
        "security": [
          {
            "BearerAuthenticationV2": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BasicRunTaskV2"
                  },
                  {
                    "type": "object",
                    "required": [
                      "resolution",
                      "dst_duration"
                    ],
                    "properties": {
                      "resolution": {
                        "type": "string",
                        "description": "选择推理所用输出分辨率。",
                        "enum": [
                          "480",
                          "720",
                          "1080"
                        ],
                        "example": "480"
                      },
                      "dst_duration": {
                        "type": "integer",
                        "description": "选择推理所用输出时长。",
                        "enum": [
                          5,
                          10
                        ],
                        "example": 5
                      },
                      "prompt": {
                        "minLength": 1,
                        "maxLength": 1500,
                        "type": "string",
                        "description": "可用任意语言书写，会经 Gemini API 自动优化并转成英文。提示词越短越好。",
                        "example": "その女性は微笑んで、カメラを見ています"
                      },
                      "negative_prompt": {
                        "minLength": 1,
                        "maxLength": 1500,
                        "type": "string",
                        "description": "反向提示词。",
                        "example": "worst quality, low quality, JPEG compression residue, ugly."
                      },
                      "model": {
                        "type": "string",
                        "description": "模型名称。",
                        "enum": [
                          "youcam-video-v2"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "任务执行成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasicRunTaskResponseV2"
                }
              }
            }
          },
          "400": {
            "description": "任务执行失败",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RunError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/s2s/v2.0/task/image-to-video/youcam/{task_id}": {
      "get": {
        "summary": "查询 AI 图片生成器视频（V2） 任务的状态。",
        "tags": [
          "V2.0"
        ],
        "security": [
          {
            "BearerAuthenticationV2": []
          }
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe"
            },
            "description": "要查询的任务 ID"
          }
        ],
        "responses": {
          "200": {
            "description": "任务状态查询成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VidTaskStatusResponseV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidTaskId"
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "500": {
            "$ref": "#/components/responses/TaskTimeout"
          }
        }
      }
    },
    "/s2s/v2.0/task/text-to-video/youcam": {
      "post": {
        "summary": "执行 文字生成视频 任务。",
        "description": "AI 任务是异步处理的。功能支持 Webhook 时，优先用 Webhook 来接收完成通知。配置好您的 Webhook 端点、校验 Webhook 签名，收到 `success` 或 `error` 通知后，用收到的 `task_id` 查询任务结果。配置与校验的细节请见 [Webhook 接入指南](/develop/webhook.md)。\n\n若功能不支持 Webhook，或您的接入方式用不了 Webhook，就请实现轮询。提交 AI 任务后，按固定间隔（例如每 10 秒）轮询状态接口，直到任务状态变为 `success` 或 `error`。\n",
        "tags": [
          "V2.0"
        ],
        "security": [
          {
            "BearerAuthenticationV2": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "type": "object",
                    "required": [
                      "prompt",
                      "dst_duration"
                    ],
                    "properties": {
                      "model": {
                        "type": "string",
                        "description": "模型名称。",
                        "default": "youcam-video-v2",
                        "enum": [
                          "youcam-video-v2"
                        ]
                      },
                      "prompt": {
                        "minLength": 1,
                        "maxLength": 5000,
                        "type": "string",
                        "description": "文字提示词，描述视频内容与视觉风格。\n支持中英文，每个汉字或字母计 1 字符。\n",
                        "example": "A kitten running in the moonlight."
                      },
                      "negative_prompt": {
                        "minLength": 1,
                        "maxLength": 500,
                        "type": "string",
                        "description": "反向提示词，描述视频中要排除的内容，用于约束输出。\n支持中英文。\n",
                        "example": "low resolution, error, worst quality, low quality, disfigured, extra fingers, bad proportions."
                      },
                      "resolution": {
                        "type": "string",
                        "description": "生成视频的分辨率档位，决定清晰度（总像素数）。",
                        "default": "1080P",
                        "enum": [
                          "720P",
                          "1080P"
                        ],
                        "example": "1080P"
                      },
                      "ratio": {
                        "type": "string",
                        "description": "生成视频的宽高比。\n\n各宽高比对应的输出视频分辨率（width*height）见下表：\n\n| 分辨率档位 | 宽高比 | 输出视频分辨率（width*height） |\n|:---|:---|:---|\n| **720P** | 16:9 | 1280*720 |\n| **720P** | 9:16 | 720*1280 |\n| **720P** | 1:1 | 960*960 |\n| **720P** | 4:3 | 1104*832 |\n| **720P** | 3:4 | 832*1104 |\n| **1080P** | 16:9 | 1920*1080 |\n| **1080P** | 9:16 | 1080*1920 |\n| **1080P** | 1:1 | 1440*1440 |\n| **1080P** | 4:3 | 1648*1248 |\n| **1080P** | 3:4 | 1248*1648 |\n",
                        "default": "16:9",
                        "enum": [
                          "16:9",
                          "9:16",
                          "1:1",
                          "4:3",
                          "3:4"
                        ],
                        "example": "16:9"
                      },
                      "dst_duration": {
                        "type": "integer",
                        "description": "生成视频的时长（秒）。",
                        "default": 5,
                        "minimum": 2,
                        "maximum": 15,
                        "example": 5
                      },
                      "prompt_extend": {
                        "type": "boolean",
                        "description": "开启提示词改写。开启后由大语言模型智能改写您输入的提示词，对短提示词效果更好，但耗时更长。",
                        "example": true,
                        "default": true,
                        "enum": [
                          true,
                          false
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "任务执行成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BasicRunTaskResponseV2"
                }
              }
            }
          },
          "400": {
            "description": "任务执行失败",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/RunError"
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "429": {
            "$ref": "#/components/responses/TooManyRequests"
          }
        }
      }
    },
    "/s2s/v2.0/task/text-to-video/youcam/{task_id}": {
      "get": {
        "summary": "查询 文字生成视频 任务的状态。",
        "tags": [
          "V2.0"
        ],
        "security": [
          {
            "BearerAuthenticationV2": []
          }
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "example": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe"
            },
            "description": "要查询的任务 ID"
          }
        ],
        "responses": {
          "200": {
            "description": "任务状态查询成功",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TaskStatusResponseV2"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidTaskId"
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "500": {
            "$ref": "#/components/responses/TaskTimeout"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuthenticationV2": {
        "type": "http",
        "scheme": "bearer",
        "description": "使用标准的 Bearer 鉴权。把您的 API 密钥放进请求头： `Authorization:Bearer YOUR_API_KEY`。请注意 'Bearer' 与 'YOUR_API_KEY' 之间有一个空格。"
      }
    },
    "schemas": {
      "Template": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "模板的 ID。运行任务时把它作为 `template_id` 使用。",
            "example": "good_template_001"
          },
          "thumb": {
            "type": "string",
            "description": "风格缩略图。"
          },
          "title": {
            "type": "string",
            "description": "模板名称。"
          },
          "category_name": {
            "type": "string",
            "description": "模板的类别名称。"
          }
        }
      },
      "RunWithSingleTemplate": {
        "title": "RunWithSingleTemplate",
        "type": "object",
        "properties": {
          "template_id": {
            "type": "string",
            "description": "模板 ID。请先调用列出预置模板的接口，再取用其中某个模板的 ID。",
            "example": "good_template_001"
          }
        },
        "required": [
          "template_id"
        ]
      },
      "BasicRunTaskV2SrcFileUrl": {
        "type": "object",
        "required": [
          "src_file_url"
        ],
        "properties": {
          "src_file_url": {
            "type": "string",
            "description": "用于运行任务的文件 URL，该 URL 需可公开访问。",
            "example": "https://example.com/selfie.jpg"
          }
        }
      },
      "BasicRunTaskV2SrcFileId": {
        "type": "object",
        "required": [
          "src_file_id"
        ],
        "properties": {
          "src_file_id": {
            "type": "string",
            "description": "用于运行任务的文件 ID，取自上传文件接口返回的 file_id。",
            "example": "pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE="
          }
        }
      },
      "BasicRunTaskV2": {
        "title": "BasicRunTaskV2",
        "anyOf": [
          {
            "title": "用源文件 URL 运行任务",
            "allOf": [
              {
                "$ref": "#/components/schemas/BasicRunTaskV2SrcFileUrl"
              }
            ]
          },
          {
            "title": "用源文件 ID 运行任务",
            "allOf": [
              {
                "$ref": "#/components/schemas/BasicRunTaskV2SrcFileId"
              }
            ]
          }
        ]
      },
      "RunWithSingleTemplateAndSrcUrl": {
        "title": "RunWithSingleTemplateAndSrcUrl",
        "allOf": [
          {
            "$ref": "#/components/schemas/RunWithSingleTemplate"
          },
          {
            "$ref": "#/components/schemas/BasicRunTaskV2"
          }
        ]
      },
      "BasicRunTaskResponseV2": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "响应状态",
            "example": 200
          },
          "data": {
            "type": "object",
            "properties": {
              "task_id": {
                "type": "string",
                "description": "该任务的 ID。凭这个 ID 可在 24 小时内查询任务结果。",
                "example": "grH0CvsgXuAIHLUzD0V1Ol34hoet3R1tvdbtiVHrDb6_UqCLKIejAIajwxrhOAfe"
              }
            }
          }
        }
      },
      "RunError": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "响应状态",
            "example": 400
          },
          "error": {
            "type": "string",
            "description": "错误信息",
            "example": "The operation could not be completed"
          },
          "error_code": {
            "type": "string",
            "enum": [
              "InvalidParameters",
              "CreditInsufficiency",
              "InvalidStyleGroup",
              "InvalidStyle",
              "BadRequest"
            ],
            "description": "错误码：\n  * InvalidParameters - 请求参数无效\n  * CreditInsufficiency - 点数不足，无法运行\n  * BadRequest - 请求参数不符合预期\n  * InvalidStyleGroup - 风格分组 ID 无效\n  * InvalidStyle - 风格 ID 无效\n"
          }
        }
      },
      "EngineErrorCode": {
        "type": "string",
        "nullable": true,
        "enum": [
          "error_exceed_max_image_size",
          "exceed_max_filesize",
          "invalid_parameter",
          "error_download_image",
          "error_download_mask",
          "error_decode_image",
          "error_decode_mask",
          "error_nsfw_content_detected",
          "error_no_face",
          "error_pose",
          "error_face_parsing",
          "error_inference",
          "exceed_nsfw_retry_limits",
          "error_upload",
          "unknown_internal_error"
        ],
        "description": "错误码：\n- \\`error_exceed_max_image_size\\`  - 输入图片尺寸超出上限\n- \\`exceed_max_filesize\\` - 输入文件大小超出上限\n- \\`invalid_parameter\\` - 参数取值无效\n- \\`error_download_image\\` - 下载原图出错\n- \\`error_download_mask\\` - 下载蒙版图片出错\n- \\`error_decode_image\\` - 解码原图出错\n- \\`error_decode_mask\\` - 解码蒙版图片出错\n- \\`error_nsfw_content_detected\\` - 在原图中检测到不适宜内容（NSFW）\n- \\`error_no_face\\` - 原图中没有检测到人脸\n- \\`error_pose\\` - 原图的姿态检测失败\n- \\`error_face_parsing\\` - 原图的人脸分割失败\n- \\`error_inference\\` - 推理流程中出现错误\n- \\`exceed_nsfw_retry_limits\\` - 为避免生成不适宜内容， 重试次数已用尽\n- \\`error_upload\\` - 上传结果图片出错\n- \\`unknown_internal_error\\` - 其他错误\n"
      },
      "VidTaskStatusResponseBodySingleUrlResultsV2": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "下载该结果的 URL，有效期 2 小时",
            "example": "https://example.com/sample-result-url"
          }
        }
      },
      "VidTaskStatusResponseV2": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "响应状态",
            "example": 200
          },
          "data": {
            "type": "object",
            "properties": {
              "task_status": {
                "type": "string",
                "enum": [
                  "running",
                  "success",
                  "error"
                ],
                "description": "任务状态"
              },
              "error": {
                "$ref": "#/components/schemas/EngineErrorCode"
              },
              "error_message": {
                "type": "string",
                "description": "错误的详细说明"
              },
              "results": null
            }
          }
        },
        "$ref": "#/components/schemas/VidTaskStatusResponseBodySingleUrlResultsV2"
      },
      "TaskStatusResponseBodySingleUrlResultsV2": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "下载该结果的 URL，有效期 2 小时",
            "example": "https://example.com/sample-result-url"
          }
        }
      },
      "TaskStatusResponseV2": {
        "type": "object",
        "properties": {
          "status": {
            "type": "integer",
            "description": "响应状态",
            "example": 200
          },
          "data": {
            "type": "object",
            "properties": {
              "task_status": {
                "type": "string",
                "enum": [
                  "running",
                  "success",
                  "error"
                ],
                "description": "任务状态"
              },
              "error": {
                "$ref": "#/components/schemas/EngineErrorCode"
              },
              "error_message": {
                "type": "string",
                "description": "错误的详细说明"
              },
              "results": null
            }
          }
        },
        "$ref": "#/components/schemas/TaskStatusResponseBodySingleUrlResultsV2"
      }
    },
    "responses": {
      "TemplateResponse": {
        "description": "成功获取风格列表",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer",
                  "description": "响应状态",
                  "example": 200
                },
                "data": {
                  "type": "object",
                  "properties": {
                    "templates": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Template"
                      }
                    },
                    "next_token": {
                      "type": "string",
                      "example": "73a3c9e69b89",
                      "description": "用于查询下一页的 token。"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "InvalidParameters": {
        "description": "请求参数无效",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer",
                  "example": 400,
                  "description": "响应状态"
                },
                "error": {
                  "type": "string",
                  "example": "Invalid parameter value"
                },
                "error_code": {
                  "type": "string",
                  "example": "InvalidParameters"
                }
              }
            }
          }
        }
      },
      "InvalidApiKey": {
        "description": "API 密钥无效或缺失",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer",
                  "example": 401,
                  "description": "响应状态"
                },
                "error": {
                  "type": "string",
                  "example": "Invalid API key"
                }
              }
            }
          }
        }
      },
      "TooManyRequests": {
        "description": "请求过多",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer",
                  "example": 429,
                  "description": "响应状态"
                },
                "error": {
                  "type": "string",
                  "example": "Too many requests"
                }
              }
            }
          }
        }
      },
      "InvalidTaskId": {
        "description": "任务 ID 无效",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer",
                  "example": 400,
                  "description": "响应状态"
                },
                "error": {
                  "type": "string",
                  "example": "Invalid task ID"
                }
              }
            }
          }
        }
      },
      "TaskTimeout": {
        "description": "任务执行超时",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "status": {
                  "type": "integer",
                  "example": 500,
                  "description": "响应状态"
                },
                "error": {
                  "type": "string",
                  "example": "Task execution timed out"
                }
              }
            }
          }
        }
      }
    }
  }
}