{
  "openapi": "3.0.0",
  "info": {
    "title": "イヤリングバーチャル試着",
    "description": "# 概要\nイヤリングバーチャル試着\nイヤリング試着とピアシング試着のプレビューを作成します。\n\n2D 画像からイヤリングバーチャル試着を作成します。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 タスクを発行しタスク ID を取得する:** レスポンスから `task_id` を取得します。\n    4.  **ステータスをポーリングする（`GET`）:** `task_id` を使用してタスクのステータスを確認します。`task_status` が `\"success\"` または `\"error\"` になるまでポーリングを続行してください。\n\n---\n\n* API プレイグラウンド\n\nAPI プレイグラウンドで API を対話的にテストします:\n\n**API プレイグラウンド:**\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 キーの確認場所: 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\nFile API のレスポンスで提供された URL にファイルを直接アップロードし、その後 File API が返した対応する `src_file_id` を使用して AI タスクを呼び出すことができます。または VTO タスクペイロードに有効な画像 URL を `src_file_url` として提供します。`src_file_id` または `src_file_url` がバーチャル試着の対象となります。\n\nまた、`src_file_id` または `src_file_url` に適用するイヤリング製品画像を参照として `ref_file_ids` または `ref_file_urls` で提供する必要があります。\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/earring\n```\n\n   * ポーリングエンドポイント\n\n```\nGET /s2s/v2.0/task/2d-vto/earring/{task_id}\n```\n\n---\n\n## ファイル仕様とエラー\n\n* イヤリングバーチャル試着の仕様\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*   イヤリングバーチャル試着は前面画像に対応していますが、最も良い結果は横顔の画像で得られます。\n\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/Earring_restriction_cdf1de3c7b.png)\n\n**earring\\_wearing\\_location: integer array of size 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: number greater than 0**\nセンチメートルでイヤリングのサイズを制御します。\nデフォルト値: null（エンジンのデフォルト）\n\n**earring\\_is\\_right\\_ear: boolean**\nイヤリングが右耳に装着されているかどうかを示します。デフォルトでは右耳に装着されます。\nデフォルト値: true\n\n**earring\\_occluded\\_type: number (Enum: 0, 1, 2)**\nオクルージョンの種類を指定します:\n0 は自動検出を意味します\n1 は遮蔽ありを意味します\n2 は遮蔽なしを意味します\nデフォルト値: 0\n\n**earring\\_shadow\\_intensity: float (0.0 to 1.0)**\n影の強さを制御します:\n0.0 は影なしを示します\n1.0 は最大限の影を示します\nデフォルト値: 0.15\n\n**earring\\_ambient\\_light\\_intensity: float (0.0 to 1.0)**\nライティングがセルフィー画像を参照する度合いを定義します:\n0.0 はセルフィー画像のライティングを無視します\n1.0 はセルフィー画像のライティングと影のレンダリングに完全に一致させます\nデフォルト値: 1.0\n\n**イヤリングアンカーポイント: ピクセル座標の 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|イヤリングバーチャル試着|長辺 <= 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| イヤリングバーチャル試着 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": "アップロードされた画像からイヤリングのバーチャル試着を生成します。アライメントとシャドウのパラメータをサポートします。"
    }
  ],
  "paths": {
    "/s2s/v2.0/task/2d-vto/earring": {
      "post": {
        "summary": "AI 2D イヤリングバーチャル試着タスクを実行します。",
        "description": "このエンドポイントはイヤリングのバーチャル試着プロセスを開始します。ソースファイルと参照画像（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 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": {
      "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 です。ファイルアップロード 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。ファイルアップロード API から取得したファイル ID です。",
            "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": "ソース 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": "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": "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": "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": "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"
          }
        }
      },
      "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` - その他\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"
                }
              }
            }
          }
        }
      }
    }
  }
}