RunComfy の API で bytedance/seedream-4-5/edit-sequential を実行します。 受け付ける入出力はモデルの スキーマ。
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/bytedance/seedream-4-5/edit-sequential \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"images": [
"https://playgrounds-storage-public.runcomfy.net/tools/7250/media-files/input-1-1.png",
"https://playgrounds-storage-public.runcomfy.net/tools/7250/media-files/input-1-2.png",
"https://playgrounds-storage-public.runcomfy.net/tools/7250/media-files/input-1-3.png"
],
"prompt": "The man is riding a motor cycle on the road",
"sequential_image_generation_options": 3
}'環境変数 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/bytedance/seedream-4-5/edit-sequential \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"images": [
"https://playgrounds-storage-public.runcomfy.net/tools/7250/media-files/input-1-1.png",
"https://playgrounds-storage-public.runcomfy.net/tools/7250/media-files/input-1-2.png",
"https://playgrounds-storage-public.runcomfy.net/tools/7250/media-files/input-1-3.png"
],
"prompt": "The man is riding a motor cycle on the road",
"sequential_image_generation_options": 3
}'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": [
"images",
"prompt",
"sequential_image_generation_options"
],
"properties": {
"images": {
"title": "画像",
"description": "JPEG または PNG 形式の画像を1~14枚アップロードしてください。",
"type": "array",
"items": {
"type": "string",
"format": "image_uri"
},
"validations": [
{
"validation_rule": "file_size_mb<",
"validation_value": 10,
"validation_error": "ファイルサイズは10 MB未満にしてください。"
},
{
"validation_rule": "width/height>",
"validation_value": 0.625,
"validation_error": "アスペクト比は1:16~16:1の範囲にしてください。"
},
{
"validation_rule": "width/height<",
"validation_value": 16,
"validation_error": "アスペクト比は1:16~16:1の範囲にしてください。"
},
{
"validation_rule": "width_pixels>",
"validation_value": 14,
"validation_error": "アップロードする画像の幅と高さは、どちらも14ピクセルより大きくする必要があります。"
},
{
"validation_rule": "height_pixels>",
"validation_value": 14,
"validation_error": "アップロードする画像の幅と高さは、どちらも14ピクセルより大きくする必要があります。"
},
{
"validation_rule": "width_pixels<",
"validation_value": 6000,
"validation_error": "アップロードする画像の幅と高さは、どちらも6000ピクセルを超えないようにしてください。"
},
{
"validation_rule": "height_pixels<",
"validation_value": 6000,
"validation_error": "アップロードする画像の幅と高さは、どちらも6000ピクセルを超えないようにしてください。"
}
],
"maxItems": 14,
"minItems": 1,
"default": [
"https://playgrounds-storage-public.runcomfy.net/tools/7250/media-files/input-1-1.png",
"https://playgrounds-storage-public.runcomfy.net/tools/7250/media-files/input-1-2.png",
"https://playgrounds-storage-public.runcomfy.net/tools/7250/media-files/input-1-3.png"
]
},
"prompt": {
"title": "プロンプト",
"description": "プロンプトは600文字未満にし、生成したい画像枚数も記載してください。例:「穏やかな海に沈む美しい夕日の画像を3枚生成する」。",
"type": "string",
"default": "The man is riding a motor cycle on the road"
},
"resolution": {
"title": "解像度",
"description": "`2K` と `4K` では幅と高さをモデルが決定します。希望する縦横比、形状、用途を自然な言葉でプロンプトに含めてください。その他の選択肢では固定の幅と高さを指定できます。",
"type": "string",
"enum": [
"2K",
"4K",
"2048x2048 (1:1)",
"2304x1728 (4:3)",
"1728x2304 (3:4)",
"2560x1440 (16:9)",
"1440x2560 (9:16)",
"2496x1664 (3:2)",
"1664x2496 (2:3)",
"3024x1296 (21:9)",
"4096x4096 (1:1)"
],
"default": "2048x2048 (1:1)"
},
"seed": {
"title": "シード",
"description": "",
"type": "integer",
"default": 54519385
},
"sequential_image_generation_options": {
"title": "生成画像の最大枚数",
"description": "出力画像数の上限を設定します。実際に生成できる枚数は、参照画像の枚数にも左右されます。",
"type": "integer",
"enum": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15
],
"default": 3
}
}
}{
"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ツールを活用して素晴らしいアートを作成できるようにする。