{
  "openapi": "3.0.0",
  "info": {
    "title": "フェイスリフト",
    "description": "# 概要\nAI フェイスリフトでは、顔の補正を行います。顔の構造、肌の質感、比率を分析して画像を再構築します。\n\n目の下のクマ、頬、額、顔全体の形状、口などの顔の領域を 0 から 100 の数値で調整できます。\n\nSNS、プロフィール写真、クリエイティブコンテンツ、ビジネス用途で使えます。\n\n\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/01_1_6c0d97eb51.jpg)\n\n![](https://bcw-media.s3.ap-northeast-1.amazonaws.com/01_2_8c428a25dc.jpg)\n\n\n## 統合ガイド\nこのガイドでは、以下を説明します。\n\nAI フェイスリフト API のワークフロー:\n\n**エンドポイント:** `/s2s/v2.0/task/face-lift`\n\n**認証必須:** `Authorization: Bearer YOUR_API_KEY`\n\n**ワークフローの手順:**\n\n1. **画像アップロードの準備:**\n  - アップロード用のセルフィー画像を準備します。\n  - File API `/s2s/v2.0/file` を呼び出して、アップロード URL と関連する `file_id` を取得します。\n  - 提供されたアップロード URL を使用してセルフィー画像をアップロードします。\n\n2. **複数顔がある場合のオプションの前処理:**\n    - 画像内に複数の顔が含まれている場合は、セルフィー画像を前処理します。\n\n3. **フェイスリフト効果の設定:**\n   - まず、適切なフェイスリフトパラメータを選択します。\n\n4. **AI タスクの開始とタスク ID の取得:**\n   - 選択した効果設定とともに `file_id` を HTTP POST リクエストで `/s2s/v2.0/task/face-lift` に送信します。\n   - この操作を識別するための一意なタスク ID をレスポンスで待ちます。\n\n5. **タスクステータスのポーリング（継続的な確認）:**\n   - 取得した `task_id` を使用して、HTTP GET リクエスト（例: `GET /s2s/v2.0/task/face-lift${task_id}`）で定期的にタスクステータスをポーリングします。\n   - 以下を継続的に監視します:\n     - `Task_status = \"success\"` （処理完了）。\n     - `Task_status = \"error\"` （該当する場合、解決または再試行）。\n   - ステータスが success に遷移したら、ワークフローを適切に更新します。\n\n\n\n\n---\n\n1.  認証\n    - リクエストヘッダーに **Bearer トークン** を使用して API キーを含めます:\n        ```\n        Authorization: Bearer YOUR_API_KEY\n        ```\n    API キーの確認場所: https://yce.makeupar.com/api-console/en/api-keys/.\n\n\n2.  画像のアップロード\n\n    サーバーにファイルを直接アップロードするか、AI タスクペイロードに有効な画像 URL を指定できます。\n\n    * アップロードエンドポイント\n\n        ```\n        POST /s2s/v2.0/file\n        ```\n\n    すでに公開画像 URL がある場合は、この手順をスキップできます。\n\n---\n\n3. 前処理により補正対象の顔を選択する\n\n   * 前処理 API の呼び出し\n    ピクセル座標で検出されたバウンディングボックスを出力します。後で Face Lift AI タスクを作成するために、結果のインデックスを使用します。\n        ```\n        POST /s2s/v2.0/task/face-lift/pre-process\n        ```\n\n        ```\n        {\n            \"timed\": number,\n            \"result\": [\n                {\n                    \"left\": number,\n                    \"top\": number,\n                    \"width\": number,\n                    \"height\": number\n                }\n            ]\n        }\n        ```\n\n4. Face Lift AI タスクの作成と結果のポーリング\n\n    画像と完全な効果ペイロードが準備できたら、タスクを作成します。API はリクエストを非同期で処理します。ステータスが `success` または `error` になるまでタスクステータスをポーリングする必要があります。\n\n   * タスク作成エンドポイント\n\n        ```\n        POST /s2s/v2.0/task/face-lift\n        ```\n\n   * ポーリングエンドポイント\n\n        ```\n        GET /s2s/v2.0/task/face-lift/{task_id}\n        ```\n\n---\n\n## ファイル仕様とエラー\n\n* AI フェイスリフト仕様\n\n**対応セルフィービュー**\n画像は 1920 x 1920 以下で、長辺が 640 のときに 32 x 32 ピクセルを超える十分なサイズの顔がはっきりと写っており、ロール角度がプラスマイナス 75 度以内、ヨー角度がプラスマイナス 90 度以内で撮影されている必要があります。\n\n![](https://plugins-media.makeupar.com/strapi/assets/thumbnail_face_reshape_01_85c8ffc055.jpg)\n\n\n---\n\n* 対応フォーマットと寸法\n\n| AI 機能 | 対応寸法 | 対応ファイルサイズ | 対応フォーマット |\n|  ----  | ----  | ----  | ----  |\n| AI フェイスリフト | 長辺 <= 1920 | < 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 |\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/face-lift/pre-process": {
      "post": {
        "summary": "フェイスリフト検出タスクを実行します。",
        "description": "ソース画像に複数の有効なターゲットが含まれる可能性がある場合、またはエフェクトを適用する検出ターゲットを明示的に選びたい場合は、前処理タスクを使います。単一ターゲットの画像では、機能がデフォルトの `index` 値をサポートしているため、手動でのターゲット選択が不要な場合は前処理をスキップできます。\n\n前処理タスクは、ソース画像内の候補ターゲットを検出し、その座標を `data.results.result` に返します。結果配列の各項目は、検出された 1 つのターゲットを表します。返された座標を確認し、ソース画像内の意図した顔や領域に対応づけたうえで、エフェクトタスクを作成する際にその項目のゼロベース配列インデックスを `index` 値として使います。\n\n複数の顔や領域が検出された画像では、前処理の結果を確認せずにデフォルトの `index` 値に頼らないでください。エフェクトは `index` で選択されたターゲットにしか適用されないため、エフェクトタスクを実行する前に、意図したターゲットに対応する結果項目を確認する必要があります。\n\nこのタスクは非同期です。タスクを作成した後、機能がサポートしている場合は Webhook で完了を処理するか、対応する前処理ステータスエンドポイントをポーリングして `data.task_status` が `success` または `error` になるまで待ちます。\n",
        "tags": [
          "V1.0"
        ],
        "security": [
          {
            "BearerAuthenticationV2": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/BasicRunTaskV2"
                  }
                ]
              }
            }
          }
        },
        "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/face-lift/pre-process/{task_id}": {
      "get": {
        "summary": "フェイスリフト検出タスクのステータスを確認します。",
        "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/TaskStatusResponsePreProcessSingleIndexWithTimed"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidTaskId"
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "500": {
            "$ref": "#/components/responses/TaskTimeout"
          }
        }
      }
    },
    "/s2s/v2.0/task/face-lift": {
      "post": {
        "summary": "フェイスリフトタスクを実行します。",
        "description": "AI タスクは非同期です。機能ごとに Webhook がサポートされている場合は、Webhook による完了処理を優先します。Webhook エンドポイントを設定し、Webhook 署名を検証したうえで、`success` または `error` の通知が来たら、受け取った `task_id` を使ってタスクの結果を照会します。設定と検証の詳細は [Webhook 統合ガイド](../develop/webhook.md) を参照してください。\n\nWebhook がサポートされていない場合、または統合に使えない場合は、ポーリングを実装します。AI タスクを送信した後、一定の間隔（例：10 秒ごと）でステータスエンドポイントをポーリングし、`success` または `error` になるまで待ちます。\n",
        "tags": [
          "V1.0"
        ],
        "security": [
          {
            "BearerAuthenticationV2": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FaceLiftRunTask"
              }
            }
          }
        },
        "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/face-lift/{task_id}": {
      "get": {
        "summary": "フェイスリフトタスクのステータスを確認します。",
        "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/TaskStatusResponseV2WithTimedAndTimedApply"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/InvalidTaskId"
          },
          "401": {
            "$ref": "#/components/responses/InvalidApiKey"
          },
          "500": {
            "$ref": "#/components/responses/TaskTimeout"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "BearerAuthenticationV2": {
        "type": "http",
        "scheme": "bearer",
        "description": "標準の「Bearer 認証」を使用します。ヘッダーに `Authorization:Bearer YOUR_API_KEY` の形式で「API キー」を設定してください。`Bearer` と `YOUR_API_KEY` の間に半角スペースがある点にご注意ください。"
      }
    },
    "schemas": {
      "FaceLiftRunTask": {
        "allOf": [
          {
            "anyOf": [
              {
                "allOf": [
                  {
                    "title": "src_file_url と 'auto' タイプでタスクを実行"
                  },
                  {
                    "$ref": "#/components/schemas/BasicRunTaskV2SrcFileUrl"
                  },
                  {
                    "required": [
                      "src_file_url"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "auto"
                        ]
                      }
                    }
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "title": "src_file_url と 'custom' タイプでタスクを実行"
                  },
                  {
                    "$ref": "#/components/schemas/BasicRunTaskV2SrcFileUrl"
                  },
                  {
                    "required": [
                      "src_file_url",
                      "features"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "custom"
                        ]
                      },
                      "features": {
                        "minProperties": 1
                      }
                    }
                  },
                  {
                    "title": "機能はすべてゼロにできません",
                    "not": {
                      "properties": {
                        "features": {
                          "properties": {
                            "eye_bag": {
                              "enum": [
                                0
                              ]
                            },
                            "cheek": {
                              "enum": [
                                0
                              ]
                            },
                            "forehead": {
                              "enum": [
                                0
                              ]
                            },
                            "shape": {
                              "enum": [
                                0
                              ]
                            },
                            "mouth": {
                              "enum": [
                                0
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "title": "src_file_id と 'auto' タイプでタスクを実行"
                  },
                  {
                    "$ref": "#/components/schemas/BasicRunTaskV2SrcFileId"
                  },
                  {
                    "required": [
                      "src_file_id"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "auto"
                        ]
                      },
                      "features": {
                        "minProperties": 1
                      }
                    }
                  }
                ]
              },
              {
                "allOf": [
                  {
                    "title": "src_file_id と 'custom' タイプでタスクを実行"
                  },
                  {
                    "$ref": "#/components/schemas/BasicRunTaskV2SrcFileId"
                  },
                  {
                    "required": [
                      "src_file_id",
                      "features"
                    ],
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "custom"
                        ]
                      }
                    }
                  },
                  {
                    "title": "機能はすべてゼロにできません",
                    "not": {
                      "properties": {
                        "features": {
                          "properties": {
                            "eye_bag": {
                              "enum": [
                                0
                              ]
                            },
                            "cheek": {
                              "enum": [
                                0
                              ]
                            },
                            "forehead": {
                              "enum": [
                                0
                              ]
                            },
                            "shape": {
                              "enum": [
                                0
                              ]
                            },
                            "mouth": {
                              "enum": [
                                0
                              ]
                            }
                          }
                        }
                      }
                    }
                  }
                ]
              }
            ]
          },
          {
            "type": "object",
            "required": [
              "version"
            ],
            "properties": {
              "version": {
                "type": "string",
                "description": "機能仕様のバージョン。特に指定がない限り、初期値は `\"1.0\"` です。\n",
                "default": "1.0",
                "example": "1.0"
              },
              "index": {
                "type": "integer",
                "example": 0,
                "default": 0,
                "description": "エフェクトを適用する対象オブジェクトのゼロベースインデックスです。複数のオブジェクトを含む画像では、まず前処理タスクを実行し、`data.results.result` 内のオブジェクト座標を確認したうえで、選択したオブジェクトのインデックスを指定します。\n\n前処理ステップでは、エフェクトを適用する前に、入力画像を解析して検出できるすべてのオブジェクトを特定します。検出タスクを実行し、バウンディングボックス座標のリストなど、各オブジェクトの構造化データを返します。このリスト内の各エントリの位置がゼロベースインデックスとして機能し、エフェクトの対象オブジェクトを指定するのに使います。\n\nこの情報は、一般的に `data.results.result` 配下で構造化された形式で返ります。\nこのステップを先に実行すると、以下ができます。\n    * 画像内に存在するオブジェクトの数を把握する\n    * オブジェクトの位置とサイズを確認する\n    * インデックスで正しい対象オブジェクトを選択する\n\n複数のオブジェクトを含む画像では、必ず前処理ステップを実行してください。\n`data.results.result` を確認して、オブジェクトとそのインデックスを特定してください。\n対応するゼロベースインデックスを使って、正しい対象を選択してください。\n"
              },
              "type": {
                "type": "string",
                "default": "custom"
              },
              "features": {
                "type": "object",
                "additionalProperties": false,
                "description": "'custom' タイプを使用する場合、すべてゼロにすることはできません。",
                "properties": {
                  "eye_bag": {
                    "type": "integer",
                    "default": 0,
                    "minimum": 0,
                    "maximum": 100
                  },
                  "cheek": {
                    "type": "integer",
                    "default": 0,
                    "minimum": 0,
                    "maximum": 100
                  },
                  "forehead": {
                    "type": "integer",
                    "default": 0,
                    "minimum": 0,
                    "maximum": 100
                  },
                  "shape": {
                    "type": "integer",
                    "default": 0,
                    "minimum": 0,
                    "maximum": 100
                  },
                  "mouth": {
                    "type": "integer",
                    "default": 0,
                    "minimum": 0,
                    "maximum": 100
                  }
                }
              },
              "global": {
                "$ref": "#/components/schemas/GlobalSkinSmoothCommon"
              }
            }
          }
        ]
      },
      "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。ファイルアップロード API から取得したファイル ID です。",
            "example": "pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE="
          }
        }
      },
      "BasicRunTaskV2": {
        "title": "BasicRunTaskV2",
        "anyOf": [
          {
            "title": "src ファイル URL でタスクを実行",
            "allOf": [
              {
                "$ref": "#/components/schemas/BasicRunTaskV2SrcFileUrl"
              }
            ]
          },
          {
            "title": "src ファイル ID でタスクを実行",
            "allOf": [
              {
                "$ref": "#/components/schemas/BasicRunTaskV2SrcFileId"
              }
            ]
          }
        ]
      },
      "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"
      },
      "TaskStatusResponsePreProcessNoUrlBase": {
        "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": "エラーの詳細な説明"
              }
            }
          }
        }
      },
      "TaskStatusResponsePreProcessSingleIndexWithTimed": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskStatusResponsePreProcessNoUrlBase"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "object",
                "properties": {
                  "results": {
                    "type": "object",
                    "properties": {
                      "timed": {
                        "type": "number"
                      },
                      "result": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "left": {
                              "type": "number"
                            },
                            "top": {
                              "type": "number"
                            },
                            "width": {
                              "type": "number"
                            },
                            "height": {
                              "type": "number"
                            }
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "GlobalSkinSmoothCommon": {
        "type": "object",
        "properties": {
          "skin_smooth_strength": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "default": 0
          },
          "skin_smooth_color_intensity": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100,
            "default": 0
          }
        }
      },
      "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"
      },
      "TaskStatusResponseV2WithTimedAndTimedApply": {
        "allOf": [
          {
            "$ref": "#/components/schemas/TaskStatusResponseV2"
          },
          {
            "type": "object",
            "properties": {
              "data": {
                "type": "object",
                "properties": {
                  "results": {
                    "type": "object",
                    "properties": {
                      "timed": {
                        "type": "number"
                      },
                      "timed_apply": {
                        "type": "number"
                      }
                    }
                  },
                  "task_status": {
                    "type": "string",
                    "enum": [
                      "running",
                      "success",
                      "error"
                    ],
                    "description": "このタスクのステータス"
                  },
                  "error": {
                    "$ref": "#/components/schemas/EngineErrorCode"
                  },
                  "error_message": {
                    "type": "string",
                    "description": "エラーの詳細な説明"
                  }
                }
              }
            }
          }
        ]
      }
    },
    "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"
                }
              }
            }
          }
        }
      }
    }
  }
}