curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"model": "kwaivgi/kling-image-v4.0/long-image",
"input": {
"skill": "webpage",
"prompt": "Design a long image for a specialty coffee brand's official website, including the hero section, product showcase, roasting philosophy, store information, and footer. Follow the visual style of @StyleImage.",
"style_image_url": "https://cdn.vidgo.ai/temp/style-reference.png",
"resolution": "2K"
}
}
EOF{
"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 Long Image
The Kling Image 4.0 Long Image API designs a full-length webpage or an ecommerce product detail page as one tall 1K or 2K image, from a prompt and up to 3 reference images.
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 @- <<EOF
{
"model": "kwaivgi/kling-image-v4.0/long-image",
"input": {
"skill": "webpage",
"prompt": "Design a long image for a specialty coffee brand's official website, including the hero section, product showcase, roasting philosophy, store information, and footer. Follow the visual style of @StyleImage.",
"style_image_url": "https://cdn.vidgo.ai/temp/style-reference.png",
"resolution": "2K"
}
}
EOF{
"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.
skill: webpage) or an ecommerce product detail page built from 1–3 product photos (skill: ecommerce). The width is fixed by resolution and the height follows the content, so one request returns a complete page mockup with all its sections.
For regular images, use Kling Image 4.0 Text to Image or Kling Image 4.0 Edit.
Models
- kwaivgi/kling-image-v4.0/long-image — One tall webpage or ecommerce detail page design per request, 1K or 2K wide.
Features
- Webpage designs with optional style (
@StyleImage) and subject (@SubjectImage) references. - Ecommerce detail pages from 1–3 product images, in three lengths (
short,medium,long). - 1K (1024 pixels wide) or 2K (2048 pixels wide) output; the height follows the content.
Input modes
skill | Inputs | Optional |
|---|---|---|
webpage (default) | prompt | style_image_url, subject_image_url, resolution |
ecommerce | prompt, image_urls (1–3 product images) | length, resolution |
Required parameters
prompt(string): Description of the page and its sections. 1–50,000 characters of text. Refer to product images as@Image1–@Image3, the style reference as@StyleImageand the subject reference as@SubjectImage.image_urls(string[]): Used withskill: ecommerce, where it is required: 1–3 product images, numbered@Image1–@Image3by order. 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
skill(string):webpageorecommerce. Defaultwebpage.style_image_url(string): Used withskill: webpage. The design follows the visual and layout style of this image (@StyleImage).subject_image_url(string): Used withskill: webpage. The design is built around the subject in this image (@SubjectImage).length(string): Used withskill: ecommerce.short(about 2–5 sections),medium(about 6–10) orlong(about 11–18). Defaultmedium.resolution(string):1K(1024 pixels wide) or2K(2048 pixels wide). Default1K.
Output
- One tall PNG image per request. A 1K webpage is typically around 1024x5800 pixels; a long 2K ecommerce page can exceed 50,000 pixels in height and 80 MB.
- Generation usually takes 1.5–4 minutes and can take up to about 12 minutes for long 2K pages.
Examples
- Webpage: a coffee brand website at
2Kthat follows a style reference. - Ecommerce detail page: a
mediumlength page for one product photo at1K.
Notes
- Each skill takes its own fields:
skill: ecommercetakes 1–3image_urlsandlength, andskill: webpagetakesstyle_image_urlandsubject_image_url. Fields sent with the other skill return 400. - Put
modelandcallback_urlat the request root, next toinput.inputaccepts the fields listed above; other fields return 400. - Credits are a fixed amount per request that depends on
skill,length(forecommerce) andresolution, plus a charge for each reference image (product, style or subject image). A failed task is refunded in full. See the pricing page for current rates.
Body
application/json