{
  "openapi": "3.0.0",
  "info": {
    "title": "AI 虛擬手環",
    "description": "# 概述\n終極的 AI 虛擬手環\n採用 AI 驅動的解決方案，協助您的顧客進行線上購物，每次都能確保完美的佩戴效果與極佳的購物滿意度。只需一張 2D 圖片。\n\n以極其逼真的手環虛擬試戴體驗，創造吸引人的購物流程。我們的解決方案滿足各種規模珠寶品牌的需求。選擇 2D 圖片，以最少的力氣達成輕鬆卻高品質的虛擬試戴體驗。這項獨特的功能讓我們在電子商務領域脫穎而出，讓顧客比以往任何時候都更容易體驗您的產品。\n\n## 整合指南\n本指南將引導您完成：\n\n*   **端點：** `/s2s/v2.0/task/2d-vto/bracelet`\n*   **認證：** 所有請求都需要 `Authorization: Bearer YOUR_API_KEY`\n*   **工作流程：**\n    1.  **準備手腕圖片：** 上傳圖片，或提供您手腕的有效圖片網址\n    1.  **準備手環圖片：** 上傳圖片，或提供手環產品的有效圖片網址\n    1.  **啟動 AI 任務並取得任務 ID：** 從回應中取得 `task_id`。\n    1.  **輪詢狀態（`GET`）：** 使用 `task_id` 查詢任務狀態。持續輪詢，直到 `task_status` 為 `\"success\"` 或 `\"error\"`。\n\n---\n\n* API Playground\n\n使用我們的官方 playground 進行互動式探索與測試：\n\n**API Playground：**\n[http://yce.makeupar.com/api-console/en/api-playground/ai-bracelet-virtual-try-on/](http://yce.makeupar.com/api-console/en/api-playground/ai-bracelet-virtual-try-on/)\n\n---\n\n* 認證\n- 使用 **Bearer Token** 將您的 API key 納入請求標頭：\n    ```\n    Authorization: Bearer YOUR_API_KEY\n    ```\n您可以在 https://yce.makeupar.com/api-console/en/api-keys/ 找到您的 API Key。\n\n\n* 1. 上傳圖片\n\n您可以直接上傳檔案到伺服器，或在 VTO 任務內容中提供有效的圖片網址。\n\n   * 上傳端點\n\n```\nPOST /s2s/v2.0/file\n```\n\n或者，若您已有公開的圖片網址，可跳過此步驟。\n\n您可以直接上傳檔案到 File API 回應中提供的網址，然後使用 File API 回傳的對應 `src_file_id`，在後續呼叫 AI 任務。或在 VTO 任務內容中提供有效的圖片網址作為 `src_file_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. 建立手環 VTO 任務並輪詢結果\n\n當您取得圖片與範本 ID 後，即可建立任務。API 以非同步方式處理請求。您必須輪詢任務狀態，直到達到 `success` 或 `error`。\n\n   * 建立任務端點\n\n```\nPOST /s2s/v2.0/task/2d-vto/bracelet\n```\n\n   * 輪詢端點\n\n```\nGET /s2s/v2.0/task/2d-vto/bracelet/{task_id}\n```\n\n---\n\n## 檔案規格與錯誤\n\n* AI 虛擬手環規範\n\n**支援的手環視角**\n手環圖片必須以四分之三正面視角（約 45 度）提供。\n\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/bracelet_product_09_2cb9721d77_2f8d90ab9f.jpg)\n\n**支援的手腕視角**\n手腕背面應完全可見，五根手指都清楚呈現且無任何遮擋。\n\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/watch_and_bracelet_user_01_09f16603cb_878dc89179.jpg)\n\n**bracelet\\_wearing\\_location：float（−0.3 到 1.0）**\n指示沿著手腕的位置：\n−0.3 代表接近主要手腕關節\n1.0 代表遠離主要手腕關節\n預設值：null（使用引擎預設）\n\n![bracelet_wearing_location](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/bracelet_wearing_location_01ac0a048e.jpg)\n\n**bracelet\\_shadow\\_intensity：float（0.0 到 1.0）**\n控制陰影的強度：\n0.0 代表無陰影\n1.0 代表最大陰影\n預設值：0.15\n\n**bracelet\\_ambient\\_light\\_intensity：float（0.0 到 1.0）**\n定義光線參考目標手部圖片的程度：\n0.0 忽略手部圖片的光線\n1.0 完全配合手部圖片的光線與陰影渲染\n預設值：1.0\n\n**手環錨點：以像素座標表示的 2 個點的陣列（選填）**\n標示手環接觸手腕的內緣，指定左與右的點。\n若未提供此參數，AI 引擎會自動偵測錨點。\n![bracelet_anchor_point](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/bracelet_anchor_point_c353245edc.jpg)\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（現代 TLS/HTTP 支援）</br>   - jq >= 1.6（穩健的 JSON 解析） |\n| Node.js（JavaScript） | Node >= 18（支援全域 fetch） |\n| JavaScript | - Chrome / Edge >= 80</br>   - Firefox >= 74</br>   - Safari >= 13.1 |\n| PHP | PHP >= 7.4（現代 TLS/相容性），ext-curl（建議）或 allow_url_fopen=On + ext-openssl、ext-json |\n| Python | Python >= 3.10（支援 f-strings），requests >= 2.20.0 |\n| Java | Java 11+（支援 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 處理，為上傳的圖片生成手環虛擬試戴體驗。"
    }
  ],
  "paths": {
    "/s2s/v2.0/task/2d-vto/bracelet": {
      "post": {
        "summary": "執行 AI 2D 手環虛擬試戴任務。",
        "description": "這個端點啟動手環虛擬試戴流程。您必須提供來源檔案與參考圖片（透過網址或檔案 ID），以及對位與陰影的特定參數。任務會以非同步方式處理，您可以使用這個回應回傳的 task_id 查詢其狀態。\n",
        "tags": [
          "V1.0"
        ],
        "security": [
          {
            "BearerAuthenticationV2": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BraceletRunTaskV2"
              }
            }
          }
        },
        "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/bracelet/{task_id}": {
      "get": {
        "summary": "查詢 AI 2D 手環虛擬試戴任務的狀態。",
        "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 authentication'。請在標頭中放入您的 'API Key'：`Authorization:Bearer YOUR_API_KEY`。請注意 'Bearer' 與 'YOUR_API_KEY' 之間有一個空格。"
      }
    },
    "schemas": {
      "BraceletRunTaskV2": {
        "allOf": [
          {
            "$ref": "#/components/schemas/2dVtoRunTaskV2"
          },
          {
            "type": "object",
            "properties": {
              "object_infos": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "parameter": {
                      "type": "object",
                      "properties": {
                        "bracelet_need_remove_background": {
                          "type": "boolean",
                          "description": "手環圖片是否需要移除背景。",
                          "default": true,
                          "example": true
                        },
                        "bracelet_anchor_point": {
                          "type": "array",
                          "description": "手環圖片的錨點，標示手環內緣最遠的兩點 <br>類型：2x2 整數清單 <br>範圍：2 個 (x, y) 像素座標 <br>預設：null（使用引擎預設）",
                          "default": null,
                          "example": null,
                          "minItems": 2,
                          "maxItems": 2,
                          "items": {
                            "type": "array",
                            "minItems": 2,
                            "maxItems": 2,
                            "items": {
                              "type": "integer"
                            }
                          }
                        },
                        "bracelet_wearing_location": {
                          "type": "number",
                          "description": "定義手環在使用者照片手腕上的位置。 <br>範圍：-0.3 ~ 1.0（0 = 最接近手腕關節） <br>       （較小的數字＝靠近手掌 <br>       較大的數字＝遠離手腕） <br>預設：null（使用引擎預設）",
                          "minimum": -0.3,
                          "maximum": 1,
                          "default": null,
                          "example": null
                        },
                        "bracelet_shadow_intensity": {
                          "type": "number",
                          "description": "套用到手環的陰影強度（較高＝較深的陰影）。",
                          "minimum": 0,
                          "maximum": 1,
                          "default": 0.3,
                          "example": 0.3
                        },
                        "bracelet_ambient_light_intensity": {
                          "type": "number",
                          "description": "手環的環境光調整強度。",
                          "minimum": 0,
                          "maximum": 1,
                          "default": 1,
                          "example": 1
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "BasicRunTaskV2SrcFileUrl": {
        "type": "object",
        "required": [
          "src_file_url"
        ],
        "properties": {
          "src_file_url": {
            "type": "string",
            "description": "要執行任務的檔案網址。該網址應可公開存取。",
            "example": "https://example.com/selfie.jpg"
          }
        }
      },
      "2dVtoRunTaskV2SrcmskFileUrl": {
        "type": "object",
        "properties": {
          "srcmsk_file_url": {
            "type": "string",
            "description": "執行任務所用來源遮罩檔案的網址。該網址需可公開存取。",
            "example": "https://example.com/src_mask.jpg"
          }
        }
      },
      "2dVtoRunTaskV2RefFileUrls": {
        "type": "object",
        "required": [
          "ref_file_urls"
        ],
        "properties": {
          "ref_file_urls": {
            "type": "array",
            "description": "執行任務所用參考檔案的網址。該網址需可公開存取。",
            "example": [
              "https://example.com/vto_sku.jpg"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "2dVtoRunTaskV2RefmskFileUrls": {
        "type": "object",
        "properties": {
          "refmsk_file_urls": {
            "type": "array",
            "description": "執行任務所用參考遮罩檔案的網址。該網址需可公開存取。",
            "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。來自上傳檔案 API 的檔案 ID。",
            "example": [
              "pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE="
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "2dVtoRunTaskV2RefmskFileIds": {
        "type": "object",
        "properties": {
          "refmsk_file_ids": {
            "type": "array",
            "description": "執行任務所用參考遮罩檔案的 ID。來自上傳檔案 API 的檔案 ID。",
            "example": [
              "pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE="
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "BasicRunTaskV2SrcFileId": {
        "type": "object",
        "required": [
          "src_file_id"
        ],
        "properties": {
          "src_file_id": {
            "type": "string",
            "description": "要執行任務的檔案 ID。檔案 ID 來自上傳檔案 API。",
            "example": "pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE="
          }
        }
      },
      "2dVtoRunTaskV2SrcmskFileId": {
        "type": "object",
        "properties": {
          "srcmsk_file_id": {
            "type": "string",
            "description": "執行任務所用來源遮罩檔案的 ID。來自上傳檔案 API 的檔案 ID。",
            "example": "pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE="
          }
        }
      },
      "2dVtoRunTaskV2SrcInfo": {
        "type": "object",
        "required": [
          "source_info"
        ],
        "properties": {
          "source_info": {
            "type": "object",
            "description": "包含來源照片資訊。",
            "properties": {
              "name": {
                "type": "string",
                "description": "來源網址或檔案 ID。",
                "example": "https://example.com/selfie.jpg"
              },
              "mask_name": {
                "type": "string",
                "description": "來源遮罩網址或檔案 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": "參考網址或檔案 ID。指出要對應哪個參考產品圖片。",
                  "example": "https://example.com/vto_sku.jpg"
                },
                "mask_name": {
                  "type": "string",
                  "description": "參考遮罩網址或檔案 ID。指出應對應哪個參考產品圖片。",
                  "example": "https://example.com/vto_sku_mask.jpg"
                }
              },
              "required": [
                "name"
              ]
            }
          }
        }
      },
      "2dVtoRunTaskV2": {
        "allOf": [
          {
            "anyOf": [
              {
                "allOf": [
                  {
                    "title": "Run task with src file url & srcmsk file url & ref file urls & refmsk file urls"
                  },
                  {
                    "$ref": "#/components/schemas/BasicRunTaskV2SrcFileUrl"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2SrcmskFileUrl"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2RefFileUrls"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2RefmskFileUrls"
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "title": "Run task with src file url & srcmsk file url & ref file IDs & refmsk file IDs"
                  },
                  {
                    "$ref": "#/components/schemas/BasicRunTaskV2SrcFileUrl"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2SrcmskFileUrl"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2RefFileIds"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2RefmskFileIds"
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "title": "Run task with src file ID & srcmsk file ID & ref file urls & refmsk file urls"
                  },
                  {
                    "$ref": "#/components/schemas/BasicRunTaskV2SrcFileId"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2SrcmskFileId"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2RefFileUrls"
                  },
                  {
                    "$ref": "#/components/schemas/2dVtoRunTaskV2RefmskFileUrls"
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "title": "Run task with src file ID & srcmsk file ID & ref file IDs & refmsk file IDs"
                  },
                  {
                    "$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\\` - 超過重試上限以避免產生 NSFW 圖片\n- \\`error_upload\\` - 上傳結果圖片錯誤\n- \\`unknown_internal_error\\` - 其他"
      },
      "TaskStatusResponseBodySingleUrlResultsV2": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "description": "下載這個結果的網址。有效期限 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"
                }
              }
            }
          }
        }
      }
    }
  }
}