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 response result through the unified Query Task Status endpoint.
Use 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) or 2K (2048 pixels wide) output. The height follows the content.
  • PNG output.

Input modes

  • Webpage (skill: webpage, default) — Describe the site and its sections in prompt. Optionally pass style_image_url so the design follows its visual and layout style (@StyleImage), and subject_image_url so the design is built around the subject it shows (@SubjectImage).
  • Ecommerce (skill: ecommerce) — Pass 1 to 3 product images in image_urls (@Image1, @Image2, @Image3) and describe the detail page in prompt. Choose the page length with length.

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): webpage or ecommerce. Default is webpage.
  • image_urls (array of strings): 1 to 3 publicly accessible HTTP(S) product image URLs for ecommerce, 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 for webpage. The design follows its visual and layout style.
  • subject_image_url (string): Subject reference image URL for webpage. The design is built around the subject it shows.
  • length (string): Page length for ecommerce: short (about 2–5 sections), medium (about 6–10 sections), or long (about 11–18 sections). Default is medium.
  • resolution (string): 1K or 2K. Default is 1K.

Output

  • One tall PNG image is returned in files. The width is 1024 pixels at 1K and 2048 pixels at 2K; the height depends on the content and page length.
  • Examples: a webpage design at 1K is about 1024×5848; an ecommerce long page at 2K can reach 2048×54941 (about 87 MB).

Examples

Webpage

A coffee brand website that follows the style of a reference image:

Ecommerce Detail Page

A medium-length product detail page built from one product image:

Notes

  • image_urls and length are used with skill ecommerce; style_image_url and subject_image_url are used with skill webpage.
  • image_urls must 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 1K ecommerce pages about 2 to 4 minutes, and long ecommerce pages at 2K up to about 12 minutes. Use callback_url or poll Query Task Status until the task finishes.
  • For regular images, image editing, and image series, use Kling Image 4.0.

Authorizations

Authorization
string
header
required

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:

Body

application/json
model
enum<string>
required

Kling Image 4.0 Long Image model identifier.

Available options:
kling-4.0-long-image
input
object
required

Generate one tall image: a webpage design (skill webpage) or an ecommerce product detail page built from 1–3 product images (skill ecommerce).

callback_url
string<uri>

Optional webhook URL for task completion or failure.

Response

Task submitted successfully

code
enum<integer>
required

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: Success
  • 400: Invalid request parameters
  • 401: Missing or invalid API key
  • 402: Insufficient credits
  • 403: Permission denied
  • 404: Resource not found
  • 408: Request timeout
  • 429: Rate limit exceeded
  • 500: Internal server error
  • 502: Upstream service error
  • 503: Service unavailable

See Error Codes for details.

Available options:
200,
400,
401,
402,
403,
404,
408,
429,
500,
502,
503
Example:

200

data
object
required