Kling Image 4.0 Long Image is the long-form image generation of Kling Image 4.0, the image model Kling AI released on November 17, 2026. On APIMart it is available as kling-v4-long-image: turn 1 to 3 product images into an e-commerce product detail page, or design a web page with optional style and subject references, as one long image at 1K or 2K.

Transparent pricing with no hidden fees. Pay only for what you use.
The Kling Image 4.0 Long Image API on APIMart uses the model ID kling-v4-long-image. Choose ecommerce to turn 1 to 3 product images into a product detail page, or webpage to design a web page with optional style and subject references. Pick 1K or 2K, and the model returns one long PNG whose height follows the content. Tasks run asynchronously, and each request is billed by its page tier plus any reference images.
Submit a kling-v4-long-image task, then poll it by task ID. The examples create an e-commerce detail page and a web page design.
Save your APIMart API key as APIMART_API_KEY. The examples send Authorization: Bearer <key> for submission and task queries.
POST /v1/images/generations with model set to kling-v4-long-image, skill and your prompt. Add image_urls for ecommerce, or image_with_roles for webpage. Read the task ID from data[0].task_id.
Use GET /v1/tasks/{task_id}. For a completed task, read data.result.images[0].url[0]; for a failed task, read data.error.message.
See the Kling Image 4.0 Long Image API documentation for every parameter and error code.
curl -X POST https://api.apimart.ai/v1/images/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v4-long-image",
"prompt": "Create an e-commerce product detail page for the perfume in @Image1.",
"skill": "ecommerce",
"length": "medium",
"resolution": "1K",
"image_urls": [
"https://example.com/perfume.png"
]
}'import os
import time
import requests
API_BASE = "https://api.apimart.ai"
headers = {"Authorization": f"Bearer {os.environ['APIMART_API_KEY']}"}
# 1. Submit the generation task
payload = {
"model": "kling-v4-long-image",
"prompt": "Create an e-commerce product detail page for the perfume in @Image1.",
"skill": "ecommerce",
"length": "medium",
"resolution": "1K",
"image_urls": [
"https://example.com/perfume.png"
]
}
resp = requests.post(f"{API_BASE}/v1/images/generations", headers=headers, json=payload, timeout=60)
resp.raise_for_status()
task_id = resp.json()["data"][0]["task_id"]
# 2. Poll the task until it finishes
for _ in range(200):
task_resp = requests.get(f"{API_BASE}/v1/tasks/{task_id}", headers=headers, timeout=30)
task_resp.raise_for_status()
task = task_resp.json()["data"]
if task["status"] == "completed":
print(task["result"]["images"][0]["url"][0])
break
if task["status"] == "failed":
raise RuntimeError(task.get("error", {}).get("message", "generation failed"))
time.sleep(3)
else:
raise TimeoutError(f"task {task_id} did not finish in time; continue GET polling with this task ID")curl -X POST https://api.apimart.ai/v1/images/generations \
-H "Authorization: Bearer $APIMART_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-v4-long-image",
"prompt": "Design a landing page for a specialty coffee brand in the style of @Image1, featuring the coffee bag in @Image2.",
"skill": "webpage",
"resolution": "2K",
"image_with_roles": [
{
"url": "https://example.com/brand-style.png",
"role": "style"
},
{
"url": "https://example.com/coffee-bag.png",
"role": "subject"
}
]
}'TASK_ID="task_xxx" # replace with the task_id returned by the POST request
curl "https://api.apimart.ai/v1/tasks/$TASK_ID" \
-H "Authorization: Bearer $APIMART_API_KEY"| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | Required | Default: kling-v4-long-image | Model ID for Kling Image 4.0 Long Image. |
prompt | string | Required | Default: — | Page description. Up to 166,000 English characters or 71,000 Chinese characters; mixed text counts proportionally. Refer to reference images as @Image1, @Image2 and so on. |
skill | string | Required | Default: — | ecommerce (product detail page) or webpage (web page design), case-insensitive. |
length | string | Optional | Default: medium | ecommerce only: short, medium or long (about 2–5, 6–10 or 11–18 content sections). Do not send it for webpage. |
resolution | string | Optional | Default: 1K | 1K (1024 px wide) or 2K (2048 px wide), case-insensitive. The height follows the content. |
image_urls | string[] | Optional | Default: — | Required for ecommerce: 1 to 3 product images as public URLs. JPG, JPEG or PNG, up to 30 MB each, at least 300 px wide and tall, with an aspect ratio between 2:5 and 5:2. Not accepted for webpage. |
image_with_roles | object[] | Optional | Default: — | webpage only, optional: items with url and role, at most one style image (visual and layout style) and one subject image (the subject to keep). Same image requirements as image_urls. Not accepted for ecommerce. |
What you can do with kling-v4-long-image on APIMart, from a product detail page to a full web layout.
Set skill to ecommerce and add 1 to 3 product images. The model lays out a complete product detail page around your product in one long image.
Set skill to webpage to design a web page from your prompt. Add a style reference, a subject reference, both or neither.
For ecommerce, choose short (about 2–5 content sections), medium (about 6–10, the default) or long (about 11–18).
1K output is 1024 px wide and 2K is 2048 px wide. The height follows the content, and each request returns one PNG.
Use JPG or PNG images up to 30 MB, at least 300 px wide and tall, with an aspect ratio between 2:5 and 5:2. Refer to them in the prompt as @Image1, @Image2 and so on.
Prompts can hold up to 166,000 English characters or 71,000 Chinese characters, so you can describe every section of the page.
Submit to POST /v1/images/generations, then poll GET /v1/tasks/{task_id}. The long image URL is in data.result.images[0].url[0].
Each request is billed at its page tier plus each reference image. Requests rejected with a 400 error are not charged, failed tasks are fully refunded, and one API key works for every model on APIMart.
Common ways teams use kling-v4-long-image for e-commerce and web work.
Upload product photos and get a full detail page built around them, for example a perfume product detail page like the one in Kling's own example.
Lay out a landing page in one long image to review the visual direction and section order before anyone builds it.
Add a style reference to carry a brand's look across a whole web page, shown as one continuous design.
Draft long promotion pages for launches and sales events, with the headline, selling points and offer in a single image.
Try different lengths or prompts for the same product or site and compare the full-page designs side by side.
Call kling-v4-long-image from your backend with the same APIMart API key you use for other models, and save the returned image.
Create an API key, choose the page type, then run the task on this page or from your code.
Create an API key in the APIMart console. The same key works for every model on APIMart, and requests send it as Authorization: Bearer <key>.
Pick ecommerce and add 1 to 3 product images, or pick webpage and optionally add style and subject references. Then describe the page and choose the length and 1K or 2K.
Click RUN to see the estimated cost and start the task, or send the same JSON to POST /v1/images/generations. The result appears in your history when the task completes.
Answers about kling-v4-long-image parameters, pricing, API keys and naming.
Kling Image 4.0 Long Image is the long-form image generation of Kling Image 4.0, from Kling AI, Kuaishou's AI creative platform. It creates one long image for an e-commerce product detail page or a web page design, with the complete layout in a single image. On APIMart you call it as kling-v4-long-image.
Kling AI launched Kling Image 4.0 on November 17, 2026, and long-form images for e-commerce product detail pages and web design were part of that launch. On APIMart it is available through the kling-v4-long-image model ID on this page and through the API.
Use kling-v4-long-image in the model field. This page's address is /model/kling-image-4-0-long-image, but kling-image-4-0-long-image is not a valid model ID for API requests.
Each request is billed at the price of its tier: resolution plus length for ecommerce (1K or 2K, each with short, medium or long), or resolution for webpage (1K or 2K). Each reference image, whether a product, style or subject image, is billed once per request. Current prices are shown in the pricing table on this page.
Create an API key in the APIMart console. One APIMart API key works for all models, so you do not need a separate key for Kling Image 4.0 Long Image.
Yes. Sign in and use the workspace at the top of this page or the Playground in your dashboard. The RUN button shows the estimated cost before you start, and the JSON view shows the exact request you can reuse in code.
Yes. ecommerce requires 1 to 3 product images in image_urls. webpage takes up to one style image and one subject image in image_with_roles, both optional. Each image must be a JPG, JPEG or PNG of up to 30 MB, at least 300 px wide and tall, with an aspect ratio between 2:5 and 5:2, at a public URL; the workspace uploads local files for you. If a link returns 403, 404 or 410, or an image does not meet these requirements, the request is rejected right away with a 400 error, and no task is created or charged. If an image fails to load for another reason, such as a source timeout, the task fails and is fully refunded.
The width is set by resolution: 1K (the default) is 1024 px wide and 2K is 2048 px wide. The height follows the content, and each request returns one long PNG. size, aspect_ratio, width, height and mask_url are not supported, n can only be 1, and watermarks are not available.
Use skill ecommerce for a product detail page: add 1 to 3 product images and choose length short, medium (the default) or long. Use skill webpage for a web page design: length is not used, and you can add a style reference for the visual and layout style and a subject reference for the subject to keep. In the prompt, ecommerce images follow the order of image_urls; for webpage the style image is @Image1 and the subject image comes next.
Up to 166,000 English characters or 71,000 Chinese characters; mixed text counts proportionally.
No. Invalid requests return a 400 error right away without creating a task or charging you. If a task fails after it is accepted, the charge is fully refunded.
Generated images are kept for 72 hours. Download the images you want to keep before then.
They are two model IDs on APIMart. kling-v4-image is the general Kling Image 4.0 model for single images or a short image series. kling-v4-long-image returns one long image for a product detail page or a web design. Kling 4.0 and Kling 4.0 Flash are different again: they are Kling's video models.
Yes. Kling Image V4 Long Image uses Kling's V4 version label. You may also see Kling V4 Long Image, Kling 4.0 Long Image, Kling Image 4 Long Image or Kling Image 4.0 Long-Image. They all refer to the long-form image generation of Kling Image 4.0, which you call on APIMart as kling-v4-long-image.
Explore more models in the same category.

Mai Image 2.7 Flash
MAI-Image-2.7-Flash is the faster, more cost-efficient version of Microsoft’s MAI-Image-2.7 image editing model, built for quick responses and high-volume image workflows.

Mai Image 2.7
Text to Image,Image to Image

Kling V4 Image
Kling Image 4.0 generates 2K or 4K images from a text prompt or up to 10 reference images, either as 1 to 9 independent images or as a related series of 2 to 4 images.

MiniMax H3 Image
Built for image quality and prompt adherence. It handles text-to-image, reference-based generation and image editing. MiniMax says it can generate a 4K (4096 × 4096) image in under 10 seconds and work with up to 16 reference images. In Chinese launch coverage, MiniMax puts its speed at about 1.5 to 2 times that of mainstream tools.