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 Text to Image turns a prompt into high-resolution images, from 2K up to native 8K. Generate up to 9 independent images per request, or a coherent series of 2–10 images that keep the same subject and style, for storyboards, product sets and step-by-step visuals. To edit or combine reference images, use Kling Image 4.0 Edit. For full-length webpage or product detail page designs, use Kling Image 4.0 Long Image.

Models

  • kwaivgi/kling-image-v4.0/text-to-image — Text-to-image with Kling Image 4.0, 1–9 images or a 2–10 image series per request.

Features

  • Native 2K, 4K and 8K output.
  • Up to 9 independent images per request.
  • Coherent image series (enable_sequential): 2–10 images with a consistent subject and style, returned in order.
  • Nine aspect ratios, or auto to let the model choose.

Required parameters

  • prompt (string): Description of the image. 1–50,000 characters of text.

Optional parameters

  • 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.
  • 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

  • One 4K image: an editorial fashion shot at 16:9, 4K.
  • Several independent images: three variations of a product shot with n: 3.
  • Coherent image series: a four-panel watercolor story with enable_sequential: true and n: 4.

Notes

  • n takes 1–9 (2–10 with enable_sequential: true) and resolution takes 2K, 4K or 8K; other values return 400. For reference images, use Kling Image 4.0 Edit.
  • 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). 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/text-to-image"

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