{
  "openapi": "3.0.0",
  "info": {
    "title": "AI 耳环虚拟试戴",
    "description": "# 概览\nAI 耳环虚拟试戴，行业顶级方案\n领先的 AI 虚拟穿耳与耳环试戴模拟方案\n\n用一张 2D 图片就能做出真实灵动的 AI 耳环虚拟试戴，不必花钱做 3D 建模。我们的先进算法能生成栩栩如生的试戴效果，光影细腻、动态符合物理规律。\n\n## 接入指南\n本指南将带您走完全流程：\n\n*   **接口地址：** `/s2s/v2.0/task/2d-vto/earring`\n*   **鉴权：** 所有请求都需要 `Authorization: Bearer YOUR_API_KEY`\n*   **流程：**\n    1.  **准备自拍图片：** 上传一张图片，或提供有效的图片 URL\n    2.  **准备耳环图片：** 上传一张耳环商品图片，或提供有效的商品图片 URL\n    3.  **发起 AI 任务并获取 Task ID：** 从响应中取到 `task_id`。\n    4.  **轮询状态（`GET`）：** 用 `task_id` 查询任务状态，持续轮询直到 `task_status` 为 `\"success\"` 或 `\"error\"`。\n\n---\n\n* API Playground\n\n用官方在线调试台交互式地体验与测试接口：\n\n**API Playground：**\n[http://yce.makeupar.com/api-console/en/api-playground/ai-earring-virtual-try-on/](http://yce.makeupar.com/api-console/en/api-playground/ai-earring-virtual-try-on/)\n\n---\n\n* 鉴权\n- 请在请求头中以 **Bearer Token** 方式带上您的 API 密钥：\n    ```\n    Authorization: Bearer YOUR_API_KEY\n    ```\nAPI Key 可在 https://yce.makeupar.com/api-console/en/api-keys/ 获取。\n\n\n* 1. 上传图片\n\n您可以把文件直接上传到服务器，也可以在 VTO 任务参数中提供有效的图片 URL。\n\n   * 上传接口\n\n```\nPOST /s2s/v2.0/file\n```\n\n如果您已有公开可访问的图片 URL，这一步可以跳过。\n\n您可以把文件上传到 File 接口响应中给出的 URL，之后调用 AI 任务时使用 File 接口返回的 `src_file_id`；也可以在 VTO 任务参数中以 `src_file_url` 提供有效的图片 URL。`src_file_id` 或 `src_file_url` 就是虚拟试戴的目标图。\n\n您还需用 `ref_file_ids` 或 `ref_file_urls` 提供一张耳环商品图作为参考，套用到您的 `src_file_id` 或 `src_file_url` 上。\n\nAI 引擎支持自动去除耳环商品图的背景。您也可以为手部（`srcmsk_file_id` 或 `srcmsk_file_url`）或耳环商品（`refmsk_file_ids` 或 `refmsk_file_urls`）提供遮挡蒙版图，用于微调分割效果。\n\n---\n\n* 2. 创建 AI 耳环虚拟试戴任务并轮询结果\n\n图片和模板 ID 备齐后即可创建任务。接口异步处理请求，您需要轮询任务状态，直到状态变为 `success` 或 `error`。\n\n   * 创建任务接口\n\n```\nPOST /s2s/v2.0/task/2d-vto/earring\n```\n\n   * 轮询接口\n\n```\nGET /s2s/v2.0/task/2d-vto/earring/{task_id}\n```\n\n---\n\n## 文件规格与错误码\n\n* AI 耳环虚拟试戴规格\n\n**支持的耳环参考图**\n* 单只耳环的正面图，画面清楚、无遮挡。\n*   所有参数（包括锚点、蒙版、位置等）**仅**在参考图为**单只耳环**佩戴状态时生效。\n*   若试戴参考图中是**两只耳环**，全部参数都将采用**自动检测与默认设置**。\n*   **双耳**同时试戴时，以较清晰的那只耳朵为源，另一侧由镜像生成。\n\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/earring_product_01_41c943f9fc_037ffb1241.jpg) ![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/earring_product_07_5476e0a156_a69e8e6549.jpg)\n\n**支持的自拍图视角**\n\n*   AI 耳环虚拟试戴支持正脸图片，但侧脸图片的效果最好。\n\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/Earring_restriction_cdf1de3c7b.png)\n\n**earring\\_wearing\\_location: 长度为 2 的整数数组**\n指定在自拍图中要佩戴耳环的位置。\n默认值：null（使用引擎默认值）\n\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/wearing_location_b4f6f4453a.jpg)\n\n**earring\\_scale: 大于 0 的数值**\n按厘米控制耳环大小。\n默认值：null（使用引擎默认值）\n\n**earring\\_is\\_right\\_ear: boolean**\n表示耳环是否戴在右耳，默认戴在右耳。\n默认值：true\n\n**earring\\_occluded\\_type: number（枚举：0、1、2）**\n指定遮挡类型：\n0 为自动检测\n1 为有遮挡\n2 为无遮挡\n默认值：0\n\n**earring\\_shadow\\_intensity: float（0.0 到 1.0）**\n控制阴影强度：\n0.0 表示无阴影\n1.0 表示最大阴影\n默认值：0.15\n\n**earring\\_ambient\\_light\\_intensity: float（0.0 到 1.0）**\n定义光线在多大程度上参考自拍图：\n0.0 忽略自拍图的光线\n1.0 完全匹配自拍图的光线与阴影渲染\n默认值：1.0\n\n**earring\\_anchor\\_point: 像素坐标下 1 个点组成的数组（可选）**\n指定在耳环商品图中的佩戴位置。\n默认值：null（使用引擎默认值）\n\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/anchor_point_787282aa19.jpg)\n\n\n---\n\n* 支持的格式与尺寸\n\n|AI 功能|支持尺寸|支持文件大小|支持格式|\n|  ----  | ----  | ----  | ----  |\n|AI 耳环虚拟试戴|长边 <= 4096 |< 10MB|jpg/jpeg/png|\n\n* 错误码\n\n|错误码|说明|\n|  ----  | ----  |\n| RUNTIME_ERROR | 运行时发生未知错误 |\n| PHOTO_DETECTION_FAIL | 用户照片无法正确处理，例如未检测到手 |\n| OBJECT_DETECTION_FAIL | 商品照片无法正确处理，例如未检测到商品 |\n| PHOTO_CHECK_INVALID | 用户照片的姿态或尺寸不符合要求 |\n| INPUT_ERROR | 输入文件格式有误 |\n| INPUT_MAIN_IMAGE_EMPTY | 必须提供用户图片 |\n\n\n* 运行环境与依赖\n\n| 示例代码语言 / 工具 | 建议运行时版本 |\n|---|---|\n| cURL | - bash >= 3.2</br>   - curl >= 7.58 (modern TLS/HTTP support)</br>   - jq >= 1.6 (robust JSON parsing) |\n| Node.js (JavaScript) | Node >= 18 (for global fetch) |\n| JavaScript | - Chrome / Edge >= 80</br>   - Firefox >= 74</br>   - Safari >= 13.1 |\n| PHP | PHP >= 7.4 (for modern TLS/compat), ext-curl (recommended) or allow_url_fopen=On + ext-openssl, ext-json |\n| Python | Python >= 3.10 (for f-strings), requests >= 2.20.0 |\n| Java | Java 11+ (for HttpClient), Jackson Databind >= 2.12.0 |\n\n---\n\n## JS Camera Kit\n{% partial file=\"/_partials/js-camera-kit.md\" /%}\n\n---\n\n## 点数消耗\n\n| AI 功能 | 消耗点数 |\n|---|---|\n| AI 耳环虚拟试戴 V1.0 | 单件佩戴 1 点数 <br> 叠戴 2 点数 |\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": "V1.0",
      "description": "用 AI 处理上传的图片，生成 AI 耳环虚拟试戴体验，并支持对齐与阴影参数。"
    }
  ],
  "paths": {
    "/s2s/v2.0/task/2d-vto/earring": {
      "post": {
        "summary": "执行 AI 耳环虚拟试戴 任务。",
        "description": "本接口用于发起 AI 耳环虚拟试戴流程。您需要提供源文件与参考图（URL 或文件 ID），以及用于对齐、阴影与佩戴位置的具体参数。任务会异步处理，您可以使用本响应返回的 task_id 查询其状态。\n",
        "tags": [
          "V1.0"
        ],
        "security": [
          {
            "BearerAuthenticationV2": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EarringRunTaskV2"
              }
            }
          }
        },
        "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/2d-vto/earring/{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/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": {
      "EarringRunTaskV2": {
        "allOf": [
          {
            "$ref": "#/components/schemas/2dVtoRunTaskV2"
          },
          {
            "type": "object",
            "properties": {
              "object_infos": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "parameter": {
                      "type": "object",
                      "properties": {
                        "earring_need_remove_background": {
                          "type": "boolean",
                          "description": "耳环图片是否需要去除背景。",
                          "default": true,
                          "example": true
                        },
                        "earring_anchor_point": {
                          "type": "array",
                          "description": "耳环图片用于对齐的锚点。 <br>类型：2 个整数组成的列表 <br>范围：[x, y]（像素坐标） <br>默认：null（使用引擎默认值）",
                          "default": null,
                          "example": null,
                          "minItems": 2,
                          "maxItems": 2,
                          "items": {
                            "type": "integer"
                          }
                        },
                        "earring_wearing_location": {
                          "type": "array",
                          "description": "照片中要放置耳环的目标位置。 <br>类型：2 个整数组成的列表 <br>范围：[x, y]（像素坐标） <br>默认：null（使用引擎默认值）",
                          "default": null,
                          "example": null,
                          "minItems": 2,
                          "maxItems": 2,
                          "items": {
                            "type": "integer"
                          }
                        },
                        "earring_scale": {
                          "type": "number",
                          "description": "控制耳环的实际尺寸（厘米）。 <br>默认：null（使用引擎默认值）",
                          "default": null,
                          "minimum": 0,
                          "exclusiveMinimum": true,
                          "example": null
                        },
                        "earring_is_right_ear": {
                          "type": "boolean",
                          "description": "耳环是否戴在右耳，默认戴在右耳。",
                          "default": true,
                          "example": true
                        },
                        "earring_occluded_type": {
                          "type": "number",
                          "description": "耳环的遮挡类型：0 为自动检测，1 为有遮挡，2 为无遮挡。",
                          "default": 0,
                          "enum": [
                            0,
                            1,
                            2
                          ],
                          "example": 0
                        },
                        "earring_shadow_intensity": {
                          "type": "number",
                          "description": "耳环的阴影强度（取值越高阴影越深）。",
                          "minimum": 0,
                          "maximum": 1,
                          "default": 0.5,
                          "example": 0.5
                        },
                        "earring_ambient_light_intensity": {
                          "type": "number",
                          "description": "耳环的环境光调节强度。",
                          "minimum": 0,
                          "maximum": 1,
                          "default": 0.5,
                          "example": 0.5
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "BasicRunTaskV2SrcFileUrl": {
        "type": "object",
        "required": [
          "src_file_url"
        ],
        "properties": {
          "src_file_url": {
            "type": "string",
            "description": "用于运行任务的文件 URL，该 URL 需可公开访问。",
            "example": "https://example.com/selfie.jpg"
          }
        }
      },
      "2dVtoRunTaskV2SrcmskFileUrl": {
        "type": "object",
        "properties": {
          "srcmsk_file_url": {
            "type": "string",
            "description": "用于运行任务的源蒙版文件 URL，该 URL 需可公开访问。",
            "example": "https://example.com/src_mask.jpg"
          }
        }
      },
      "2dVtoRunTaskV2RefFileUrls": {
        "type": "object",
        "required": [
          "ref_file_urls"
        ],
        "properties": {
          "ref_file_urls": {
            "type": "array",
            "description": "用于运行任务的参考文件 URL，该 URL 需可公开访问。",
            "example": [
              "https://example.com/vto_sku.jpg"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "2dVtoRunTaskV2RefmskFileUrls": {
        "type": "object",
        "properties": {
          "refmsk_file_urls": {
            "type": "array",
            "description": "用于运行任务的参考蒙版文件 URL，该 URL 需可公开访问。",
            "example": [
              "https://example.com/vto_sku_mask.jpg"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "2dVtoRunTaskV2RefFileIds": {
        "type": "object",
        "required": [
          "ref_file_ids"
        ],
        "properties": {
          "ref_file_ids": {
            "type": "array",
            "description": "用于运行任务的参考文件 ID，取自上传文件接口返回的 file_id。",
            "example": [
              "pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE="
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "2dVtoRunTaskV2RefmskFileIds": {
        "type": "object",
        "properties": {
          "refmsk_file_ids": {
            "type": "array",
            "description": "用于运行任务的参考蒙版文件 ID，取自上传文件接口返回的 file_id。",
            "example": [
              "pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE="
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BasicRunTaskV2SrcFileId": {
        "type": "object",
        "required": [
          "src_file_id"
        ],
        "properties": {
          "src_file_id": {
            "type": "string",
            "description": "用于运行任务的文件 ID，取自上传文件接口返回的 file_id。",
            "example": "pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE="
          }
        }
      },
      "2dVtoRunTaskV2SrcmskFileId": {
        "type": "object",
        "properties": {
          "srcmsk_file_id": {
            "type": "string",
            "description": "用于运行任务的源蒙版文件 ID，取自上传文件接口返回的 file_id。",
            "example": "pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE="
          }
        }
      },
      "2dVtoRunTaskV2SrcInfo": {
        "type": "object",
        "required": [
          "source_info"
        ],
        "properties": {
          "source_info": {
            "type": "object",
            "description": "包含源图片的信息。",
            "properties": {
              "name": {
                "type": "string",
                "description": "源素材的 URL 或文件 ID。",
                "example": "https://example.com/selfie.jpg"
              },
              "mask_name": {
                "type": "string",
                "description": "源蒙版的 URL 或文件 ID。",
                "example": "https://example.com/src_mask.jpg"
              }
            },
            "required": [
              "name"
            ]
          }
        }
      },
      "2dVtoRunTaskV2ObjInfos": {
        "type": "object",
        "required": [
          "object_infos"
        ],
        "properties": {
          "object_infos": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "该列表中包含了多个对象的信息。",
              "properties": {
                "name": {
                  "type": "string",
                  "description": "参考图的 URL 或文件 ID，用于指定要匹配哪一张参考商品图。",
                  "example": "https://example.com/vto_sku.jpg"
                },
                "mask_name": {
                  "type": "string",
                  "description": "参考蒙版的 URL 或文件 ID，用于指定要匹配哪一张参考商品图。",
                  "example": "https://example.com/vto_sku_mask.jpg"
                }
              },
              "required": [
                "name"
              ]
            }
          }
        }
      },
      "2dVtoRunTaskV2": {
        "allOf": [
          {
            "anyOf": [
              {
                "allOf": [
                  {
                    "title": "以源文件 URL、源蒙版文件 URL、多张参考文件 URL 与多张参考蒙版文件 URL 运行任务"
                  },
                  {
                    "$ref": "#/components/schemas/BasicRunTaskV2SrcFileUrl"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2SrcmskFileUrl"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2RefFileUrls"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2RefmskFileUrls"
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "title": "以源文件 URL、源蒙版文件 URL、多张参考文件 ID 与多张参考蒙版文件 ID 运行任务"
                  },
                  {
                    "$ref": "#/components/schemas/BasicRunTaskV2SrcFileUrl"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2SrcmskFileUrl"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2RefFileIds"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2RefmskFileIds"
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "title": "以源文件 ID、源蒙版文件 ID、多张参考文件 URL 与多张参考蒙版文件 URL 运行任务"
                  },
                  {
                    "$ref": "#/components/schemas/BasicRunTaskV2SrcFileId"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2SrcmskFileId"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2RefFileUrls"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2RefmskFileUrls"
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "title": "以源文件 ID、源蒙版文件 ID、多张参考文件 ID 与多张参考蒙版文件 ID 运行任务"
                  },
                  {
                    "$ref": "#/components/schemas/BasicRunTaskV2SrcFileId"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2SrcmskFileId"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2RefFileIds"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2RefmskFileIds"
                  }
                ]
              }
            ]
          },
          {
            "$ref": "#/components/schemas/2dVtoRunTaskV2SrcInfo"
          },
          {
            "$ref": "#/components/schemas/2dVtoRunTaskV2ObjInfos"
          }
        ]
      },
      "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"
      },
      "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": {
      "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"
                }
              }
            }
          }
        }
      }
    }
  }
}