{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/develop/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"youcam-cli","description":"YouCam API documentation by Perfect Corp. Learn how to use Skin analysis API, Virtual try-on API, Image editing API, and Video generative AI APIs.","siteUrl":"https://docs.perfectcorp.com","keywords":"AI Skin Analysis, AI Clothes, AI Hairstyle, AI Outfits","image":"/assets/favicon.cd6fa4d833b2a573b3c6dae68386b293da205b203402cb0c97b80bd2acc07ea2.8351e24f.png"},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"youcam-cli","__idx":0},"children":["youcam-cli"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam"]}," は ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://yce.perfectcorp.com/ai-api"},"children":["YouCam AI API"]}," のコマンドラインインターフェースです。顔と体の編集、ヘア、肌分析、メイク、バーチャル試着、背景・写真編集、画像・動画生成など、すべての AI 機能をターミナルから、API と同じモデル・同じパラメータで実行できます。タスクステータスの確認、プリセットテンプレートの参照、ユニットと各機能の消費量も参照できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["機能の評価、統合の開発、パイプラインの自動化のいずれにも使えます。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["YouCam API の AI 機能を評価する"]},": ご自身の写真で機能を実行して結果を確認できます。スタイルの比較や、機能が製品に合致するかの検証に利用できます。コードは不要です。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["API を統合する"]},": コードを書く前に、任意のエンドポイントをターミナルから試せます。オプションはリクエストのフィールドと 1対1 で対応し、各機能は ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#available-ai-features"},"children":["API レファレンス"]}," にリンクされています。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["AI エージェント"]},": Claude Code、Cursor、Codex などのエージェントは、YouCam の全機能を通常のシェルコマンドとして利用できます。すべてのコマンドは JSON を出力し、失敗時に終了コード 1 で終了します。すべての機能とオプションは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--help"]}," に自己説明文が含まれ、無効な値はリクエスト送信前に拒否されます。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["自動化とバッチジョブ"]},": シェルスクリプト、CI パイプライン、コンテナから、商品写真やポートレートのフォルダー全体に対して機能を実行できます。ローカルファイルは CLI が自動的にアップロードするため、アップロード手順をスクリプトに書く必要はありません。"]}]},{"$$mdtype":"Tag","name":"hr","attributes":{},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"動作条件","__idx":1},"children":["動作条件"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://nodejs.org/"},"children":["Node.js"]}," 18 以上"]},"（および npm）。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://yce.perfectcorp.com/api-console/en/api-keys/"},"children":["YouCam API キー"]},"。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"インストール","__idx":2},"children":["インストール"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"npm install -g @youcam_cli/youcam-cli\n\n# Verify the installation\nyoucam --help\n\n# Version of the YouCam CLI\nyoucam --version\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["アンインストールには ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["npm uninstall -g @youcam_cli/youcam-cli"]}," を実行してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"認証","__idx":3},"children":["認証"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam auth login <apiKey>"]}," で API キーを 1 度保存すると、キーはローカルに保存され、以降のすべてのコマンドで再利用されます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam auth login <apiKey>\n\n# or explicitly with a flag\nyoucam auth login --api-key <apiKey>\n\n# Remove the saved API key (logout CLI tool)\nyoucam auth logout\n\n# List the available authentication options\nyoucam auth --help\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["auth login"]}," はキーをプレーンな JSON ファイル ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["~/.youcam-cli/credentials.json"]}," に書き込みます："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"apiKey\": \"<your-api-key>\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["すべての ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["run"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["template"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client"]}," コマンドがこのファイルを自動的に読み取ります。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["環境変数 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YOUCAM_CLI_API_KEY"]}," が設定されている場合、保存されたキーより優先されます。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"クイックスタート","__idx":4},"children":["クイックスタート"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ユニットの確認から結果のダウンロードまで、初めての AI タスクを実行してみます。ここでは実際に 1 つのタスクを実行するため、ユニットを消費します（",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#checking-feature-cost"},"children":["機能の消費量の確認"]}," を参照）。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["YouCam のすべての機能はバックグラウンドタスクとして実行されます。開始すると ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_id"]}," が返され、その ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_id"]}," を結果が準備できるまで確認し続けます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["1. インストールとログイン"]},"（詳細は ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#installation"},"children":["インストール"]}," と ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#authentication"},"children":["認証"]}," を参照）"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"npm install -g @youcam_cli/youcam-cli\nyoucam auth login <apiKey>\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["2. ユニットを確認する"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam client credit\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["レスポンス："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"status\": 200,\n  \"results\": [\n {\n \"id\": 0,\n \"type\": \"ApiPaygToken\",\n \"amount\": 8193,\n \"amount_dec\": 8193,\n \"expiry\": 1801958399000\n }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["amount"]}," は各エントリのユニット数、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["expiry"]}," は失効時期（Unix エポックからのミリ秒）です。API がユニットを \"credit\"（クレジット）と呼んでいるため、コマンド名が ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["credit"]}," になっています（",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#units-and-feature-cost"},"children":["ユニットと機能の消費量"]}," を参照）。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["3. タスクを開始する"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ここでは ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_photo_enhance/v1.0/paths/~1s2s~1v2.0~1task~1enhance/post"},"children":["AI Photo Enhance"]}," を使い、サンプル写真の解像度を 2 倍にします："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam run enhance --src_file \"https://plugins-media.makeupar.com/strapi/assets/hair_color_03_81c0c8a3c8.jpg\" --scale 2\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["レスポンス："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"status\": 200,\n  \"data\": {\n \"task_id\": \"32tu4jQvRbI9NfnKlw13cls8tyT1zA2ZoOtKq-RkiTL_FrIEOLYHJX1HxYVrnWz\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["CLI は次のステップのコマンドも表示します。これは標準エラー出力に出力されるため、標準出力はスクリプト向けの純粋な JSON のままになります："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"Run `youcam status enhance 32tu4jQvRbI9NfnKlw13cls8tyT1zA2ZoOtKq-RkiTL_FrIEOLYHJX1HxYVrnWz` to check the result.\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ご自身の写真を使う場合は、ローカルパスを指定してください。例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--src_file ./photo.jpg"]},"。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["4. 結果を確認してダウンロードする"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam status enhance <task_id>\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["タスクの処理中は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_status"]}," が ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["running"]}," です。数秒後にコマンドを再実行してください。完了すると："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"status\": 200,\n  \"data\": {\n \"error\": null,\n \"results\": {\n \"url\": \"https://yce-us.s3-accelerate.amazonaws.com/ttl30/.../509f8acd-8d41-4459-aa31-1d4738d7a922.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&...&X-Amz-Expires=7200&...\"\n },\n \"task_status\": \"success\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["results.url"]}," は補正後の画像です。これは 2 時間で失効する署名付きリンク（",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Amz-Expires=7200"]},"）なので、早めにダウンロードしてください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["次のステップ"]}]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#available-ai-features"},"children":["利用可能な AI 機能"]}," を参照し、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam run <feature> --help"]}," で各機能のオプションを確認してください。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["オプション、ファイル、JSON パラメータの仕組みは ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#running-an-ai-task"},"children":["AI タスクの実行"]}," を参照してください。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["一部の機能は顔や体を先に検出します。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#pre-process-face-and-body-detection"},"children":["前処理（顔と体の検出）"]}," を参照してください。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ユニットと機能の消費量","__idx":5},"children":["ユニットと機能の消費量"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ユニットは YouCam API を利用するために消費する単位で、AI 機能ごとに消費数が異なります。API でも CLI でもユニットは \"credit\"（クレジット）と呼ばれるため、コマンド名は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client credit"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["client credit-history"]}," になっています。公式 FAQ の ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/develop/faq"},"children":["「ユニット」とはどのような意味で、どのように使われますか？"]}," を参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ユニットの確認","__idx":6},"children":["ユニットの確認"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam client credit  # remaining units\nyoucam client credit-history  # unit usage history\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"機能の消費量の確認","__idx":7},"children":["機能の消費量の確認"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["大規模に実行する前に、各機能がいくつのユニットを消費するかを確認できます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam client feature-cost\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["これらのコマンドは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--page_size"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--starting_token <token>"]}," で結果をページ分けします："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["credit-history"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--page_size <1-30>"]},"、既定は 20。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["feature-cost"]},": ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--page_size <1-20>"]},"、既定は 20。"]}]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["注: ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#pre-process-face-and-body-detection"},"children":["前処理"]}," の検出タスクと ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#listing-predefined-templates"},"children":["プリセットテンプレートの取得"]}," はユニットを消費しません。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"コマンド概要","__idx":8},"children":["コマンド概要"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"youcam <command> [options]\n\nCommands:\n  auth Manage authentication credentials\n  run  Run an AI task\n  status  Check the status of an AI task\n  template   List predefined templates\n  client  Get account/credit info\n  help Display help for a command\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["すべてのコマンドとサブコマンドは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-h, --help"]}," をサポートしており、それぞれの使い方とオプションを表示します："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam run --help\nyoucam run face-swap --help\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["結果は JSON で出力されます。リクエストが失敗すると、コマンドは終了コード 1 で終了します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"api--cli-コマンドの対応","__idx":9},"children":["API ↔ CLI コマンドの対応"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["API レファレンスのすべてのエンドポイントは、規則的な方法で CLI コマンドに対応します："]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"REST エンドポイント"},"children":["REST エンドポイント"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"CLI コマンド"},"children":["CLI コマンド"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /s2s/v{ver}/task/{feature}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam run <feature> [options]"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /s2s/v{ver}/task/{feature}/{task_id}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam status <feature> <task_id>"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /s2s/v{ver}/task/{feature}/pre-process"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam run pre-process <feature> [options]"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /s2s/v{ver}/task/{feature}/pre-process/{task_id}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam status pre-process <feature> <task_id>"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /s2s/v{ver}/task/template/{feature}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam template <feature> [--page_size] [--starting_token]"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["公開されている makeup-vto のパターンカタログ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam template makeup-vto <categories...>"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /s2s/v1.0/client/credit"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam client credit"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /s2s/v1.0/client/credit/history"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam client credit-history [--page_size] [--starting_token]"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /s2s/v2.0/credit/feature-cost"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam client feature-cost [--page_size] [--starting_token]"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /s2s/v2.0/file"]}," + 署名付き ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT"]}," アップロード"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ファイルオプションにローカルパスを渡すと自動実行されます（",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#uploading-files"},"children":["ファイルのアップロード"]}," を参照）"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["API レファレンスから ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<feature>"]}," を導くための目安："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["CLI の機能名は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{task_id}"]}," の直前にあるパスセグメントです。例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/s2s/v2.0/task/abs-shape/{task_id}"]}," → ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["abs-shape"]},"。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["API バージョンのプレフィックス（",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v2.0"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v2.1"]}," など）は CLI が自動的に扱います。各コマンドはAPI レファレンスで最新の API バージョンを呼び出します。例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["skin-analysis"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hair-transfer"]}," は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/s2s/v2.1/..."]}," を呼び出します。複数のエンジンバージョンがある機能は、最新版のみを提供します。例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloth-v4"]}," は利用できますが ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloth-v3"]}," はできません。"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["一部のエンドポイントには余分なパスセグメントが含まれます。それを取り除くと CLI 名になります："]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"API パス"},"children":["API パス"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"CLI コマンド"},"children":["CLI コマンド"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/s2s/v2.0/task/2d-vto/earring"]},"（",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["necklace"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ring"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bracelet"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["watch"]}," も同じ）"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam run earring"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/s2s/v2.0/task/image-to-image/youcam"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/text-to-image/youcam"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/image-to-video/youcam"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/text-to-video/youcam"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam run image-to-image"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["run text-to-image"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["run image-to-video"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["run text-to-video"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/s2s/v2.0/task/colorize/color-correct"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam run color-correct"]}]}]}]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["リクエストボディのプロパティは、対応する ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["run"]}," コマンドの ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--<property_name>"]}," オプションになります（",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#uploading-files"},"children":["ファイルのアップロード"]}," と ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#passing-json-parameters"},"children":["JSON パラメータの渡し方"]}," を参照）。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["page_size"]}," や ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["starting_token"]}," などのクエリパラメータも ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--<param_name>"]}," オプションになります。"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_hair_color/v1.0/paths/~1s2s~1v2.0~1task~1hair-color/post"},"children":["AI Hair Color Virtual Try-On"]}," を例にすると、2 つのエンドポイントは次の通りです："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"POST /s2s/v2.0/task/hair-color   { src_file_url | src_file_id, preset?, pattern?, palettes? }\nGET  /s2s/v2.0/task/hair-color/{task_id}\n"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["これは次の CLI コマンドに対応します："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam run hair-color --src_file <url-or-path> [--preset <value> | --pattern <json> --palettes <json>]\nyoucam status hair-color <task_id>\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["プリセットの色を適用するには："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam run hair-color --src_file \"https://plugins-media.makeupar.com/strapi/assets/hair_color_09_76a7a1081e.jpg\" --preset \"Honey Blonde\"\nyoucam status hair-color <task_id>\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["run"]}," コマンドは次のリクエストボディを送信します："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"src_file_url\": \"https://plugins-media.makeupar.com/strapi/assets/hair_color_09_76a7a1081e.jpg\",\n  \"preset\": \"Honey Blonde\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["代わりにカスタム色を適用するには、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pattern"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["palettes"]}," のオブジェクトを渡します："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam run hair-color --src_file \"https://plugins-media.makeupar.com/strapi/assets/hair_color_09_76a7a1081e.jpg\" \\\n  --pattern '{\"name\": \"full\"}' \\\n  --palettes '[{\"color\": \"#8B4513\", \"color_intensity\": 80, \"shine_intensity\": 50}]'\nyoucam status hair-color <task_id>\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["対応する JSON リクエストボディは次の通りです："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"src_file_url\": \"https://plugins-media.makeupar.com/strapi/assets/hair_color_09_76a7a1081e.jpg\",\n  \"pattern\": { \"name\": \"full\" },\n  \"palettes\": [{ \"color\": \"#8B4513\", \"color_intensity\": 80, \"shine_intensity\": 50 }]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam run"]}," は新しい ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_id"]}," を出力します。それを ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam status"]}," に渡し、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_status"]}," が ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["success"]}," になるまで繰り返してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ai-タスクの実行","__idx":10},"children":["AI タスクの実行"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["各 AI 機能は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["run"]}," のサブコマンドです。オプションは機能ごとに異なります。各機能の入力は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--help"]}," で確認してください。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam run <feature> [options]\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例えば ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_abs_filter/v1.0/paths/~1s2s~1v2.0~1task~1abs-shape/post"},"children":["AI Abs Filter"]}," を実行するには："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam run abs-shape --src_file \"https://example.com/photo.jpg\" --mode \"Six-pack\" --intensity 2\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["タスクの実行は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_id"]}," を返します。それを使って ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#checking-task-status"},"children":["ステータスを確認"]},"します。"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["前処理:"]}," 一部の機能は写真内の顔または体を先に検出するため、処理する人物を選べます。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#pre-process-face-and-body-detection"},"children":["前処理（顔と体の検出）"]}," を参照してください。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["テンプレート:"]}," 一部の機能は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--template_id"]}," で既製のスタイルプリセットを受け付けます。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#listing-predefined-templates"},"children":["プリセットテンプレートの取得"]}," を参照してください。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["検証:"]}," オプションの値は、送信前に API スキーマに照らしてチェックされます。値の集合が固定されているオプションは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--help"]}," にその一覧が表示され、無効な値は許可されている選択肢とともに拒否されます。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ファイルのアップロード","__idx":11},"children":["ファイルのアップロード"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["画像または動画を受け取る全機能は、単一の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--src_file"]}," オプションとして公開しています。API は相互排他な 2 つのフィールド——",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["src_file_url"]},"（公開 URL）と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["src_file_id"]},"（アップロード済みファイルの ID）——を受け付けますが、CLI は渡された値に応じて正しい方を選びます："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["公開されている URL"]}," は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["src_file_url"]}," として送信されます。何もアップロードされません。",{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam run enhance --src_file \"https://example.com/photo.jpg\" --scale 2\n","lang":"bash"},"children":[]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ローカルファイルのパス"]}," は CLI がアップロードし、タスクは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["src_file_id"]}," を使って送信されます：",{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /s2s/v2.0/file"]}," でファイルを登録し（名前、コンテンツタイプ、サイズ）、署名付きアップロード URL と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["file_id"]}," を受け取ります。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ファイルのバイト列をその署名付き URL へ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["PUT"]}," します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["run <feature>"]}," を ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["src_file_id"]}," にその ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["file_id"]}," を設定して呼び出します。"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam run enhance --src_file ./photo.jpg --scale 2\n","lang":"bash"},"children":[]},"PowerShell や cmd では Windows のパスも使えます：",{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"powershell","header":{"controls":{"copy":{}}},"source":"youcam run enhance --src_file .\\photo.jpg --scale 2\n","lang":"powershell"},"children":[]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["補足："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["ローカルファイルは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".jpg"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".jpeg"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".png"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".mp4"]}," のいずれかである必要があります。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["サイズ、解像度、再生時間の上限は機能に依存します。上限を超えたファイルは、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," で ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["exceed_max_filesize"]}," によりタスクが失敗します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["個別のアップロード用 CLI コマンドはありません。アップロードはファイルオプションを通じてのみ行われます。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"その他のファイルオプション","__idx":12},"children":["その他のファイルオプション"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--src_file"]}," に加え、一部の機能は追加の画像（マスク、参照写真、商品写真）を受け取ります。ルールは同じです。公開 URL またはローカルパスを渡すと、ローカルパスは CLI がアップロードします。"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"オプション"},"children":["オプション"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"内容"},"children":["内容"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"値の数"},"children":["値の数"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"使用する機能"},"children":["使用する機能"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--src_file <input>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["主な元になる写真または動画"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["単一"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ほとんどの機能"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--src_files <inputs...>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["複数の元写真"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["複数"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hair-frizziness-detection"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hair-type-detection"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["image-to-image"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--ref_file <input>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["手本とする参照画像（例: メイクのスタイル、衣装、商品）"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["単一"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bag"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cloth-v4"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eye-color-vto"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hair-transfer"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hat"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["mu-transfer"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ai-nail"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["scarf"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["shoes-transfer"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bg-replace-vid"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["face-swap-vid"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--ref_files <inputs...>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["複数の参照画像（例: 対象 1 人につき 1 枚の顔、商品写真）"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["複数"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bracelet"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["earring"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["face-swap"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["nail-vto"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["necklace"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ring"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["watch"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--msk_file <input>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["元画像に対するマスク。白が変更する領域、黒がそのまま残す領域です"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["単一"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["generative-fill"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["obj-replace"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["obj-rem-vid"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--srcmsk_file <input>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["元画像内の対象部位（例: 耳、首、手首）を切り出すマスク"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["単一"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bracelet"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["earring"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["necklace"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ring"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["watch"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--refmsk_files <inputs...>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["各 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--ref_files"]}," エントリに対応するマスクを同じ順番で"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["複数"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bracelet"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["earring"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ring"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["watch"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["..."]}," の付いたオプションは、1 つのフラグの後に複数の値をスペース区切りで受け取ります（カンマ区切りではありません）："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam run face-swap \\\n  --src_file group-photo.jpg \\\n  --ref_files person-a.jpg person-b.jpg \\\n  --face_mapping '[{\"index\":0,\"position\":0},{\"index\":1,\"position\":1}]'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["複数の値を取るオプションに公開 URL とローカルパスが混在する場合（例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--ref_files https://example.com/a.jpg ./b.jpg"]},"）、その中のすべてのファイルがアップロードされます（URL も含まれます）。CLI は各 URL をダウンロードし、ローカルファイルと同じようにアップロードしたうえで、すべてをファイル ID（例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ref_file_ids"]},"）として送信します。その場合、URL は JPG、PNG、MP4 を配信している必要があります。URL を URL のまま送信したい場合は、そのオプションに URL のみを渡してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["各機能がこれらのうちどれを受け付けるかは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam run <feature> --help"]}," で確認できます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"オプションの記述形式","__idx":13},"children":["オプションの記述形式"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下に挙げる形式はいずれも同等です。お好みのものを使ってください："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam run skin-simulation --src_file https://example.com/face.png --acne 1\nyoucam run skin-simulation --src_file=https://example.com/face.png --acne=1\nyoucam run skin-simulation --src_file=\"https://example.com/face.png\" --acne=\"1\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["クォートが必要になるのは、値にスペースやシェルが特別に扱う文字が含まれる場合です（例: URL 内の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["&"]},"、JSON など）。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["複数の値を取るオプションは、1 つのフラグの後にスペース区切りで並べるか、フラグを繰り返して指定します：",{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--src_files a.jpg b.jpg"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--src_files=a.jpg --src_files=b.jpg"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--src_files=a.jpg b.jpg"]}," は不正のため拒否されます。"]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"json-パラメータの渡し方","__idx":14},"children":["JSON パラメータの渡し方"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--help"]}," で ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<value>"]}," ではなく ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<json>"]}," と表示されるオプションは、API リクエストボディ内の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["object"]}," または ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["array"]}," フィールドに対応します。構造全体を 1 つの JSON 値として渡してください："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["インラインの JSON、例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--pattern '{\"name\":\"full\"}'"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":[".json"]}," ファイルへのパス、例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--effects ./effects.json"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["-"]}," で標準入力から JSON を読み込む、例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["cat effects.json | youcam run makeup-vto --src_file photo.jpg --effects -"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["インライン JSON のクォーティング："]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# bash / zsh / macOS / Linux / Git Bash: single quotes protect the double quotes\nyoucam run hair-color --src_file photo.jpg --pattern '{\"name\":\"full\"}' --palettes '[{\"color\":\"#8B4513\",\"color_intensity\":80,\"shine_intensity\":50}]'\n\n# Windows PowerShell: escape the inner double quotes\nyoucam run hair-color --src_file photo.jpg --pattern '{\\\"name\\\":\\\"full\\\"}' --palettes '[{\\\"color\\\":\\\"#8B4513\\\",\\\"color_intensity\\\":80,\\\"shine_intensity\\\":50}]'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["ネストされたオブジェクトと配列："]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hair-color"]}," の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--pattern"]}," は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["object"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--palettes"]}," は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{color, color_intensity, shine_intensity}"]}," オブジェクトの ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["array"]}," です（full モードなら 1 つ、ombre モードなら 2 つ）："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam run hair-color \\\n  --src_file photo.jpg \\\n  --pattern '{\"name\":\"full\"}' \\\n  --palettes '[{\"color\":\"#FF5733\",\"color_intensity\":80,\"shine_intensity\":50}]'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["photo.jpg"]}," がアップロードされて ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["src_file_id"]}," に解決されると、CLI は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /s2s/v2.0/task/hair-color"]}," へ次のボディを送信します："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"src_file_id\": \"<file_id from the upload>\",\n  \"pattern\": {\n \"name\": \"full\"\n  },\n  \"palettes\": [\n {\n \"color\": \"#FF5733\",\n \"color_intensity\": 80,\n \"shine_intensity\": 50\n }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["各 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--<option> <json>"]}," の値は、そのままそのプロパティの値として使われます。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--pattern"]}," は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pattern"]}," オブジェクトに、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--palettes"]}," は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["palettes"]}," 配列になります。名前の変更も構造の変更もされず、指定しなかったオプションにデフォルト値が追加されることもありません。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["深くネストされた配列："]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["makeup-vto"]}," の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--effects"]}," はエフェクトオブジェクトの配列で、一部のオブジェクトは独自の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["pattern"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["palettes"]}," を持ちます。複数行の JSON も使えます："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam run makeup-vto --src_file photo.jpg --effects '[\n  {\"category\":\"skin_smooth\",\"skinSmoothStrength\":55,\"skinSmoothColorIntensity\":45},\n  {\"category\":\"blush\",\"pattern\":{\"name\":\"1color1\"},\"palettes\":[\n {\"color\":\"#e19f9f\",\"texture\":\"matte\",\"colorIntensity\":60}\n  ]}\n]'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1color1"]}," のようなパターン名は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam template makeup-vto"]}," から取得します（",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#listing-makeup-vto-pattern-names"},"children":["makeup-vto パターン名の取得"]}," を参照）。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["不正な JSON や型の合わない値は、リクエスト送信前に拒否され、問題のあるフィールド名が示されます。例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Invalid value for --palettes: [{\"color\":123}] (0.color: Invalid input: expected string, received number)"]},"。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"タスクステータスの確認","__idx":15},"children":["タスクステータスの確認"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam status <feature> <task_id>\n# or\nyoucam status <feature> --task_id <task_id>\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam status abs-shape 1234567890abcdef\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_status"]}," が ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["success"]},"（または ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]},"）になるまでポーリングしてください。その時点でレスポンスには結果（出力ファイルの URL など）が含まれます。前処理タスクの場合は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam status pre-process <feature> <task_id>"]}," を使ってください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"前処理顔と体の検出","__idx":16},"children":["前処理（顔と体の検出）"]},{"$$mdtype":"Tag","name":"blockquote","attributes":{},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["前処理タスクはユニットを消費しません。ユニットを消費するのはメインタスクのみです。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下の機能では、1 枚の写真に複数の人物が写っていることがあるため、処理する人物を選びます。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam run pre-process <feature>"]}," は写真内の顔または体を検出し、リストとして返します。各検出結果はリスト中の位置によって番号が振られます：1 番目が ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]},"、2 番目が ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]},"、以下同です。"]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["検出する：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam run pre-process <feature> --src_file <photo>"]}," が ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_id"]}," を返します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["検出結果を読む：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam status pre-process <feature> <task_id>"]}," で検出された顔または体の一覧を取得します。一覧の形は機能によって異なります。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["body-reshape"]}," は画像サイズに対する相対値（",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]},"–",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]},"）のボックスを含む ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["results.result[]"]}," を返し、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["face-swap"]}," はピクセル単位のボックス ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["[x1, y1, x2, y2]"]},"（左上と右下の角）を含む ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["results.faces[].bbox"]}," を返します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["同じ写真に対して機能を実行し、選んだ番号を下の表のオプションで渡します："]}]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"機能"},"children":["機能"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"検出された顔または体の番号を受け取るオプション"},"children":["検出された顔または体の番号を受け取るオプション"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["body-reshape"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--index <number>"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["face-lift"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--index <number>"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["face-reshape"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--index <number>"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fitzpatrick-scale-analyzer"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--index <number>"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["teeth-whiten"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--index <number>"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["face-swap"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["各 ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--face_mapping"]}," エントリの ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"position\""]},"。同じエントリの ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"index\""]}," は、どの ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--ref_files"]}," 画像を使うかを示します"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例えば ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam run face-lift --src_file <photo> --index 1 ..."]}," は、2 番目に検出された顔をリフトします。実際の出力を伴う一連の実行は ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#example-workflow"},"children":["使用例のワークフロー"]}," を参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"プリセットテンプレートの取得","__idx":17},"children":["プリセットテンプレートの取得"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["一部の機能には既製のテンプレート（スタイルやルックのプリセット）が搭載されており、パラメータを自作する代わりに ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--template_id"]}," で参照できます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam template <feature> [--page_size <1-20>] [--starting_token <token>]\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<feature>"]}," には次のいずれかを指定します："]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"カテゴリー"},"children":["カテゴリー"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"機能"},"children":["機能"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ヘア＆ヒゲ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hair-bang"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hair-curl"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hair-ext"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hair-transfer"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["hair-vol"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["beard-style"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["メイク＆試着"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["look-vto"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["fabric"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["画像"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ai-avatar"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ai-studio"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["headshot"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bg-replace"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["動画"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["video-trans"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["makeup-vto"]}," のパターンの詳細は ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#listing-makeup-vto-pattern-names"},"children":["makeup-vto パターン名の取得"]}," を参照してください。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["例："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam template ai-avatar --page_size 10\nyoucam run ai-avatar --src_file ./photo.jpg --template_id <id> --output_count 1\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["レスポンスの ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["next_token"]}," を ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--starting_token"]}," として渡すと、次のページを取得できます。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ai-avatar"]}," タスクが成功すると、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam status ai-avatar <task_id>"]}," は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["results.output[].url"]}," に生成された画像を一覧します。出力 1 件ごとに 1 エントリです。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"makeup-vto-パターン名の取得","__idx":18},"children":["makeup-vto パターン名の取得"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["makeup-vto"]}," のエフェクトは名前によって形状を選びます。例：チークなら ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"pattern\":{\"name\":\"1color1\"}"]},"、リップカラーなら ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"shape\":{\"name\":\"plump\"}"]},"。各エフェクトカテゴリーで有効な名前を取得できます："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam template makeup-vto <categories...>\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["blush"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["bronzer"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["contour"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eyebrows"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eyeliner"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eyeshadow"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["eyelashes"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lipshape"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["lipliner"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["highlighter"]}," のうち 1 つ以上を指定します（同じ名を ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--category"]}," の後に並べることもできます）。最低 1 つは必須です。これらのカタログは公開されているため、取得にユニットは不要です。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam template makeup-vto blush lipshape\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["結果はカテゴリーごとにまとまります。パターンの名前として各エントリの ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["label"]}," を使用してください。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["colorNum"]},"（blush、eyeliner、eyeshadow のみ）は、そのパターンが必要とする ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["palettes"]}," の数です："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"blush\": [\n {\n \"category\": \"1 color\",\n \"label\": \"1color1\",\n \"thumbnail\": \"https://app-cdn-01.makeupar.com/.../a53cd4f4-43b6-4e19-b85a-ec7a95c6a47f.jpg\",\n \"tags\": [\n  { \"id\": 100, \"name\": \"Blush 3D\" },\n  { \"id\": 103, \"name\": \"Oblong\" }\n ],\n \"colorNum\": 1\n }\n  ],\n  \"lipshape\": [\n {\n \"category\": \"general\",\n \"label\": \"original\",\n \"thumbnail\": \"https://plugins-media.makeupar.com/wcm-saas/images/lipshapes/original.png\",\n \"tags\": []\n }\n  ]\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["取得できなかったカテゴリーは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ \"error\": \"...\" }"]}," として表示され、コマンドは終了コード 1 で終了します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"利用可能な-ai-機能","__idx":19},"children":["利用可能な AI 機能"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["以下のいずれかを ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<feature>"]}," として ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["run"]}," と ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," に指定してください。それぞれ API レファレンスのページにリンクしています。検出ステップがある機能は",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#pre-process-face-and-body-detection"},"children":["前処理（顔と体の検出）"]},"を、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam template"]}," が使える機能は",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#listing-predefined-templates"},"children":["プリセットテンプレートの取得"]},"を参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"メイク","__idx":20},"children":["メイク"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/makeup_vto/v1.0/paths/~1s2s~1v2.0~1task~1makeup-vto/post"},"children":["makeup-vto"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#listing-makeup-vto-pattern-names"},"children":["パターン名"]}]}]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_makeup_transfer/v1.0/paths/~1s2s~1v2.0~1task~1mu-transfer/post"},"children":["mu-transfer"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_look_vto/v1.0/paths/~1s2s~1v2.0~1task~1look-vto/post"},"children":["look-vto"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_eye_color_lens/v1.0/paths/~1s2s~1v2.0~1task~1eye-color-vto/post"},"children":["eye-color-vto"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_nail_vto/v1.0/paths/~1s2s~1v2.0~1task~1nail-vto/post"},"children":["nail-vto"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_nail_transfer/v1.0/paths/~1s2s~1v2.0~1task~1ai-nail/post"},"children":["ai-nail"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"肌顔体","__idx":21},"children":["肌、顔、体"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_face_analyzer/v1.0/paths/~1s2s~1v2.0~1task~1face-attr-analysis/post"},"children":["face-attr-analysis"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_skin_analysis/"},"children":["skin-analysis"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_skin_tone_analysis/v1.0/paths/~1s2s~1v2.0~1task~1skin-tone-analysis/post"},"children":["skin-tone-analysis"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_fitzpatrick_skin_type/v1.0/paths/~1s2s~1v2.0~1task~1fitzpatrick-scale-analyzer/post"},"children":["fitzpatrick-scale-analyzer"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_skin_simulation/v1.0/paths/~1s2s~1v2.0~1task~1skin-simulation/post"},"children":["skin-simulation"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_abs_filter/v1.0/paths/~1s2s~1v2.0~1task~1abs-shape/post"},"children":["abs-shape"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_aging_simulation/v1.0/paths/~1s2s~1v2.0~1task~1aging/post"},"children":["aging"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_body_reshape/v1.0/paths/~1s2s~1v2.0~1task~1body-reshape/post"},"children":["body-reshape"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_breast_augmentation/v1.0/paths/~1s2s~1v2.0~1task~1breast-shape/post"},"children":["breast-shape"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_face_lift/v1.0/paths/~1s2s~1v2.0~1task~1face-lift/post"},"children":["face-lift"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_face_reshape/v1.0/paths/~1s2s~1v2.0~1task~1face-reshape/post"},"children":["face-reshape"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_smile/v1.0/paths/~1s2s~1v2.0~1task~1ai-smile/post"},"children":["ai-smile"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_teeth_whitening/v1.0/paths/~1s2s~1v2.0~1task~1teeth-whiten/post"},"children":["teeth-whiten"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ヘアヒゲ","__idx":22},"children":["ヘア＆ヒゲ"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_hair_density_detection/v1.0/paths/~1s2s~1v2.0~1task~1hair-density-detection/post"},"children":["hair-density-detection"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_hair_frizziness_detection/v1.0/paths/~1s2s~1v2.0~1task~1hair-frizziness-detection/post"},"children":["hair-frizziness-detection"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_hair_length_detection/v1.0/paths/~1s2s~1v2.0~1task~1hair-length-detection/post"},"children":["hair-length-detection"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_hair_type_detection/v1.0/paths/~1s2s~1v2.0~1task~1hair-type-detection/post"},"children":["hair-type-detection"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_bangs/v1.0/paths/~1s2s~1v2.0~1task~1hair-bang/post"},"children":["hair-bang"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_hair_color/v1.0/paths/~1s2s~1v2.0~1task~1hair-color/post"},"children":["hair-color"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_wavy_hair/v1.0/paths/~1s2s~1v2.0~1task~1hair-curl/post"},"children":["hair-curl"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_hair_extension/v1.0/paths/~1s2s~1v2.0~1task~1hair-ext/post"},"children":["hair-ext"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_hairstyle/v2.1/paths/~1s2s~1v2.1~1task~1hair-transfer/post"},"children":["hair-transfer"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_hair_volume/v1.0/paths/~1s2s~1v2.0~1task~1hair-vol/post"},"children":["hair-vol"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_beard_style/v1.0/paths/~1s2s~1v2.0~1task~1beard-style/post"},"children":["beard-style"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"バーチャル試着","__idx":23},"children":["バーチャル試着"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_earrings/v1.0/paths/~1s2s~1v2.0~1task~12d-vto~1earring/post"},"children":["earring"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_necklace/v1.0/paths/~1s2s~1v2.0~1task~12d-vto~1necklace/post"},"children":["necklace"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ring_vto/v1.0/paths/~1s2s~1v2.0~1task~12d-vto~1ring/post"},"children":["ring"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_bracelet/v1.0/paths/~1s2s~1v2.0~1task~12d-vto~1bracelet/post"},"children":["bracelet"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_watch/v1.0/paths/~1s2s~1v2.0~1task~12d-vto~1watch/post"},"children":["watch"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_bag/v2.0/paths/~1s2s~1v2.0~1task~1bag/post"},"children":["bag"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_hat/v2.0/paths/~1s2s~1v2.0~1task~1hat/post"},"children":["hat"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_scarf/v2.0/paths/~1s2s~1v2.0~1task~1scarf/post"},"children":["scarf"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_clothes/v4.0/paths/~1s2s~1v2.0~1task~1cloth-v4/post"},"children":["cloth-v4"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_fabric/v1.0/paths/~1s2s~1v2.0~1task~1fabric/post"},"children":["fabric"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_shoes/v3.0/paths/~1s2s~1v2.0~1task~1shoes-transfer/post"},"children":["shoes-transfer"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"画像","__idx":24},"children":["画像"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_photo_enhance/v1.0/paths/~1s2s~1v2.0~1task~1enhance/post"},"children":["enhance"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_photo_lighting/v2.0/paths/~1s2s~1v2.0~1task~1lighting/post"},"children":["lighting"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_photo_colorize/v1.0/paths/~1s2s~1v2.0~1task~1colorize/post"},"children":["colorize"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_color_correction/v1.0/paths/~1s2s~1v2.0~1task~1colorize~1color-correct/post"},"children":["color-correct"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_background_removal/v1.0/paths/~1s2s~1v2.0~1task~1sod/post"},"children":["sod"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_photo_background_blur/v2.0/paths/~1s2s~1v2.0~1task~1bg-blur/post"},"children":["bg-blur"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_photo_background_change/v2.0/paths/~1s2s~1v2.0~1task~1bg-replace/post"},"children":["bg-replace"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_object_removal_pro/v4.0/paths/~1s2s~1v2.0~1task~1generative-fill/post"},"children":["generative-fill"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_replace/v1.0/paths/~1s2s~1v2.0~1task~1obj-replace/post"},"children":["obj-replace"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_image_extender/v2.0/paths/~1s2s~1v2.0~1task~1out-paint/post"},"children":["out-paint"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_image_generator/v2.0/paths/~1s2s~1v2.0~1task~1image-to-image~1youcam/post"},"children":["image-to-image"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_image_generator/v2.0/paths/~1s2s~1v2.0~1task~1text-to-image~1youcam/post"},"children":["text-to-image"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_avatar_generator/v3.0/paths/~1s2s~1v2.0~1task~1ai-avatar/post"},"children":["ai-avatar"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_studio_generator/v3.0/paths/~1s2s~1v2.0~1task~1ai-studio/post"},"children":["ai-studio"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_headshot_generator/v1.0/paths/~1s2s~1v2.0~1task~1headshot/post"},"children":["headshot"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_watermark_removal/v1.0/paths/~1s2s~1v2.0~1task~1wmk-removal/post"},"children":["wmk-removal"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_face_swap/v1.0/paths/~1s2s~1v2.0~1task~1face-swap/post"},"children":["face-swap"]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"動画","__idx":25},"children":["動画"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_video_background_replace/v1.0/paths/~1s2s~1v2.0~1task~1bg-replace-vid/post"},"children":["bg-replace-vid"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_video_face_swap/v1.0/paths/~1s2s~1v2.0~1task~1face-swap-vid/post"},"children":["face-swap-vid"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_video_generator/v2.0/paths/~1s2s~1v2.0~1task~1image-to-video~1youcam/post"},"children":["image-to-video"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_video_generator/v2.0/paths/~1s2s~1v2.0~1task~1text-to-video~1youcam/post"},"children":["text-to-video"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_video_object_removal/v2.1/paths/~1s2s~1v2.0~1task~1obj-rem-vid/post"},"children":["obj-rem-vid"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_video_enhancer/v1.0/paths/~1s2s~1v2.0~1task~1video-sr/post"},"children":["video-sr"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_video_style_transfer/v1.0/paths/~1s2s~1v2.0~1task~1video-trans/post"},"children":["video-trans"]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["各機能が受け取る正確なパラメータは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam run <feature> --help"]}," で確認してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"使用例のワークフロー","__idx":26},"children":["使用例のワークフロー"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/reference/ai_body_reshape/v1.0/paths/~1s2s~1v2.0~1task~1body-reshape/post"},"children":["AI Body Reshape"]}," を最初から最後まで説明します。写真内の体を検出し、1 人を選び、補正し、結果を取得します。以下のリクエストボディとレスポンスボディは、このサンプル写真を使った実際の実行で取得したものです："]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["1. 検出（前処理）タスクを開始する"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam run pre-process body-reshape \\\n  --src_file \"https://plugins-media.makeupar.com/strapi/assets/body_reshape_01_d10c50c97d.jpg\"\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["レスポンス："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"status\": 200,\n  \"data\": {\n \"task_id\": \"CKPWaMO-olxd1ECr_3tTDXW5Gu_tQw0EKgN0-dU27zSyXhV8cJR2TzYLMhDqD\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["2. 検出された体を取得する"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam status pre-process body-reshape CKPWaMO-olxd1ECr_3tTDXW5Gu_tQw0EKgN0-dU27zSyXhV8cJR2TzYLMhDqD\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["レスポンス："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"status\": 200,\n  \"data\": {\n \"error\": null,\n \"results\": {\n \"result\": [\n  {\n  \"left\": 0.35347824096679686,\n  \"top\": 0.022326231002807617,\n  \"width\": 0.3041056156158447,\n  \"height\": 0.951037073135376\n  }\n ],\n \"timed\": 4565\n },\n \"task_status\": \"success\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["results.result"]}," の各エントリは検出された 1 人の人物で、画像サイズに対する相対値（",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]},"–",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]},"）のバウンディングボックスで表されます。配列内の位置が次に渡す ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--index"]}," です。この写真では人物が 1 人のため、インデックスは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}," です。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["3. 選んだ人物に対してメインタスクを実行する"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam run body-reshape \\\n  --src_file \"https://plugins-media.makeupar.com/strapi/assets/body_reshape_01_d10c50c97d.jpg\" \\\n  --version 1.0 \\\n  --index 0 \\\n  --features '{\"slim\": 20}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["レスポンス："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"status\": 200,\n  \"data\": {\n \"task_id\": \"ZV3WIzcB1rk7I5o8hMxKP5VdgIEpnHf7VOpsk1YC76tZy2Wur0lg4Bunb3KY-7Qa\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["4. 完了までメインタスクをポーリングする"]}]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam status body-reshape ZV3WIzcB1rk7I5o8hMxKP5VdgIEpnHf7VOpsk1YC76tZy2Wur0lg4Bunb3KY-7Qa\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["タスクの実行中は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_status"]}," が ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["running"]}," です。数秒ごとにコマンドを繰り返してください。成功すると（",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["GET /s2s/v2.0/task/body-reshape/{task_id}"]},"）："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"status\": 200,\n  \"data\": {\n \"error\": null,\n \"results\": {\n \"url\": \"https://yce-us.s3-accelerate.amazonaws.com/ttl30/.../0b333891-60be-4cd1-81cd-7d8cae35b3eb.jpg?X-Amz-Algorithm=AWS4-HMAC-SHA256&...&X-Amz-Expires=7200&...\",\n \"timed\": 12131,\n \"slim\": true\n },\n \"task_status\": \"success\"\n  }\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["results.url"]}," は補正後の画像です。これは期限付きの署名付きリンク（",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-Amz-Expires=7200"]},"、つまり 2 時間）なので、タスク成功後早めにダウンロードしてください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"デバッグガイド","__idx":27},"children":["デバッグガイド"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["CLI は標準的な YouCam API リクエストを送信するため、API ドキュメントの内容がそのままあてはまります。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/develop/rate_limit"},"children":["レート制限"]},"、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/develop/error_codes"},"children":["エラーコード"]},"、",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/develop/file_retention_period"},"children":["ファイル保持期間"]},"は同じです。API 側の ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/develop/debugging_guide"},"children":["デバッグガイド"]}," も参照してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"エラーが表れる場所","__idx":28},"children":["エラーが表れる場所"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["問題は 3 の地点で発生し得ます："]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"失敗する場所"},"children":["失敗する場所"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"終了コード"},"children":["終了コード"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"標準出力"},"children":["標準出力"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"標準エラー出力"},"children":["標準エラー出力"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"参照"},"children":["参照"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["送信前に CLI がコマンドを拒否する"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["空"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["エラーメッセージ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#cli-errors"},"children":["CLI のエラー"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["API がリクエストを拒否する"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error_code"]}," を含む JSON"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["空"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#api-request-errors"},"children":["API リクエストのエラー"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["タスクは実行されたが失敗する"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"task_status\": \"error\""]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.error"]}," のコード、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.error_message"]}," の説明を含む JSON"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["空"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#task-errors"},"children":["タスクのエラー"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["タスクが失敗しても終了コードは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["0"]}," になります。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," リクエスト自体は成功しているためです。スクリプトは終了コードだけでなく ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.task_status"]}," を確認する必要があります。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"レート制限","__idx":29},"children":["レート制限"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/develop/rate_limit"},"children":["API のレート制限"]}," はすべての ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam"]}," コマンドに適用されます："]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["IP アドレスごと:"]}," 300 秒あたり最大 250 リクエスト。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["アクセストークン（API キー）ごと:"]}," 300 秒あたり最大 250 リクエスト。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["両方の制限を満たす必要があります。いずれかを超えたリクエストは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["429 Too Many Requests"]}," となり、CLI は終了コード ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["1"]}," で終了します。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["推奨されるペースは約 5 リクエスト/秒です。"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["ほとんどのコマンドは 1 回の API リクエストを送信します。ローカルファイルを使う ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["run"]}," は、タスクのリクエストに加えてファイル 1 件につき 1 回の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["POST /s2s/v2.0/file"]}," を送信します。ポーリングもカウントされます——複数のタスクを毎秒確認すると、制限はすぐに消費されます。数秒ごとにポーリングし、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["429"]}," を受けたら、即座に再試行するのではなく、遅延を伸ばしながら再試行してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"cli-のエラー","__idx":30},"children":["CLI のエラー"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["これらはタスクのリクエスト送信前に検出されるため、ユニットを消費しません。"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"CLI のエラーメッセージ"},"children":["CLI のエラーメッセージ"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"考えられる原因"},"children":["考えられる原因"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"解決方法"},"children":["解決方法"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Not authenticated. Run: youcam auth login <apiKey>, or set YOUCAM_CLI_API_KEY"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["保存された API キーがなく、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YOUCAM_CLI_API_KEY"]}," も未設定または空"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam auth login <apiKey>"]}," を実行するか、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["YOUCAM_CLI_API_KEY"]}," を設定します"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Invalid credentials file at <path>. Re-run: youcam auth login <apiKey>"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["credentials.json"]}," が有効な JSON ではないか、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["apiKey"]}," が空または文字列ではない"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam auth login <apiKey>"]}," を実行します。ファイルは上書きされます"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Can't log out: credentials file at <path> is invalid. Fix or delete it by hand"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam auth logout"]}," が同じく不正な ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["credentials.json"]}," を検出し、変更しなかった"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ファイルを ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["{ \"apiKey\": \"<your-api-key>\" }"]}," の形に修正してから再度ログアウトするか、ファイルを削除します"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error: required option '--scale <value>' not specified"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["必須のオプションが指定されていない"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["追加してください。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam run <feature> --help"]}," にすべてのオプションが並びます"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error: option '--scale <value>' argument '9' is invalid. Allowed choices are 1, 2, 4."]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["値が許可された選択肢のいずれでもない"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["列挙された値のいずれかを使ってください"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Invalid value for --page_size: 99 (Too big: expected number to be <=20)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["値の型が不正または範囲外です。JSON オプションの場合は、メッセージにフィールド名が含まれます"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["値を修正してください。JSON のクォーティングは ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#passing-json-parameters"},"children":["JSON パラメータの渡し方"]}," を参照"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error: unknown option '--bogus'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["そのオプションがその機能に存在しないか、つづりが誤っている"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--help"]}," でつづりを確認してください。オプションは snake_case です（例: ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--src_file"]}," であり ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["--src-file"]}," ではありません）"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ENOENT: no such file or directory, open '...'"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ローカルファイルのパスが誤っている"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["パスを確認してください。相対パスは現在のディレクトリが始点です。スペースを含むパスはクォートしてください"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Unsupported file type \"unknown\" for ./notes.txt. Supported types: image/jpeg, image/png, video/mp4"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ローカルファイルが JPG、PNG、MP4 ではない"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ファイルを変換するか、公開 URL を渡してください"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Missing task ID. Usage: status <feature> <task_id> (or --task_id <value>)"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," をタスク ID なしで実行した"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["run"]}," が出力した ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_id"]}," を渡してください"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"api-リクエストのエラー","__idx":31},"children":["API リクエストのエラー"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["API がリクエストを拒否しました。CLI は API のレスポンスを標準出力に出力します。例："]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"status\": 400,\n  \"error\": \"This task ID doesn't exist, or the task has expired.\",\n  \"error_code\": \"InvalidTaskId\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"ステータス"},"children":["ステータス"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"error_code"},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["error_code"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"考えられる原因"},"children":["考えられる原因"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"解決方法"},"children":["解決方法"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["400"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["InvalidTaskId"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["タスク ID を誤って入力した、別の機能に属している（例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["run enhance"]}," のタスクを ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status hair-color"]}," で確認した）、または ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["task_id"]}," が有効な期間である 30 日を経過している"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["status"]}," では ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["run"]}," と同じ機能名を使ってください。前処理タスクは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam status pre-process <feature> <task_id>"]}," を使います。タスク開始から 30 日以内に確認してください"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["401"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["InvalidAccessToken"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["保存された API キーが誤っているか、有効ではなくなっている"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://yce.perfectcorp.com/api-console/en/api-keys/"},"children":["API コンソール"]}," からキーをコピーし、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam auth login"]}," を再実行します。使用例の行にある ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<"]}," ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":[">"]}," をキーに含めないでください"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["429"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["IP アドレスまたは API キーに対するリクエストが多すぎます"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ペースを落とし、遅延を伸ばしながら再試行してください。",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"#rate-limits"},"children":["レート制限"]}," を参照"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"タスクのエラー","__idx":32},"children":["タスクのエラー"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["タスクは受け付けられましたが、AI エンジンが処理できませんでした。",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam status"]}," は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["\"task_status\": \"error\""]}," を返し、コードは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.error"]},"、説明は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["data.error_message"]}," に入ります。コードは API の ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/develop/error_codes"},"children":["エラーコード"]}," ページで確認してください。一部の機能には追加のコードがあり、その機能の API レファレンスページの「ファイル仕様とエラー」に、サイズ・解像度・ポーズの制限とともに掲載されています。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"期限切れの結果リンク","__idx":33},"children":["期限切れの結果リンク"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["結果の URL（例：",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["results.url"]},"、",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["ai-avatar"]}," の ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["results.output[].url"]},"）は、タスク成功後 2 時間利用できます。期限切れの場合は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["youcam status <feature> <task_id>"]}," を再実行すると新しいリンクが取得できます。これはタスク作成後 30 日間有効です。結果は 30 日後に削除されるため、残しておきたいものはそれまでにダウンロードしてください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"ヘルプの表示","__idx":34},"children":["ヘルプの表示"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"youcam help\nyoucam help <command>\nyoucam <command> <subcommand> --help # e.g., youcam run pre-process --help\n","lang":"bash"},"children":[]}]},"headings":[{"value":"youcam-cli","id":"youcam-cli","depth":1},{"value":"動作条件","id":"動作条件","depth":2},{"value":"インストール","id":"インストール","depth":2},{"value":"認証","id":"認証","depth":2},{"value":"クイックスタート","id":"クイックスタート","depth":2},{"value":"ユニットと機能の消費量","id":"ユニットと機能の消費量","depth":2},{"value":"ユニットの確認","id":"ユニットの確認","depth":3},{"value":"機能の消費量の確認","id":"機能の消費量の確認","depth":3},{"value":"コマンド概要","id":"コマンド概要","depth":2},{"value":"API ↔ CLI コマンドの対応","id":"api--cli-コマンドの対応","depth":2},{"value":"AI タスクの実行","id":"ai-タスクの実行","depth":2},{"value":"ファイルのアップロード","id":"ファイルのアップロード","depth":2},{"value":"その他のファイルオプション","id":"その他のファイルオプション","depth":3},{"value":"オプションの記述形式","id":"オプションの記述形式","depth":2},{"value":"JSON パラメータの渡し方","id":"json-パラメータの渡し方","depth":2},{"value":"タスクステータスの確認","id":"タスクステータスの確認","depth":2},{"value":"前処理（顔と体の検出）","id":"前処理顔と体の検出","depth":2},{"value":"プリセットテンプレートの取得","id":"プリセットテンプレートの取得","depth":2},{"value":"makeup-vto パターン名の取得","id":"makeup-vto-パターン名の取得","depth":3},{"value":"利用可能な AI 機能","id":"利用可能な-ai-機能","depth":2},{"value":"メイク","id":"メイク","depth":3},{"value":"肌、顔、体","id":"肌顔体","depth":3},{"value":"ヘア＆ヒゲ","id":"ヘアヒゲ","depth":3},{"value":"バーチャル試着","id":"バーチャル試着","depth":3},{"value":"画像","id":"画像","depth":3},{"value":"動画","id":"動画","depth":3},{"value":"使用例のワークフロー","id":"使用例のワークフロー","depth":2},{"value":"デバッグガイド","id":"デバッグガイド","depth":2},{"value":"エラーが表れる場所","id":"エラーが表れる場所","depth":3},{"value":"レート制限","id":"レート制限","depth":3},{"value":"CLI のエラー","id":"cli-のエラー","depth":3},{"value":"API リクエストのエラー","id":"api-リクエストのエラー","depth":3},{"value":"タスクのエラー","id":"タスクのエラー","depth":3},{"value":"期限切れの結果リンク","id":"期限切れの結果リンク","depth":3},{"value":"ヘルプの表示","id":"ヘルプの表示","depth":2}],"frontmatter":{"seo":{"title":"youcam-cli"}},"lastModified":"2026-10-30T07:46:55.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/develop/cli","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}