curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"model": "kling-4.0-long-image",
"input": {
"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.",
"skill": "webpage",
"style_image_url": "https://example.com/style-reference.png",
"resolution": "2K"
}
}
EOF{
"code": 200,
"data": {
"task_id": "task-unified-1794470400-abcd1234",
"status": "not_started",
"created_time": "2026-11-12T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}Kling
Kling Image 4.0 Long Image
The Kling Image 4.0 Long Image API designs a full-length webpage or ecommerce product detail page as one tall image from a prompt, with optional product, style, and subject reference images.
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.poyo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"model": "kling-4.0-long-image",
"input": {
"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.",
"skill": "webpage",
"style_image_url": "https://example.com/style-reference.png",
"resolution": "2K"
}
}
EOF{
"code": 200,
"data": {
"task_id": "task-unified-1794470400-abcd1234",
"status": "not_started",
"created_time": "2026-11-12T10:30:00"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}- 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 response result through the unified Query Task Status endpoint.
kling-4.0-long-image to design a complete website page or an ecommerce product detail page as one tall image, from the first section to the footer. It suits landing page mockups, site redesign concepts, and product detail pages for online stores. Kling Image 4.0 Long Image is part of the Kling Image 4.0 family from Kuaishou.
Models
- kling-4.0-long-image — Long-image design for webpages and ecommerce product detail pages
Features
- Webpage designs: a full site layout, such as hero, product showcase, story, and footer sections, in one tall image.
- Ecommerce product detail pages built around 1 to 3 product images, in short, medium, or long page lengths.
- Style reference (
@StyleImage) and subject reference (@SubjectImage) for webpage designs. 1K(1024 pixels wide) or2K(2048 pixels wide) output. The height follows the content.- PNG output.
Input modes
- Webpage (
skill:webpage, default) — Describe the site and its sections inprompt. Optionally passstyle_image_urlso the design follows its visual and layout style (@StyleImage), andsubject_image_urlso the design is built around the subject it shows (@SubjectImage). - Ecommerce (
skill:ecommerce) — Pass 1 to 3 product images inimage_urls(@Image1,@Image2,@Image3) and describe the detail page inprompt. Choose the page length withlength.
Required parameters
prompt(string): Description of the page and its sections, 1–50,000 characters. Must contain non-whitespace text. Refer to product images as@Image1,@Image2,@Image3, to the style reference as@StyleImage, and to the subject reference as@SubjectImage.
Optional parameters
skill(string):webpageorecommerce. Default iswebpage.image_urls(array of strings): 1 to 3 publicly accessible HTTP(S) product image URLs forecommerce, required in that mode. Each image can be up to 30 MB, at least 300 pixels wide and high, with an aspect ratio (width / height) between 0.4 and 2.5.style_image_url(string): Style reference image URL forwebpage. The design follows its visual and layout style.subject_image_url(string): Subject reference image URL forwebpage. The design is built around the subject it shows.length(string): Page length forecommerce:short(about 2–5 sections),medium(about 6–10 sections), orlong(about 11–18 sections). Default ismedium.resolution(string):1Kor2K. Default is1K.
Output
- One tall PNG image is returned in
files. The width is 1024 pixels at1Kand 2048 pixels at2K; the height depends on the content and page length. - Examples: a
webpagedesign at1Kis about 1024×5848; anecommercelongpage at2Kcan reach 2048×54941 (about 87 MB).
Examples
Webpage
A coffee brand website that follows the style of a reference image:{
"model": "kling-4.0-long-image",
"input": {
"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.",
"skill": "webpage",
"style_image_url": "https://example.com/style-reference.png",
"resolution": "2K"
}
}
Ecommerce Detail Page
A medium-length product detail page built from one product image:{
"model": "kling-4.0-long-image",
"input": {
"prompt": "Design a product detail page for the insulated water bottle in @Image1: hero shot, key features, capacity and size, materials, and lifestyle scenes.",
"skill": "ecommerce",
"image_urls": ["https://example.com/water-bottle.png"],
"length": "medium",
"resolution": "1K"
}
}
Notes
image_urlsandlengthare used withskillecommerce;style_image_urlandsubject_image_urlare used withskillwebpage.image_urlsmust be an array, even for one image.- Each request generates one image.
- A long image usually takes about 2 to 12 minutes: webpage designs and
1Kecommerce pages about 2 to 4 minutes, andlongecommerce pages at2Kup to about 12 minutes. Usecallback_urlor poll Query Task Status until the task finishes. - For regular images, image editing, and image series, use Kling Image 4.0.
Authorizations
All API endpoints require Bearer Token authentication.
Create an API key: sign in to PoYo, open Dashboard → API Key at poyo.ai/dashboard/api-key, and click to create a key.
Add it to the request header:
Authorization: Bearer YOUR_API_KEY
Body
application/json
Response
Task submitted successfully
Business status code. 200 means success; any other value means the request failed. Always check this field: some validation errors return HTTP 200 with code: 400 in the body.
200: Success400: Invalid request parameters401: Missing or invalid API key402: Insufficient credits403: Permission denied404: Resource not found408: Request timeout429: Rate limit exceeded500: Internal server error502: Upstream service error503: Service unavailable
See Error Codes for details.
Available options:
200, 400, 401, 402, 403, 404, 408, 429, 500, 502, 503 Example:
200