{
  "openapi": "3.0.0",
  "info": {
    "title": "ネイルバーチャル試着",
    "description": "# 概要\nネイルバーチャル試着 (AI Nail Virtual Try-On) API で、ネイルのバーチャル試着を作成します。\n天然爪にも人工爪にも、さまざまなネイルスタイルをビジュアライズできます。\n\n## 統合ガイド\nこのガイドでは、次の内容について説明します:\n\nネイルバーチャル試着 API のワークフロー:\n\n**認証が必要:** `Authorization: Bearer YOUR_API_KEY`\n\n**ワークフロー手順:**\n\n1. **画像アップロードの準備:**\n    - 手の甲の画像を用意することから始めます。\n    - ファイル管理 API の `/s2s/v2.0/file` を呼び出し、アップロード URL と関連する `file_id` を取得します。\n    - 提供されたアップロード URL を使用して、ネイルのある手の甲の画像をアップロードします。\n\n2. **ネイルデザインのセットアップオプション:**\n    - まず、適したネイルカラーを選択します。お好みに合わせたカスタムシェイプも選択できます。\n\n3. **AI タスクの開始とタスク ID の取得:**\n    - アップロードした画像と選択したエフェクト設定を、HTTP POST リクエストで `/s2s/v2.0/task/nail-vto` に送信します。\n    - この操作を識別する一意のタスク ID をレスポンスで受け取ります。\n\n4. **タスクステータスのポーリング（継続的なチェック）:**\n    - 取得した `task_id` を使用して、HTTP GET リクエスト（例: `GET /s2s/v2.0/task/nail-vto/${task_id}`）で定期的にタスクステータスをポーリングします。\n    - 以下を継続的に監視します:\n        - `Task_status = \"success\"`（処理が完了）。\n        - `Task_status = \"error\"`（該当する場合、解決するか再試行）。\n    - ステータスが success に移行したら、ワークフローを適切に更新します。\n\n\n\n---\n\n* API プレイグラウンド\n\nAPI プレイグラウンドで API を対話的にテストします:\n\n**API プレイグラウンド:**\n[http://yce.makeupar.com/api-console/en/api-playground/ai-nail-virtual-try-on/](http://yce.makeupar.com/api-console/en/api-playground/ai-nail-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\n1. 画像のアップロード\n\n    ファイルをサーバーに直接アップロードするか、VTO タスクペイロードに有効な画像 URL を指定できます。\n\n    * アップロードエンドポイント\n\n        ```\n        POST /s2s/v2.0/file\n        ```\n\n    すでに公開済みの画像 URL を持っている場合は、このステップをスキップできます。\n\n---\n\n2. エフェクトテンプレートの準備\n\n    * この目的のために、4 つの異なるセットアップモードが用意されています:\n        1. カラーをカスタマイズし、現在のネイルルックに合わせる\n        2. プリセットデザインと特定のシェイプを使用して、イメージを実現する\n        3. プレスオンネイルを追加し、既存の元のネイル画像とリンクする\n        4. 一致するプレッスオンネイル製品の画像リンクを提供する \n\n    * エフェクトテンプレートの JSON スキーマ\n        ```\n        {\n            \"version\": \"1.0\",\n            \"effect_type\": \"nail_polish\", // valid values: ['nail_polish', 'press_on_nails']\n            \"effects\": [],\n            \"ref_file_ids\": []\n        }\n        ```\n\n        * エフェクト形式\n            - ネイルポリッシュ - カラー\n            ```\n            {\n                \"sub_type\": \"color\",\n                \"finger\": \"index\", // valid values: ['thumb', 'index', 'middle', 'ring', 'pinky']\n                \"color\": \"#ff0000\",\n                \"texture\": \"cream\", // valid values: ['matte', 'cream', 'metallic', 'jelly', 'sheer', 'pearl', 'textured', 'shimmer_coarse', 'shimmer_fine']\n                \"transparency\": 0, // 0-100, for textures except metallic\n                \"reflection\": 0, // 0-100\n                \"contrast\": 0, // 0-100\n                \"roughness\": 0, // 0-100\n                \"shimmer_opacity\": 0, // 0-100, for texture pearl\n                \"shimmer_size\": 0, // 0-100, for texture shimmer_coarse and shimmer_fine\n                \"textured_size\": 0, // 0-100, for texture textured\n            }\n            ```\n\n            - ネイルポリッシュ - デザイン\n            ```\n            {\n                \"sub_type\": \"design\",\n                \"finger\": \"index\", // valid values: ['thumb', 'index', 'middle', 'ring', 'pinky']\n                \"ref_file_url\": \"\",  // Optional; Either ref_file_id or ref_file_url must be filled, but only one can be selected.\n                \"ref_file_index\": 0, // This field is optional unless uploading is selected. Index corresponding to ref_file_ids under the root node\n                \"texture\": \"cream\", // valid values: ['matte', 'cream', 'metallic', 'jelly', 'sheer', 'pearl', 'textured', 'shimmer_coarse', 'shimmer_fine']\n                \"transparency\": 0, // 0-100, only for textures except metallic\n                \"reflection\": 0, // 0-100\n                \"contrast\": 0, // 0-100\n                \"roughness\": 0, // 0-100\n                \"shimmer_opacity\": 0, // 0-100, for texture pearl\n                \"shimmer_size\": 0, // 0-100, for texture shimmer_coarse and shimmer_fine\n                \"textured_size\": 0, // 0-100, for texture textured\n            }\n\n            ```\n\n            - プレスオンネイル - カラー\n            * 最新のシェイプ値は、https://plugins-media.makeupar.com/wcm-saas/shapes/nails.json で確認できます。\n            ```\n            {\n                \"sub_type\": \"color\",\n                \"finger\": \"index\", // valid values: ['thumb', 'index', 'middle', 'ring', 'pinky']\n                \"shape\": \"square_oval\", // Please check the nails.json. valid values: ['square_oval','square_square','square_squoval','squoval_oval','squoval_square','squoval_squoval','oval_oval','oval_square','oval_squoval','almond_oval','almond_square','almond_squoval','stiletto_oval','stiletto_square','stiletto_squoval],\n                \"length\": 1.0, // 0.8-2.15, for shapes except original\n                \"color\": \"#ff0000\",\n                \"texture\": \"cream\", // valid values for other shapes: ['matte', 'cream', 'metallic']\n                \"reflection\": 0, // 0-100\n                \"contrast\": 0, // 0-100\n                \"roughness\": 0 // 0-100\n            }\n            ```\n\n            - プレスオンネイル - デザイン\n            ```\n            {\n                \"sub_type\": \"design\",\n                \"finger\": \"index\", // valid values: ['thumb', 'index', 'middle', 'ring', 'pinky']\n                \"ref_file_url\": \"\",  // Optional; Either ref_file_id or ref_file_url must be filled, but only one can be selected.\n                \"ref_file_index\": 0, // This field is optional unless uploading is selected. Index corresponding to ref_file_ids under the root node\n                \"texture\": \"cream\", // valid values: ['matte', 'cream', 'metallic']\n                \"reflection\": 0, // 0-100\n                \"contrast\": 0, // 0-100\n                \"roughness\": 0, // 0-100\n            }\n\n            ```\n\n    * エフェクトテンプレートのデザインロジック\n\n        1. **エフェクトタイプの検出**（`press_on_nails` または `nail_polish`）。\n        2. **`effects` の各エントリを繰り返し:**\n\n        *`sub_type === \"color\"` の場合* → フィールドを直接マッピングし、欠落しているテクスチャ関連のキーをデフォルト値で埋めます。\n        *`sub_type === \"design\"` の場合* →\n        - ユーザーが `ref_file_url` を指定した場合は、それを保持し、`ref_file_index` を **省略**します。\n        - ユーザーがインデックス (`ref_file_index`) を指定した場合は、`ref_file_ids` が存在し、インデックスが有効であることを確認してから、`\"ref_file_id\": ref_file_ids[index]` を設定します（省略可 – 一部のバックエンドでは id ではなく生のインデックスを期待します）。\n\n        1. **数値範囲の正規化** – 範囲外の値を 0-100 または長さの制限にクランプします。\n        2. スキーマバリデーションを通過できるように、**欠落している任意のキー**をデフォルト値で追加します。\n        3. 最終オブジェクトを JSON として **シリアライズ** します（デバッグ用に compact または pretty）。\n\n    * 送信準備ができたペイロード例\n        ```\n        {\n        \"version\": \"1.0\",\n        \"src_file_url\": \"https://plugins-media.makeupar.com/strapi/assets/nail_user_photo_01_27d4260646.jpg\",\n        \"effect_type\": \"press_on_nails\",\n        \"ref_file_ids\": [\n            \"Ks3kh+1nPpVNm8iJb5374CWtBzkT4B44NPJwXbBKqVxfjK3xgCQ+hRt9MJXBFaud\",\n            \"+Z7PSjuzigvsc3S/Yli1A4WN7c3J6NJHFqK2iUlqD2BfjK3xgCQ+hRt9MJXBFaud\"\n        ],\n        \"effects\": [\n            {\n            \"sub_type\": \"design\",\n            \"finger\": \"thumb\",\n            \"texture\": \"cream\",\n            \"reflection\": 100,\n            \"contrast\": 50,\n            \"roughness\": 0,\n            \"ref_file_index\": 0\n            },\n            {\n            \"sub_type\": \"design\",\n            \"finger\": \"index\",\n            \"texture\": \"cream\",\n            \"reflection\": 100,\n            \"contrast\": 50,\n            \"roughness\": 0,\n            \"ref_file_index\": 1\n            },\n            {\n            \"sub_type\": \"design\",\n            \"finger\": \"middle\",\n            \"texture\": \"cream\",\n            \"reflection\": 100,\n            \"contrast\": 50,\n            \"roughness\": 0,\n            \"ref_file_url\": \"https://plugins-media.makeupar.com/strapi/assets/press_on_nail_06_3_9ce2ddc47a.png\"\n            },\n            {\n            \"sub_type\": \"design\",\n            \"finger\": \"pinky\",\n            \"texture\": \"cream\",\n            \"reflection\": 100,\n            \"contrast\": 50,\n            \"roughness\": 0,\n            \"ref_file_url\": \"https://plugins-media.makeupar.com/strapi/assets/press_on_nail_06_5_f6e46dd56f.png\"\n            },\n            {\n            \"sub_type\": \"design\",\n            \"finger\": \"ring\",\n            \"texture\": \"cream\",\n            \"reflection\": 100,\n            \"contrast\": 50,\n            \"roughness\": 0,\n            \"ref_file_url\": \"https://plugins-media.makeupar.com/strapi/assets/press_on_nail_06_4_2103ca8cac.png\"\n            }\n        ]\n        }\n        ```\n\n\n3. ネイル VTO タスクの作成と結果のポーリング\n\n    画像と完全なエフェクトペイロードが揃ったら、タスクを作成します。API はリクエストを非同期で処理します。`success` または `error` になるまで、タスクステータスをポーリングする必要があります。\n\n    * タスク作成エンドポイント\n\n        ```\n        POST /s2s/v2.0/task/nail-vto\n        ```\n\n    * ポーリングエンドポイント\n\n        ```\n        GET /s2s/v2.0/task/nail-vto/{task_id}\n        ```\n\n---\n\n## ファイル仕様とエラー\n\n* ネイルバーチャル試着の仕様\n\n**対応ネイルビュー**\n遮蔽物のない、明確な正面ビューの 1 枚のネイル画像。\n\n| 項目 | 対応寸法 | 対応ファイルサイズ | 対応フォーマット |\n| --- | --- | --- | --- |\n| ネイルデザイン画像 - ネイルポリッシュ | *   271 px ≤ 幅 ≤ 542 px<br>*   522 px ≤ 高さ ≤ 1044 px<br>*   72ppi 以上<br>画像は中央から適用され、バーチャル試着効果はユーザーの爪の長さに応じて変わります。 | ≤ 1MB | png |\n| ネイルデザイン画像 - プレスオンネイル | *   271 px ≤ 幅 ≤ 542 px<br>*   522 px ≤ 高さ ≤ 1044 px<br>*   0.5 ≤ 画像のアスペクト比 (H/W) ≤ 3.5<br>*   72ppi 以上<br>画像のコンテンツ、シェイプ、長さの設定はすべて、バーチャル試着効果の生成に使用されます。<br>適切な画像スケーリングを確保するためにユーザーの爪の幅が検出されるため、正しいアスペクト比で各爪用に別の画像を作成することをお勧めします。<br>プレッスオンネイルのデザイン画像サンプルをダウンロードし、詳細については画像ガイドラインを参照してください。ダウンロード: [Nail_Design_Image_Guidelines.pdf](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/You_Cam_API_AI_Nail_Virtual_Try_On_Press_on_Nail_Design_Image_Guidelines_a229b51750.pdf) | ≤ 1MB​ | 透明背景付き png |\n\nプレッスオンネイルデザイン画像サンプル:\n\n![](https://plugins-media.makeupar.com/strapi/assets/thumbnail_press_on_nail_06_5_f6e46dd56f.png)\n\n[<img src=\"https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/youcamapi_press_on_nail_design_image_sample_de6bd64f20.png\" width=\"60\"/>](https://bcw-media.s3.ap-northeast-1.amazonaws.com/strapi/assets/youcamapi_press_on_nail_design_image_sample_de6bd64f20.png)\n\n---\n\n**対応ハンドビュー**\n\n| 項目 | 対応寸法 | 対応ファイルサイズ | 対応フォーマット |\n| --- | --- | --- | --- |\n| ユーザー写真 | *   長辺 ≤ 2048<br>*   短辺 ≥ 256 | ≤ 10MB | jpg/jpeg/png |\n* 入力画像は 1 つの手のみをサポートします\n* 手のひらの面積は、入力画像の面積の少なくとも半分であることが望ましいです\n* 入力画像のアスペクト比は 1:1、3:4、4:3 が望ましいです\n* 指の爪は隠れていないこと\n* 爪にネイルチップやネイルポリッシュがないことが望ましいです\n\n![](https://plugins-media.makeupar.com/strapi/assets/thumbnail_nail_user_photo_02_fdba1848d6.jpg)\n\n---\n\n* エラーコード\n\n| エラーコード | 説明 |\n|  ----  | ----  |\n| error_nail_too_small | ネイル領域が小さすぎます。 |\n| error_no_nail\t| ソース画像にネイルが検出されませんでした。 |\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 |\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/nail-vto": {
      "post": {
        "summary": "ネイルバーチャル試着タスクを実行します。",
        "description": "このエンドポイントはネイルバーチャル試着プロセスを開始します。ソースファイルと参照画像（URL または File ID 経由）、および特定のネイルエフェクト設定を提供する必要があります。タスクは非同期で処理され、このレスポンスで返される task_id を使用してステータスを確認できます。\n",
        "tags": [
          "V1.0"
        ],
        "security": [
          {
            "BearerAuthenticationV2": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NailVtoTaskRequest"
              }
            }
          }
        },
        "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/nail-vto/{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/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": {
      "NailVtoTaskRequest": {
        "title": "ネイルバーチャル試着タスクリクエスト",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/BasicRunTaskV2WithMultiRef"
          },
          {
            "type": "object",
            "required": [
              "version",
              "effect_type",
              "effects"
            ],
            "properties": {
              "version": {
                "type": "string",
                "description": "ネイルエフェクト仕様のバージョン。\n特に指定がない限り、初期値は `\"1.0\"` です。\n",
                "default": "1.0",
                "example": "1.0"
              },
              "effect_type": {
                "type": "string",
                "enum": [
                  "nail_polish",
                  "press_on_nails"
                ],
                "example": "nail_polish"
              },
              "effects": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/NailVtoNailPolishColorEffect"
                    },
                    {
                      "$ref": "#/components/schemas/NailVtoNailPolishColorMetallicEffect"
                    },
                    {
                      "$ref": "#/components/schemas/NailVtoNailPolishColorPearlEffect"
                    },
                    {
                      "$ref": "#/components/schemas/NailVtoNailPolishColorShimmerEffect"
                    },
                    {
                      "$ref": "#/components/schemas/NailVtoNailPolishColorTexturedEffect"
                    },
                    {
                      "$ref": "#/components/schemas/NailVtoNailPolishDesignEffect"
                    },
                    {
                      "$ref": "#/components/schemas/NailVtoNailPolishDesignMetallicEffect"
                    },
                    {
                      "$ref": "#/components/schemas/NailVtoNailPolishDesignPearlEffect"
                    },
                    {
                      "$ref": "#/components/schemas/NailVtoNailPolishDesignShimmerEffect"
                    },
                    {
                      "$ref": "#/components/schemas/NailVtoNailPolishDesignTexturedEffect"
                    },
                    {
                      "$ref": "#/components/schemas/NailVtoPressOnNailsColorEffect"
                    },
                    {
                      "$ref": "#/components/schemas/NailVtoPressOnNailsDesignEffect"
                    }
                  ]
                }
              }
            }
          }
        ]
      },
      "NailVtoNailPolishColorBaseEffect": {
        "type": "object",
        "required": [
          "sub_type",
          "finger",
          "color",
          "texture",
          "reflection",
          "contrast",
          "roughness"
        ],
        "properties": {
          "sub_type": {
            "type": "string",
            "enum": [
              "color"
            ]
          },
          "finger": {
            "type": "string",
            "enum": [
              "thumb",
              "index",
              "middle",
              "ring",
              "pinky"
            ]
          },
          "color": {
            "type": "string",
            "pattern": "^#([A-Fa-f0-9]{6})$"
          },
          "texture": {
            "type": "string"
          },
          "reflection": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "contrast": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "roughness": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          }
        }
      },
      "NailVtoNailPolishColorEffect": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NailVtoNailPolishColorBaseEffect"
          },
          {
            "title": "ネイルポリッシュ - カラー - 一般",
            "type": "object",
            "required": [
              "transparency"
            ],
            "properties": {
              "texture": {
                "type": "string",
                "enum": [
                  "matte",
                  "cream",
                  "jelly",
                  "sheer"
                ]
              },
              "transparency": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              }
            }
          }
        ]
      },
      "NailVtoNailPolishColorMetallicEffect": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NailVtoNailPolishColorBaseEffect"
          },
          {
            "title": "ネイルポリッシュ - カラー - メタリック",
            "type": "object",
            "properties": {
              "texture": {
                "type": "string",
                "enum": [
                  "metallic"
                ]
              }
            }
          }
        ]
      },
      "NailVtoNailPolishColorPearlEffect": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NailVtoNailPolishColorBaseEffect"
          },
          {
            "title": "ネイルポリッシュ - カラー - パール",
            "type": "object",
            "required": [
              "shimmer_opacity",
              "transparency"
            ],
            "properties": {
              "texture": {
                "type": "string",
                "enum": [
                  "pearl"
                ]
              },
              "transparency": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "shimmer_opacity": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              }
            }
          }
        ]
      },
      "NailVtoNailPolishColorShimmerEffect": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NailVtoNailPolishColorBaseEffect"
          },
          {
            "title": "ネイルポリッシュ - カラー - シマー",
            "type": "object",
            "required": [
              "shimmer_size",
              "transparency"
            ],
            "properties": {
              "texture": {
                "type": "string",
                "enum": [
                  "shimmer_coarse",
                  "shimmer_fine"
                ]
              },
              "transparency": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "shimmer_size": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              }
            }
          }
        ]
      },
      "NailVtoNailPolishColorTexturedEffect": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NailVtoNailPolishColorBaseEffect"
          },
          {
            "title": "ネイルポリッシュ - カラー - テクスチャ",
            "type": "object",
            "required": [
              "textured_size",
              "transparency"
            ],
            "properties": {
              "texture": {
                "type": "string",
                "enum": [
                  "textured"
                ]
              },
              "transparency": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "textured_size": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              }
            }
          }
        ]
      },
      "NailVtoNailPolishDesignBaseEffect": {
        "type": "object",
        "required": [
          "sub_type",
          "finger",
          "texture",
          "reflection",
          "contrast",
          "roughness"
        ],
        "properties": {
          "sub_type": {
            "type": "string",
            "enum": [
              "design"
            ]
          },
          "finger": {
            "type": "string",
            "enum": [
              "thumb",
              "index",
              "middle",
              "ring",
              "pinky"
            ]
          },
          "ref_file_url": {
            "type": "string",
            "description": "「ネイルポリッシュ - デザイン」または「プレスオンネイル - デザイン」エフェクトを実現するには、特定のデザイン画像を使用する必要があります。画像ファイルへの直接 URL（`ref_file_url`）または、システム内のルートノード下にある `ref_file_ids` に対応するインデックス（`ref_file_index`）のいずれかを指定できます。`ref_file_url` または `ref_file_index` のいずれかを指定する必要がありますが、一度に選択できるのは 1 つのみです。\n"
          },
          "ref_file_index": {
            "type": "integer",
            "description": "「ネイルポリッシュ - デザイン」または「プレスオンネイル - デザイン」エフェクトのために File API を使用してデザイン画像をアップロードする場合は、File API を使用して画像をアップロードしてください。アップロード後、ファイル ID を取得し、`ref_file_ids` 配列に追加して、`ref_file_index` でインデックスを指定します。ルートノード下にある `ref_file_ids` に対応するインデックス\n"
          },
          "texture": {
            "type": "string"
          },
          "reflection": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "contrast": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "roughness": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          }
        }
      },
      "NailVtoNailPolishDesignEffect": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NailVtoNailPolishDesignBaseEffect"
          },
          {
            "title": "ネイルポリッシュ - デザイン - 一般",
            "type": "object",
            "required": [
              "transparency"
            ],
            "properties": {
              "texture": {
                "type": "string",
                "enum": [
                  "matte",
                  "cream",
                  "jelly",
                  "sheer"
                ]
              },
              "transparency": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              }
            }
          }
        ]
      },
      "NailVtoNailPolishDesignMetallicEffect": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NailVtoNailPolishDesignBaseEffect"
          },
          {
            "title": "ネイルポリッシュ - デザイン - メタリック",
            "type": "object",
            "properties": {
              "texture": {
                "type": "string",
                "enum": [
                  "metallic"
                ]
              }
            }
          }
        ]
      },
      "NailVtoNailPolishDesignPearlEffect": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NailVtoNailPolishDesignBaseEffect"
          },
          {
            "title": "ネイルポリッシュ - デザイン - パール",
            "type": "object",
            "required": [
              "shimmer_opacity",
              "transparency"
            ],
            "properties": {
              "texture": {
                "type": "string",
                "enum": [
                  "pearl"
                ]
              },
              "shimmer_opacity": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "transparency": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              }
            }
          }
        ]
      },
      "NailVtoNailPolishDesignShimmerEffect": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NailVtoNailPolishDesignBaseEffect"
          },
          {
            "title": "ネイルポリッシュ - デザイン - シマー",
            "type": "object",
            "required": [
              "shimmer_size",
              "transparency"
            ],
            "properties": {
              "texture": {
                "type": "string",
                "enum": [
                  "shimmer_coarse",
                  "shimmer_fine"
                ]
              },
              "shimmer_size": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "transparency": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              }
            }
          }
        ]
      },
      "NailVtoNailPolishDesignTexturedEffect": {
        "allOf": [
          {
            "$ref": "#/components/schemas/NailVtoNailPolishDesignBaseEffect"
          },
          {
            "title": "ネイルポリッシュ - デザイン - テクスチャ",
            "type": "object",
            "required": [
              "textured_size",
              "transparency"
            ],
            "properties": {
              "texture": {
                "type": "string",
                "enum": [
                  "textured"
                ]
              },
              "textured_size": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              },
              "transparency": {
                "type": "integer",
                "minimum": 0,
                "maximum": 100
              }
            }
          }
        ]
      },
      "NailVtoPressOnNailsColorEffect": {
        "title": "プレスオンネイル - カラー",
        "type": "object",
        "required": [
          "sub_type",
          "finger",
          "shape",
          "length",
          "color",
          "texture",
          "reflection",
          "contrast",
          "roughness"
        ],
        "properties": {
          "sub_type": {
            "type": "string",
            "enum": [
              "color"
            ]
          },
          "finger": {
            "type": "string",
            "enum": [
              "thumb",
              "index",
              "middle",
              "ring",
              "pinky"
            ]
          },
          "shape": {
            "type": "string",
            "enum": [
              "square_oval",
              "square_square",
              "square_squoval",
              "squoval_oval",
              "squoval_square",
              "squoval_squoval",
              "oval_oval",
              "oval_square",
              "oval_squoval",
              "almond_oval",
              "almond_square",
              "almond_squoval",
              "stiletto_oval",
              "stiletto_square",
              "stiletto_squoval"
            ]
          },
          "length": {
            "type": "number",
            "minimum": 0.8,
            "maximum": 2.15
          },
          "color": {
            "type": "string",
            "pattern": "^#([A-Fa-f0-9]{6})$"
          },
          "texture": {
            "type": "string",
            "enum": [
              "matte",
              "cream",
              "metallic"
            ]
          },
          "reflection": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "contrast": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "roughness": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          }
        }
      },
      "NailVtoPressOnNailsDesignEffect": {
        "title": "プレスオンネイル - デザイン",
        "type": "object",
        "required": [
          "sub_type",
          "finger",
          "texture",
          "reflection",
          "contrast",
          "roughness"
        ],
        "properties": {
          "sub_type": {
            "type": "string",
            "enum": [
              "design"
            ]
          },
          "finger": {
            "type": "string",
            "enum": [
              "thumb",
              "index",
              "middle",
              "ring",
              "pinky"
            ]
          },
          "ref_file_url": {
            "type": "string",
            "description": "`ref_file_id` または `ref_file_url` のいずれかを指定する必要がありますが、一度に選択できるのは 1 つのみです。"
          },
          "ref_file_index": {
            "type": "integer",
            "description": "アップロードを選択しない限り、このフィールドは省略可能です。ルートノード下にある `ref_file_ids` に対応するインデックス"
          },
          "texture": {
            "type": "string",
            "enum": [
              "matte",
              "cream",
              "metallic"
            ]
          },
          "reflection": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "contrast": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          },
          "roughness": {
            "type": "integer",
            "minimum": 0,
            "maximum": 100
          }
        }
      },
      "BasicRunTaskV2SrcFileUrl": {
        "type": "object",
        "required": [
          "src_file_url"
        ],
        "properties": {
          "src_file_url": {
            "type": "string",
            "description": "タスクを実行するファイルの URL。この URL は公開されている必要があります。",
            "example": "https://example.com/selfie.jpg"
          }
        }
      },
      "BasicRunTaskV2RefFileUrls": {
        "type": "object",
        "properties": {
          "ref_file_urls": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "description": "タスクを実行するための参照ファイルの URL。この URL は公開されている必要があります。",
              "example": "https://example.com/accessory.jpg"
            }
          }
        }
      },
      "BasicRunTaskV2RefFileIds": {
        "type": "object",
        "properties": {
          "ref_file_ids": {
            "type": "array",
            "minItems": 1,
            "items": {
              "type": "string",
              "description": "タスクを実行するための参照ファイルの ID。ファイルアップロード API から取得したファイル ID です。",
              "example": "pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE="
            }
          }
        }
      },
      "BasicRunTaskV2SrcFileId": {
        "type": "object",
        "required": [
          "src_file_id"
        ],
        "properties": {
          "src_file_id": {
            "type": "string",
            "description": "タスクを実行するファイルの ID。ファイルアップロード API から取得したファイル ID です。",
            "example": "pfNK5PuRe0MrwLHcGA3DOmB1ahwfXTbYHjv+KoBIxbE="
          }
        }
      },
      "BasicRunTaskV2WithMultiRef": {
        "title": "BasicRunTaskV2WithRef",
        "anyOf": [
          {
            "allOf": [
              {
                "title": "src ファイル URL と参照ファイル URL でタスクを実行"
              },
              {
                "$ref": "#/components/schemas/BasicRunTaskV2SrcFileUrl"
              },
              {
                "$ref": "#/components/schemas/BasicRunTaskV2RefFileUrls"
              }
            ]
          },
          {
            "allOf": [
              {
                "title": "src ファイル URL と参照ファイル ID でタスクを実行"
              },
              {
                "$ref": "#/components/schemas/BasicRunTaskV2SrcFileUrl"
              },
              {
                "$ref": "#/components/schemas/BasicRunTaskV2RefFileIds"
              }
            ]
          },
          {
            "allOf": [
              {
                "title": "src ファイル ID と参照ファイル URL でタスクを実行"
              },
              {
                "$ref": "#/components/schemas/BasicRunTaskV2SrcFileId"
              },
              {
                "$ref": "#/components/schemas/BasicRunTaskV2RefFileUrls"
              }
            ]
          },
          {
            "allOf": [
              {
                "title": "src ファイル ID と参照ファイル ID でタスクを実行"
              },
              {
                "$ref": "#/components/schemas/BasicRunTaskV2SrcFileId"
              },
              {
                "$ref": "#/components/schemas/BasicRunTaskV2RefFileIds"
              }
            ]
          }
        ]
      },
      "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"
                }
              }
            }
          }
        }
      }
    }
  }
}