RunComfy の API で blackforestlabs/flux-3/video を実行します。 受け付ける入出力はモデルの スキーマ。
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/blackforestlabs/flux-3/video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "A powerful dappled-grey stallion gallops across a windswept green moor under a brooding storm sky, mane and tail streaming, clumps of turf kicking up in slow motion, distant thunder rumbling and hooves pounding the earth, cinematic low-angle tracking shot, moody desaturated color, anamorphic look."
}'環境変数 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/blackforestlabs/flux-3/video \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "A powerful dappled-grey stallion gallops across a windswept green moor under a brooding storm sky, mane and tail streaming, clumps of turf kicking up in slow motion, distant thunder rumbling and hooves pounding the earth, cinematic low-angle tracking shot, moody desaturated color, anamorphic look."
}'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"
],
"properties": {
"prompt": {
"title": "プロンプト",
"description": "動画の内容を記述するテキストプロンプトです(中国語は約 500 文字以内、英語は約 1000 語以内を推奨)。",
"type": "string",
"default": "A powerful dappled-grey stallion gallops across a windswept green moor under a brooding storm sky, mane and tail streaming, clumps of turf kicking up in slow motion, distant thunder rumbling and hooves pounding the earth, cinematic low-angle tracking shot, moody desaturated color, anamorphic look."
},
"images": {
"title": "参照画像",
"description": "マルチモーダル参照モードで使用する画像(0~9 枚)。jpeg、png、webp、bmp、tiff、gif に対応します。",
"type": "array",
"items": {
"type": "string",
"format": "image_uri"
},
"maxItems": 9
},
"videos": {
"title": "参照動画",
"description": "マルチモーダル参照モードで使用する動画(0~3 本)。mp4、mov に対応し、動画の長さは 2~15 秒にしてください。",
"type": "array",
"items": {
"type": "string",
"format": "video_uri"
},
"maxItems": 3
},
"audios": {
"title": "参照音声 URL",
"description": "マルチモーダル参照モードで使用する音声(0~3 本)。wav、mp3 に対応し、音声の長さは 2~15 秒、ファイルサイズは 15 MB 未満にしてください。",
"type": "array",
"items": {
"type": "string",
"format": "audio_uri"
},
"maxItems": 3
},
"aspect_ratio": {
"title": "アスペクト比(幅:高さ)",
"description": "デフォルトは `adaptive` です。モデルが最も近い比率を選び、実際の比率はタスクの照会結果で返されます。",
"type": "string",
"enum": [
"adaptive",
"16:9",
"9:16",
"4:3",
"3:4",
"1:1",
"21:9"
],
"default": "adaptive"
},
"duration": {
"title": "長さ(秒)",
"description": "4~15 の整数で指定します。",
"type": "integer",
"minimum": 4,
"maximum": 15,
"default": 5
},
"resolution": {
"title": "解像度",
"description": "",
"type": "string",
"enum": [
"480p",
"720p",
"1080p",
"4k"
],
"default": "720p"
},
"generate_audio": {
"title": "音声を生成",
"description": "`true` にすると、セリフ、効果音、音楽が同期した動画を出力します。",
"type": "boolean",
"default": true
},
"seed": {
"title": "シード",
"description": "動画生成に使用するランダムシードです。",
"type": "integer"
},
"tools": {
"title": "Web 検索",
"description": "`web_search` を含めると、プロンプトの内容(特定の商品や現在の天気など)に応じてモデルがオンライン検索を行う場合があります。情報の鮮度は高まりますが、処理時間も長くなります。",
"type": "boolean",
"default": false
}
}
}{
"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ツールを活用して素晴らしいアートを作成できるようにする。