複数の画像から Kling 画像を生成する
CometAPI の Kling マルチ画像から画像エンドポイントを使用して、被写体、シーン、スタイルの参照画像から新しい画像を生成します。
呼び出す前に
subject_image_listに 1 ~ 4 枚の画像を指定します- 新しいリクエストには
model_name: kling-v2-1を使用します - コアとなる被写体構図がすでに機能している場合にのみ
scene_imageまたはstyle_imageを追加します - これは非同期生成ルートとして扱い、返された task id を保存します
タスクの流れ
画像生成タスクを送信
タスクをポーリング
結果を永続化
承認
Bearer token authentication. Use your CometAPI key.
ヘッダー
Must be application/json.
ボディ
Subject reference images. Minimum 1, maximum 4.
1 - 4 elementsModel to use for multi-image generation. Use kling-v2-1 for new requests; omitting the field uses the legacy route default.
kling-v2, kling-v2-1 Text prompt describing the desired output. Maximum 2500 characters.
Elements to exclude from the image. Maximum 2500 characters.
Optional scene reference image. Image URL or raw Base64 string without a data: prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1.
Optional style reference image. Image URL or raw Base64 string without a data: prefix. Supported formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1.
Number of images to generate. Range: 1-9.
1 <= x <= 9Aspect ratio of the generated image.
16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9 Watermark options.
Webhook URL for task status notifications.
Optional user-defined task ID for your own tracking. Must be unique per account.