Skip to main content
POST
Kling Multi Image-to-Image Task

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <token> in the request header.

Headers

Content-Type
string
default:application/json
required

Data exchange format

Body

application/json
model_name
enum<string>
required

Model name

Available options:
kling-v2
subject_image_list
object[]
required

Subject reference image list

  • Supports up to 4 images, minimum 1 image. Use key:value format: "subject_image_list":[ { "subject_image":"image_url" }, { "subject_image":"image_url" }, { "subject_image":"image_url" }, { "subject_image":"image_url" }]
  • No cropping logic on the API side — please upload pre-selected subject images directly
  • Supports image Base64 encoding or image URL (must be accessible)
  • Note: When using Base64, do not add any prefix (such as data:image/png;base64,) before the Base64 string — pass the Base64 encoded string directly.
  • Correct Base64 parameter:

iVBORw0KGgoAAAANSUhEUgAAAAUA...

  • Incorrect Base64 parameter (contains data: prefix):

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...

  • Supported image formats: .jpg / .jpeg / .png
  • Image file size must not exceed 10MB, image dimensions must be at least 300px, aspect ratio between 1:2.5 ~ 2.5:1
Required array length: 1 - 4 elements
prompt
string

Positive text prompt

  • Must not exceed 2500 characters.
Maximum string length: 2500
negative_prompt
string

Negative text prompt

  • Must not exceed 2500 characters.
Maximum string length: 2500
scene_image
string

Scene reference image

  • Supports image Base64 encoding or image URL (must be accessible)
  • Note: When using Base64, do not add any prefix (such as data:image/png;base64,) before the Base64 string — pass the Base64 encoded string directly.
  • Correct Base64 parameter:

iVBORw0KGgoAAAANSUhEUgAAAAUA...

  • Incorrect Base64 parameter (contains data: prefix):

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...

  • Supported image formats: .jpg / .jpeg / .png
  • Image file size must not exceed 10MB, image dimensions must be at least 300px, aspect ratio between 1:2.5 ~ 2.5:1
style_image
string

Style reference image

  • Supports image Base64 encoding or image URL (must be accessible)
  • Note: When using Base64, do not add any prefix (such as data:image/png;base64,) before the Base64 string — pass the Base64 encoded string directly.
  • Correct Base64 parameter:

iVBORw0KGgoAAAANSUhEUgAAAAUA...

  • Incorrect Base64 parameter (contains data: prefix):

data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...

  • Supported image formats: .jpg / .jpeg / .png
  • Image file size must not exceed 10MB, image dimensions must be at least 300px, aspect ratio between 1:2.5 ~ 2.5:1
n
integer
default:1

Number of images to generate

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

Aspect ratio of generated images (width:height)

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

Whether to also generate a watermarked result.

  • Defined via the enabled parameter:
callback_url
string

Callback notification URL for this task. If configured, the server will proactively notify when the task status changes.

external_task_id
string

Custom task ID.

  • Does not override the system-generated task ID, but supports querying by this ID.
  • Must be unique per user.

Response

200 - application/json

Task accepted.

code
integer

Error code; see error codes for details.

Example:

0

message
string

Error message.

Example:

"string"

request_id
string

Request ID, system-generated, used for request tracking and troubleshooting.

Example:

"string"

data
object