v1
latestOpenAPI 3.1.02026-07-267724480.0 KBGenerate images with Kling
Headers
Must be application/json.
Request body
Kling image model variant. Use kling-v3 for new requests. Omitting model_name uses the legacy CometAPI route default.
Text prompt describing the image to generate. Maximum 2500 characters.
Elements to exclude from the image. Maximum 2500 characters. Not supported when image is provided.
Reference image as a raw Base64 string without a data: prefix, or a public URL. Accepted formats: JPG, JPEG, PNG. Maximum 10 MB, minimum 300x300 px, aspect ratio between 1:2.5 and 2.5:1.
Reference mode for legacy image-to-image requests when image is provided.
How closely the output follows the reference image. Range: 0-1. Used by legacy image-reference models.
Human-subject fidelity control. Range: 0-1. Used only by legacy subject-reference requests.
Output resolution. Defaults to 1k.
Number of images to generate. Range: 1-9.
Output aspect ratio (width:height).
Webhook URL to receive task status updates when the task completes.
Optional user-defined task ID for your own tracking. Must be unique per account.
Response
Task request accepted or an error response returned by the API.
Response message.
Request identifier returned when present.