RunComfy の API で community/fantasy-portrait/image-to-video を実行します。 受け付ける入出力はモデルの スキーマ。
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/community/fantasy-portrait/image-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"143_image": "https://playgrounds-storage-public.runcomfy.net/comfyui-defaults/163b6a8a-8efc-4c2f-b1c3-cc04f73067ec/input/Runcomfy_example_1268_1.png",
"160_video": "https://playgrounds-storage-public.runcomfy.net/comfyui-defaults/163b6a8a-8efc-4c2f-b1c3-cc04f73067ec/input/Runcomfy_example_1268_1.mp4",
"155_positive_prompt": "woman acting"
}'環境変数 YOUR_API_TOKEN に API キーを設定してください( プロフィールでキー管理)。すべてのリクエストの Authorization ヘッダーに Bearer トークンとして付与: Authorization: Bearer $YOUR_API_TOKEN。
非同期の生成ジョブを送信すると、すぐに request_id と、ステータス確認・結果取得・キャンセル用の URL が返ります。
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/community/fantasy-portrait/image-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"143_image": "https://playgrounds-storage-public.runcomfy.net/comfyui-defaults/163b6a8a-8efc-4c2f-b1c3-cc04f73067ec/input/Runcomfy_example_1268_1.png",
"160_video": "https://playgrounds-storage-public.runcomfy.net/comfyui-defaults/163b6a8a-8efc-4c2f-b1c3-cc04f73067ec/input/Runcomfy_example_1268_1.mp4",
"155_positive_prompt": "woman acting"
}'request_id の現在の状態を取得します("in_queue"、"in_progress"、"completed"、"cancelled")。
curl --request GET \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/status \
--header "Authorization: Bearer <token>"指定した request_id の最終出力とメタデータを取得します。ジョブが未完了の場合は現在の状態が返るため、ポーリングを続けられます。
curl --request GET \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/result \
--header "Authorization: Bearer <token>"request_id でキュー中のジョブをキャンセルします。実行中のジョブはキャンセルできません。
curl --request POST \
--url https://model-api.runcomfy.net/v1/requests/{request_id}/cancel \
--header "Authorization: Bearer <token>"公開到達可能な HTTPS URL を指定してください。サーバー側からの取得が可能で、ログイン不要であること、レート制限やボット遮断がないことを確認してください。目安:画像 ≤ 50 MB(約 4K)、動画 ≤ 100 MB(720p で約 2~5 分)。非公開アセットは安定した URL またはプリサイン URL を推奨します。
{
"type": "object",
"title": "入力スキーマ",
"required": [
"143_image",
"160_video",
"155_positive_prompt"
],
"properties": {
"160_video": {
"title": "参照動画",
"description": "生成する動きの基準となる必須の動画です。",
"type": "string",
"default": "https://playgrounds-storage-public.runcomfy.net/comfyui-defaults/163b6a8a-8efc-4c2f-b1c3-cc04f73067ec/input/Runcomfy_example_1268_1.mp4"
},
"143_image": {
"title": "ポートレート画像",
"description": "アニメーション化する人物の必須画像です。",
"type": "string",
"default": "https://playgrounds-storage-public.runcomfy.net/comfyui-defaults/163b6a8a-8efc-4c2f-b1c3-cc04f73067ec/input/Runcomfy_example_1268_1.png"
},
"155_positive_prompt": {
"title": "プロンプト",
"description": "動作、表情、映像の方向性を指定する必須のテキストです。",
"type": "string",
"default": "woman acting"
},
"169_valuex170_value": {
"title": "解像度(幅:高さ)",
"description": "正方形、縦長、横長を含む10種類から選択します。初期値は720x720 (1:1)です。",
"type": "string",
"enum": [
"480x480 (1:1)",
"720x720 (1:1)",
"480x720 (2:3)",
"720x480 (3:2)",
"540x960 (9:16)",
"576x1024 (9:16)",
"720x1280 (9:16)",
"960x540 (16:9)",
"1024x576 (16:9)",
"1280x720 (16:9)"
],
"default": "720x720 (1:1)"
},
"174_value": {
"title": "フレーム数",
"description": "81または141フレームを選択します。初期値は81です。",
"type": "integer",
"enum": [
81,
141
],
"default": 81
},
"163_frame_rate": {
"title": "フレームレート",
"description": "フレームレートを12~24 FPSで設定します。初期値は16です。",
"type": "integer",
"default": 16,
"minimum": 12,
"maximum": 24
},
"150_strength": {
"title": "ポートレート強度",
"description": "Fantasy Portraitの埋め込みの影響度です。値を上げるほど人物と表情の特徴が強調されます。範囲は0.3~2.0、初期値は1です。",
"type": "float",
"default": 1,
"minimum": 0.3,
"maximum": 2
},
"149_seed": {
"title": "シード",
"description": "結果の再現やバリエーション作成に使う整数です。初期値は96860978です。",
"type": "integer",
"default": 96860978
},
"149_steps": {
"title": "サンプリングステップ",
"description": "ノイズ除去の反復回数です。増やすと細部や安定性が向上する場合がありますが、処理時間も延びます。範囲は6~20、初期値は6です。",
"type": "integer",
"default": 6,
"minimum": 6,
"maximum": 20
},
"149_cfg": {
"title": "ガイダンススケール",
"description": "プロンプトへの忠実度と表現の自由度のバランスを調整します。範囲は0.6~2.0、初期値は1です。",
"type": "float",
"default": 1,
"minimum": 0.6,
"maximum": 2
},
"149_shift": {
"title": "サンプリングシフト",
"description": "サンプリングの進行を調整します。値を上げると、安定性と引き換えに動きやスタイルが強まります。範囲は1~15、初期値は5です。",
"type": "integer",
"default": 5,
"minimum": 1,
"maximum": 15
}
}
}{
"output": {
"type": "object",
"properties": {
"image": {
"type": "string",
"format": "uri",
"description": "単一画像 URL"
},
"video": {
"type": "string",
"format": "uri",
"description": "単一動画 URL"
},
"images": {
"type": "array",
"description": "複数画像 URL",
"items": {
"type": "string",
"format": "uri"
}
},
"videos": {
"type": "array",
"description": "複数動画 URL",
"items": {
"type": "string",
"format": "uri"
}
}
}
}
}RunComfyは最高の ComfyUI プラットフォームです。次のものを提供しています: ComfyUIオンライン 環境とサービス、および ComfyUIワークフロー 魅力的なビジュアルが特徴です。 RunComfyはまた提供します AI Models, アーティストが最新のAIツールを活用して素晴らしいアートを作成できるようにする。