Kling Image Generation kling-v3
Submit a Kling native async image generation or image-to-image task via /kling/v1/images/generations.
Authorizations
Pass Authorization: Bearer <token> in the request header.
Body
Model name
kling-v3 Positive text prompt
2500Negative text prompt Note: Negative prompts are not supported in image-to-image mode (i.e., when the image field is not empty).
2500Reference image
- Supports image Base64 encoding or image URL (must be accessible)
Base64 encoding notes: Please ensure all image data parameters use Base64 encoding format. When using Base64, do not add any prefix such as data:image/png;base64, — provide only the Base64 encoded string itself.
Correct example:
iVBORw0KGgoAAAANSUhEUgAAAAUA
Incorrect example:
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
- This parameter is required when image_reference is not empty
Image reference type.
- subject (character feature reference), face (facial appearance reference)
- When using face (facial appearance reference), the uploaded image must contain only 1 face
subject, face Reference strength for the uploaded image during generation.
0 <= x <= 1Facial reference strength, i.e., facial feature similarity to the reference image.
0 <= x <= 1Element reference list, configured based on element IDs in the element library.
Use key:value format as shown:
"element_list":[{ "element_id": long },{ "element_id": long }]
The total number of reference elements and reference images must not exceed 10
Generated image resolution.
1k, 2k Number of images to generate.
1 <= x <= 9Aspect ratio of generated images (width:height)
1:1, 16:9, 4:3, 3:2, 2:3, 3:4, 9:16, 21:9 Whether to also generate a watermarked result.
Callback notification URL for this task. If configured, the server will proactively notify when the task status changes.
Custom task ID