Skip to main content
POST
/
kling
/
v1
/
images
/
multi-image2image
cURL
curl https://api.cometapi.com/kling/v1/images/multi-image2image \
  -H "Authorization: Bearer $COMETAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model_name": "kling-v2-1",
  "prompt": "Two product mascots standing together in a bright studio scene",
  "subject_image_list": [
    {
      "subject_image": "https://your-image-host/subject-1.png"
    },
    {
      "subject_image": "https://your-image-host/subject-2.png"
    }
  ],
  "scene_image": "https://your-image-host/scene.png",
  "style_image": "https://your-image-host/style.png",
  "n": 1,
  "aspect_ratio": "1:1"
}'
{
  "code": 123,
  "message": "<string>",
  "data": {
    "task_id": "<string>",
    "created_at": 123,
    "updated_at": 123,
    "task_status_msg": "<string>",
    "task_info": {
      "external_task_id": "<string>"
    },
    "task_result": {}
  },
  "request_id": "<string>"
}
Use this endpoint when you want Kling to generate one image from multiple subject references plus optional scene or style references.

Before you call it

  • Provide 1 to 4 images in subject_image_list
  • Use model_name: kling-v2-1 for new requests
  • Add scene_image or style_image only when the core subject composition already works
  • Treat this as an async generation route and save the returned task id

Task flow

1

Submit the image-generation task

Send the subject image list and prompt, then store the returned task id.
2

Poll the task

Poll the returned task with the matching Kling image query path until the task reaches a terminal state.
3

Persist the result

Save the generated image into your own storage if you need durable access.
For the complete parameter reference, see the official Kling documentation.

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your CometAPI key.

Headers

Content-Type
string
default:application/json

Must be application/json.

Body

application/json
subject_image_list
object[]
required

Subject reference images. Minimum 1, maximum 4.

Required array length: 1 - 4 elements
model_name
enum<string>
default:kling-v2

Model to use for multi-image generation. Use kling-v2-1 for new requests; omitting the field uses the legacy route default.

Available options:
kling-v2,
kling-v2-1
prompt
string

Text prompt describing the desired output. Maximum 2500 characters.

negative_prompt
string

Elements to exclude from the image. Maximum 2500 characters.

scene_image
string

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.

style_image
string

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.

n
integer
default:1

Number of images to generate. Range: 1-9.

Required range: 1 <= x <= 9
aspect_ratio
enum<string>
default:16:9

Aspect ratio of the generated image.

Available options:
16:9,
9:16,
1:1,
4:3,
3:4,
3:2,
2:3,
21:9
watermark_info
object

Watermark options.

callback_url
string

Webhook URL for task status notifications.

external_task_id
string

Optional user-defined task ID for your own tracking. Must be unique per account.

Response

200 - application/json

Task request accepted or an error response returned by the API.

code
required

Response code. 0 means the task request was accepted.

message
string
required

Response message.

data
object
required
request_id
string

Request identifier returned when present.