Claude Opus 5.5 is live on SeedRouter

Image

Kling Image 4.0 Long Image

View Markdown

Generate tall 1K or 2K ecommerce product detail pages and webpage visual designs with Kling Image 4.0 Long Image, then poll for the finished PNG URL.

Submit a JSON request to POST /v1/images/generations with the model ID kling-image-4-0-long-image. Save the returned task ID, then poll GET /v1/tasks/{id} until the single tall PNG finishes.

Quick example

This request creates a 1K webpage layout from a text brief. Store your API key in SEEDROUTER_API_KEY.

curl https://api.seedrouter.ai/v1/images/generations \
  -H "Authorization: Bearer $SEEDROUTER_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "kling-image-4-0-long-image",
    "contents": [
      {"type": "prompt", "text": "Design a tall landing page for a specialty coffee roastery with a hero banner, three single-origin bean cards, roasting notes, and store hours."}
    ],
    "settings": {"skill": "webpage", "resolution": "1k"}
  }'

Endpoint and headers

Send JSON to POST https://api.seedrouter.ai/v1/images/generations with Content-Type: application/json and Authorization: Bearer YOUR_API_KEY. Keep the key on your server.

Parameters

FieldTypeValues and defaults
modelstring, requiredkling-image-4-0-long-image
contentsarray, requiredOne prompt item plus mode-specific reference image items.
contents[].typestring, requiredprompt, refer_image (ecommerce only, 1–3 required), style_refer_image (webpage only, at most 1), or subject_refer_image (webpage only, at most 1). element is not supported.
contents[].textstringRequired for prompt. English-only limit 166,000 characters, non-English limit 71,000. Mixed text must satisfy english / 166000 + non_english / 71000 <= 1.
contents[].urlstringRequired for each image item. Public HTTP(S) URL for a JPEG or PNG up to 30 MB, at least 300 px per side, aspect ratio from 2:5 to 5:2.
contents[].idstringOptional unique reference ID across all image items in the request. Mention it as @id in the prompt.
settings.skillstring, requiredecommerce for product detail pages or webpage for webpage designs.
settings.lengthstringshort (~2–5 sections), medium (default, ~6–10 sections), or long (~11–18 sections). Applies to ecommerce only; ignored for webpage.
settings.resolutionstring1k (default, 1024 px wide) or 2k (2048 px wide). Height adapts to content. 4k is not supported.
options.watermark_info.enabledbooleanOptional. Only false is supported.

Ecommerce product detail page

Ecommerce mode requires 1 to 3 refer_image entries. Reference each photo by its id in the prompt.

{
  "model": "kling-image-4-0-long-image",
  "contents": [
    {"type": "refer_image", "url": "https://example.com/kettle-front.png", "id": "front"},
    {"type": "refer_image", "url": "https://example.com/kettle-spout.jpg", "id": "spout"},
    {"type": "prompt", "text": "Build an ecommerce product detail page for the gooseneck kettle in @front with a close-up section highlighting @spout. Include hero visual, temperature control callouts, brewing scenes, and care notes."}
  ],
  "settings": {"skill": "ecommerce", "length": "medium", "resolution": "2k"}
}

Webpage design with style and subject references

Webpage mode accepts optional style_refer_image (at most 1) and subject_refer_image (at most 1) entries. Omit settings.length in webpage mode.

{
  "model": "kling-image-4-0-long-image",
  "contents": [
    {"type": "style_refer_image", "url": "https://example.com/editorial-grid.png", "id": "layout"},
    {"type": "subject_refer_image", "url": "https://example.com/watch.jpg", "id": "watch"},
    {"type": "prompt", "text": "Design a watch launch webpage matching the typography and grid rhythm of @layout while showcasing @watch across the hero, movement breakdown, and spec table."}
  ],
  "settings": {"skill": "webpage", "resolution": "2k"}
}

Retrieve the long image

Copy id from the POST response into TASK_ID and poll until status is completed or failed. Long-image tasks typically take several minutes, especially for long + 2k layouts.

curl "https://api.seedrouter.ai/v1/tasks/$TASK_ID" \
  -H "Authorization: Bearer $SEEDROUTER_API_KEY"

On completion, read output.data[0].url. Each request produces one complete tall PNG. At 2k, tall pages can exceed 50 MB, so plan download timeouts and viewer scaling accordingly. See the task reference and error directory.

Pricing

Each completed request bills one output tier rate (ecommerce by resolution × length, or webpage by resolution) plus one reference-image charge per input image (including the first). A failed request carries no charge. See the current rates.

Errors and tips

Invalid requests return HTTP 400 before billing. Common validation mistakes include omitting settings.skill, sending ecommerce without 1–3 refer_image URLs, mixing refer_image with webpage mode, requesting 4k, or duplicating reference IDs.

State the exact section order in your prompt—from hero banner down to specifications or footer—and include only verified product facts so the layout stays accurate. See the Kling Image 4.0 Long Image playground and OpenAPI schema.