RunComfy の API で bytedance/seedream-5.0-pro/image-to-image を実行します。 受け付ける入出力はモデルの スキーマ。
curl --request POST \
--url https://model-api.runcomfy.net/v1/models/bytedance/seedream-5.0-pro/image-to-image \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Keep the exact same cabin, lake, pine forest and mountain composition and framing. Transform the scene into a breathtaking cinematic night: a vivid green and violet aurora borealis swirling across a star-filled sky, the aurora and stars mirrored in the still lake, warm glowing light spilling from the cabin windows, dramatic moody cinematic color grade, atmospheric, film-still quality, ultra high detail",
"image": [
"https://playgrounds-storage-public.runcomfy.net/tools/7381/media-files/ref-promo.webp"
]
}'環境変数 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-5.0-pro/image-to-image \
--header "Content-Type: application/json" \
--header "Authorization: Bearer <token>" \
--data '{
"prompt": "Keep the exact same cabin, lake, pine forest and mountain composition and framing. Transform the scene into a breathtaking cinematic night: a vivid green and violet aurora borealis swirling across a star-filled sky, the aurora and stars mirrored in the still lake, warm glowing light spilling from the cabin windows, dramatic moody cinematic color grade, atmospheric, film-still quality, ultra high detail",
"image": [
"https://playgrounds-storage-public.runcomfy.net/tools/7381/media-files/ref-promo.webp"
]
}'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",
"image"
],
"properties": {
"prompt": {
"title": "プロンプト",
"description": "600語以内の英語プロンプトを推奨します。長すぎると情報が分散し、モデルが主要点だけに集中して細部を見落とすため、一部の要素が欠けた画像になる場合があります。",
"type": "string",
"default": "Keep the exact same cabin, lake, pine forest and mountain composition and framing. Transform the scene into a breathtaking cinematic night: a vivid green and violet aurora borealis swirling across a star-filled sky, the aurora and stars mirrored in the still lake, warm glowing light spilling from the cabin windows, dramatic moody cinematic color grade, atmospheric, film-still quality, ultra high detail"
},
"image": {
"title": "画像",
"description": "リファレンス画像を1~10枚アップロードします。対応形式:JPEG、PNG、WEBP、BMP、TIFF、GIF、HEIC、HEIF。",
"type": "array",
"items": {
"type": "string",
"format": "image_uri"
},
"validations": [
{
"validation_rule": "file_size_mb<",
"validation_value": 30,
"validation_error": "ファイルサイズは30 MB未満にしてください。"
},
{
"validation_rule": "width/height>",
"validation_value": 0.0625,
"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ピクセルを超えている必要があります。"
}
],
"maxItems": 10,
"minItems": 1,
"default": [
"https://playgrounds-storage-public.runcomfy.net/tools/7381/media-files/ref-promo.webp"
]
},
"aspect_ratio": {
"title": "アスペクト比(幅:高さ)",
"description": "編集後の画像のアスペクト比。",
"type": "string",
"enum": [
"1:1",
"4:3",
"3:4",
"16:9",
"9:16",
"2:3",
"3:2",
"21:9"
],
"default": "1:1"
},
"resolution": {
"title": "解像度",
"description": "出力解像度を選択します。1Kは1枚$0.05、2Kは$0.10です。",
"type": "string",
"enum": [
"1K",
"2K"
],
"default": "2K"
},
"output_format": {
"title": "出力形式",
"description": "出力画像のファイル形式を選びます。",
"type": "string",
"enum": [
"png",
"jpeg"
],
"default": "png"
}
}
}{
"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ツールを活用して素晴らしいアートを作成できるようにする。