Użyj endpointu Kling Multi-Image to Image w CometAPI, aby generować nowe obrazy z wielu danych wejściowych, za pomocą prostych żądań POST i elastycznego 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_listmodel_name: kling-v2scence_image lub style_image tylko wtedy, gdy podstawowa kompozycja obiektu już działa poprawniePrześlij zadanie generowania obrazu
Sprawdzaj status zadania
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
}
}