RunComfy の API で kling/kling-3.0/4k/image-to-video を実行します。 受け付ける入出力はモデルの スキーマ。
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/kling/kling-3.0/4k/image-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Bring this still photograph to life in native 4K with hyper-detailed motion. The young American ceramic artist's hands gently cradle and shape the spinning gray clay vessel — the wheel rotates with smooth controlled motion, the soft clay walls rise and slim under her thumbs, a thin glistening ribbon of water trickles continuously down the side, and a few fine droplets of clay-water flick outward in slow motion catching the light. Loose strands of her dirty-blonde hair sway gently, her chest rises and falls with steady calm breathing, eyes stay focused, a small subtle smile tugs at her lips, the linen apron shifts almost imperceptibly. Behind her, dust motes drift through the warm shaft of honey golden-hour light streaming through the multi-pane windows, dried botanicals sway slightly, and faint shadows shift across the whitewashed brick wall as the sun moves. The camera slowly pushes in from a tight medium close-up to an extreme close-up of the wet clay vessel and her glistening fingers, then drifts back up to her face. Ambient sound: the soft whir of the pottery wheel, water droplets, the rustle of linen, distant Portland street ambience, and a warm vinyl indie-folk record playing low. Native-4K hyper-detailed textures — wet clay surface sheen, fingertip ridges, water droplets, hair strands, linen apron weave, brick grain, wood shelf knots — shot on RED Komodo 6K, 50mm anamorphic, shallow depth of field, Kodak Portra color science.",
"start_image_url": "https://playgrounds-storage-public.runcomfy.net/tools/7353/media-files/input.png"
}'環境変数 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/kling/kling-3.0/4k/image-to-video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Bring this still photograph to life in native 4K with hyper-detailed motion. The young American ceramic artist's hands gently cradle and shape the spinning gray clay vessel — the wheel rotates with smooth controlled motion, the soft clay walls rise and slim under her thumbs, a thin glistening ribbon of water trickles continuously down the side, and a few fine droplets of clay-water flick outward in slow motion catching the light. Loose strands of her dirty-blonde hair sway gently, her chest rises and falls with steady calm breathing, eyes stay focused, a small subtle smile tugs at her lips, the linen apron shifts almost imperceptibly. Behind her, dust motes drift through the warm shaft of honey golden-hour light streaming through the multi-pane windows, dried botanicals sway slightly, and faint shadows shift across the whitewashed brick wall as the sun moves. The camera slowly pushes in from a tight medium close-up to an extreme close-up of the wet clay vessel and her glistening fingers, then drifts back up to her face. Ambient sound: the soft whir of the pottery wheel, water droplets, the rustle of linen, distant Portland street ambience, and a warm vinyl indie-folk record playing low. Native-4K hyper-detailed textures — wet clay surface sheen, fingertip ridges, water droplets, hair strands, linen apron weave, brick grain, wood shelf knots — shot on RED Komodo 6K, 50mm anamorphic, shallow depth of field, Kodak Portra color science.",
"start_image_url": "https://playgrounds-storage-public.runcomfy.net/tools/7353/media-files/input.png"
}'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": [
"prompt",
"start_image_url"
],
"properties": {
"prompt": {
"title": "プロンプト",
"description": "",
"type": "string",
"default": "Bring this still photograph to life in native 4K with hyper-detailed motion. The young American ceramic artist's hands gently cradle and shape the spinning gray clay vessel — the wheel rotates with smooth controlled motion, the soft clay walls rise and slim under her thumbs, a thin glistening ribbon of water trickles continuously down the side, and a few fine droplets of clay-water flick outward in slow motion catching the light. Loose strands of her dirty-blonde hair sway gently, her chest rises and falls with steady calm breathing, eyes stay focused, a small subtle smile tugs at her lips, the linen apron shifts almost imperceptibly. Behind her, dust motes drift through the warm shaft of honey golden-hour light streaming through the multi-pane windows, dried botanicals sway slightly, and faint shadows shift across the whitewashed brick wall as the sun moves. The camera slowly pushes in from a tight medium close-up to an extreme close-up of the wet clay vessel and her glistening fingers, then drifts back up to her face. Ambient sound: the soft whir of the pottery wheel, water droplets, the rustle of linen, distant Portland street ambience, and a warm vinyl indie-folk record playing low. Native-4K hyper-detailed textures — wet clay surface sheen, fingertip ridges, water droplets, hair strands, linen apron weave, brick grain, wood shelf knots — shot on RED Komodo 6K, 50mm anamorphic, shallow depth of field, Kodak Portra color science."
},
"multi_prompt": {
"title": "マルチプロンプト区間",
"description": "シーン転換に使う複数のプロンプト区間を指定します。各区間の長さの合計は、動画全体の長さと一致させてください。",
"type": "array",
"items": {
"type": "object",
"properties": {
"prompt": {
"type": "string",
"format": "str"
},
"duration": {
"type": "integer",
"format": "int_slider_with_range",
"minimum": 3,
"maximum": 15,
"default": 5
}
}
},
"maxItems": 20,
"minItems": 0
},
"start_image_url": {
"title": "開始画像",
"description": "動画の開始フレームです。jpg、jpeg、png、bmp、webp形式に対応します。",
"type": "string",
"default": "https://playgrounds-storage-public.runcomfy.net/tools/7353/media-files/input.png"
},
"end_image_url": {
"title": "終了画像",
"description": "2枚のフレーム間の変化を制御する任意の終了画像です。jpg、jpeg、png、bmp、webp形式に対応します。",
"type": "string"
},
"duration": {
"title": "長さ",
"description": "生成する動画全体の長さ(秒)です。",
"type": "integer",
"minimum": 3,
"maximum": 15,
"default": 10
},
"generate_audio": {
"title": "音声を生成",
"description": "有効にすると、動画と一緒に音声を生成します。",
"type": "boolean",
"default": true
},
"elements": {
"title": "参照要素",
"description": "参照画像や動画区間など、生成に使用する入力素材です。",
"type": "array",
"items": {
"type": "object",
"properties": {
"frontal_image_url": {
"type": "string",
"format": "image_uri",
"description": "被写体を正面から写した参照画像です。"
},
"reference_image_urls": {
"type": "array",
"format": "image_uris",
"items": {
"type": "string",
"format": "image_uri"
},
"description": "描画を導く追加の参照画像URLです。"
},
"video_url": {
"type": "string",
"format": "video_uri",
"description": "動きの参考にする任意の動画です。"
}
}
},
"minItems": 0,
"maxItems": 3
},
"shot_type": {
"title": "ショットタイプ",
"description": "カメラショットやシーンのフレーミング方法を指定します。",
"type": "string",
"enum": [
"customize"
],
"default": "customize"
},
"negative_prompt": {
"title": "ネガティブプロンプト",
"description": "",
"type": "string"
},
"cfg_scale": {
"title": "ガイダンス強度",
"description": "プロンプトへの忠実度を調整するClassifier-Free Guidance(CFG)の強度です。",
"type": "float",
"minimum": 0,
"maximum": 1,
"default": 0.5
}
}
}{
"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ツールを活用して素晴らしいアートを作成できるようにする。