curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kwaivgi/kling-image-v4.0/text-to-image",
"input": {
"prompt": "High fashion model wearing a dress made of living moss, standing in an abandoned greenhouse, shafts of light, editorial photography",
"size": "16:9",
"resolution": "4K"
}
}
'{
"code": 200,
"data": {
"task_id": "task-example-001",
"status": "not_started",
"created_time": "2026-11-19T10:30:00"
}
}{
"detail": "prompt is required"
}{
"detail": "prompt is required"
}Kling
Kling Image 4.0 Text to Image
The Kling Image 4.0 Text to Image API generates 1–9 images or a coherent 2–10 image series from a prompt, at 2K, 4K or native 8K resolution.
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kwaivgi/kling-image-v4.0/text-to-image",
"input": {
"prompt": "High fashion model wearing a dress made of living moss, standing in an abandoned greenhouse, shafts of light, editorial photography",
"size": "16:9",
"resolution": "4K"
}
}
'{
"code": 200,
"data": {
"task_id": "task-example-001",
"status": "not_started",
"created_time": "2026-11-19T10:30:00"
}
}{
"detail": "prompt is required"
}{
"detail": "prompt is required"
}- After submission, a
task_idwill be returned. If you provided acallback_url, when the task status becomesfinishedorfailed, a POST request will be sent to thecallback_url. - Regardless of whether
callback_urlis provided, you can retrieve the result through the unified Query Task Status endpoint.
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
autoto 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:3or21:9. Defaultauto, which picks an aspect ratio from the prompt.resolution(string):2K,4Kor8K. Default2K.enable_sequential(boolean):truegenerates a coherent series ofnrelated images with consistent subjects and style. Defaultfalse.n(integer): Number of images. 1–9 (default 1) whenenable_sequentialisfalse; 2–10 (default 4) when it istrue.
Resolution
resolution | Example size |
|---|---|
2K | 2048x2048 at 1:1 |
4K | 5440x3072 at 16:9 |
8K | 8192x8192 at 1:1 |
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: trueandn: 4.
Notes
ntakes 1–9 (2–10 withenable_sequential: true) andresolutiontakes2K,4Kor8K; other values return 400. For reference images, use Kling Image 4.0 Edit.- With
enable_sequential: truethe model decides the final composition of the series; occasionally it returns fewer images thann. - Put
modelandcallback_urlat the request root, next toinput.inputaccepts the fields listed above; other fields return 400. - Credits depend on
resolutionand the number of images (n). If a series returns fewer images thann, the missing images are refunded when the task finishes. A failed task is refunded in full. See the pricing page for current rates.
Body
application/json