CometAPI の Kling Multi-Image to Image エンドポイントを使用すると、シンプルな POST リクエストと柔軟な Content-Type で、複数の入力から新しい画像を生成できます。
curl --request POST \
--url https://api.cometapi.com/kling/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subject_image_list": [
{
"subject_image": "https://filesystem.site/cdn/20250814/goDW44JIf6eSuxAS7TNringhWjO9kW.png"
},
{
"subject_image": "https://filesystem.site/cdn/20250814/goDW44JIf6eSuxAS7TNringhWjO9kW.png"
},
{
"subject_image": "https://filesystem.site/cdn/20250814/goDW44JIf6eSuxAS7TNringhWjO9kW.png"
},
{
"subject_image": "https://filesystem.site/cdn/20250814/goDW44JIf6eSuxAS7TNringhWjO9kW.png"
}
]
}
'{
"code": 123,
"message": "<string>",
"request_id": "<string>",
"data": {
"task_id": "<string>",
"task_status": "<string>",
"created_at": 123,
"updated_at": 123
}
}subject_image_list に 2〜4 枚の画像を指定しますmodel_name: kling-v2 を使用しますscence_image または style_image は、コアとなる被写体構成がすでにうまく機能している場合にのみ追加しますタスクをポーリング
Bearer token authentication. Use your CometAPI key.
Content type of the request body.
Kling Image Generation API request body definition
List of subject reference images. Minimum 2, maximum 4.
Show child attributes
Model to use for multi-image generation.
kling-v2 Text prompt describing the desired output. Max 2500 characters.
Optional scene reference image. Same format and size constraints as subject images.
Optional style reference image. Same format and size constraints as subject images.
Number of images to generate.
Aspect ratio of the generated image (width:height).
16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3, 21:9 Webhook URL for task status notifications. The server sends a callback when the task status changes.
Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.
curl --request POST \
--url https://api.cometapi.com/kling/v1/images/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"subject_image_list": [
{
"subject_image": "https://filesystem.site/cdn/20250814/goDW44JIf6eSuxAS7TNringhWjO9kW.png"
},
{
"subject_image": "https://filesystem.site/cdn/20250814/goDW44JIf6eSuxAS7TNringhWjO9kW.png"
},
{
"subject_image": "https://filesystem.site/cdn/20250814/goDW44JIf6eSuxAS7TNringhWjO9kW.png"
},
{
"subject_image": "https://filesystem.site/cdn/20250814/goDW44JIf6eSuxAS7TNringhWjO9kW.png"
}
]
}
'{
"code": 123,
"message": "<string>",
"request_id": "<string>",
"data": {
"task_id": "<string>",
"task_status": "<string>",
"created_at": 123,
"updated_at": 123
}
}