Skip to main content
POST
  1. After submission, a task_id will be returned. If you provided a callback_url, when the task status becomes finished or failed, a POST request will be sent to the callback_url.
  2. Regardless of whether callback_url is provided, you can retrieve the result through the unified Query Task Status endpoint.
Kling Image 4.0 Edit changes or combines reference images from text instructions. Refer to images by position (@Image1, @Image2), add elements — a character or object shown from several angles — to keep a subject consistent, and output up to 8K or a coherent image series. For prompt-only generation, use Kling Image 4.0 Text to Image.

Models

  • kwaivgi/kling-image-v4.0/edit — Image edit with Kling Image 4.0, 1–10 reference images and up to 7 elements.

Features

  • Edit one image or combine up to 10 reference images, referenced as @Image1, @Image2… in the prompt.
  • Elements (kling_elements): up to 7 characters or objects, each from 2–4 angles, referenced as @Element1, @Element2…
  • Native 2K, 4K and 8K output; up to 9 images or a coherent 2–10 image series.

Required parameters

  • prompt (string): Instructions for the edit. 1–50,000 characters of text. Refer to reference images as @Image1, @Image2, and to elements as @Element1, @Element2.
  • image_urls (string[]): 1–10 reference images. The first URL is @Image1, the second @Image2, and so on. Each image must be a publicly accessible HTTP(S) URL, up to 30 MB, at least 300 pixels wide and high, with an aspect ratio (width / height) between 0.4 and 2.5.

Optional parameters

  • kling_elements (object[]): Up to 7 elements. Each element is {"element_input_urls": [...]} with 2–4 images of one character or object: the frontal view first, then 1–3 other angles. Images have the same limits as image_urls. image_urls plus elements is at most 10.
  • size (string): auto, 16:9, 9:16, 1:1, 4:3, 3:4, 3:2, 2:3 or 21:9. Default auto, which picks an aspect ratio from the prompt and reference images.
  • resolution (string): 2K, 4K or 8K. Default 2K.
  • enable_sequential (boolean): true generates a coherent series of n related images with consistent subjects and style. Default false.
  • n (integer): Number of images. 1–9 (default 1) when enable_sequential is false; 2–10 (default 4) when it is true.

Resolution

Output images are PNG files. An 8K image can be larger than 100 MB, and 4K images are about 25–30 MB, so allow for longer downloads.

Examples

  • Reference image and element: place a character from three angles into a living room photo at 2K.
  • Combine images: move an object from @Image2 into @Image1.
  • Series from a reference: four times of day in the same room, enable_sequential: true, 4K.

Notes

  • Missing image_urls, more than 10 images, more than 7 elements, an element with fewer than 2 or more than 4 images, or more than 10 images and elements together returns 400.
  • Reference images are checked against the image limits (up to 30 MB, at least 300 pixels per side, aspect ratio 0.4–2.5) during generation; a task that stops at this check is refunded in full.
  • With enable_sequential: true the model decides the final composition of the series; occasionally it returns fewer images than n.
  • Put model and callback_url at the request root, next to input. input accepts the fields listed above; other fields return 400.
  • Credits depend on resolution and the number of images (n), plus a charge for each reference image and element that is charged once per task. If a series returns fewer images than n, the missing images are refunded when the task finishes. A failed task is refunded in full. See the pricing page for current rates.

Authorizations

Authorization
string
header
required

Use Authorization: Bearer VIDGO_API_KEY.

Body

application/json
model
string
required
Example:

"kwaivgi/kling-image-v4.0/edit"

input
object
required
callback_url
string<uri>

Optional webhook URL for completion or failure notifications.

Example:

"https://your-domain.com/callback"

Response

Task submission result. A task ID identifies asynchronous work; generation may still be running.

code
integer
required
Example:

200

data
object
required