> ## Documentation Index
> Fetch the complete documentation index at: https://docs.modelhunter.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Long Image

> Generate one complete long image with Kling Image 4.0: an e-commerce product detail page or a web page design.

## Models

| Model | Types | Resolutions | Output |
| - | - | - | - |
| `kling-4-0/long-image` — Kling Image 4.0 Long Image | `ecommerce`, `webpage` | 1K, 2K | one long image per task |

> [!NOTE]
>
> This endpoint only accepts `kling-4-0/long-image`. Each task produces exactly one long image; the number of images cannot be set.
> Fields that belong to one `skill` cannot be sent with the other — mixing them returns a `400` validation error.

## Pricing

One long image per task at the official price, plus \$0.003 for every input image (`image_urls`, `style_image`, `subject_image`):

| Type | Length | 1K | 2K |
| - | - | - | - |
| `ecommerce` | `short` (2–5 sections) | \$0.235 | \$0.282 |
| `ecommerce` | `medium` (6–10 sections) | \$0.47 | \$0.549 |
| `ecommerce` | `long` (11–18 sections) | \$0.784 | \$0.862 |
| `webpage` | — | \$0.549 | \$0.596 |

## Body Parameters

**model** `string` *required*

Model to use: `kling-4-0/long-image`.

**input** `object` *required*

Input parameters for the generation.

**properties**

**skill** `string` *required*

What to generate:

* `ecommerce` — a product detail page. Requires `image_urls`; supports `length`.
* `webpage` — a web page design. Supports `style_image` and `subject_image`.

**prompt** `string` *required*

Text description of the page. Maximum length: 20000 characters.

* `ecommerce`: mention product images as `@image_1`, `@image_2` … in the order of `image_urls`.
* `webpage`: mention `style_image` as `@style` and `subject_image` as `@subject`.

Any `@` directly followed by a letter, digit, underscore or Chinese character is treated as a reference,
so email addresses and @handles fail validation — use a full-width `＠` or put a space after `@`.

**image\_urls** `string[]`

`ecommerce` only (required): 1–3 publicly accessible JPG/PNG product images, max 20 MB each.
Recommended: width and height at least 300 px, aspect ratio between 2:5 and 5:2 — images outside
this range are accepted but make the task fail during generation.

**length** `string` (default: medium)

`ecommerce` only. Page length: `short` (about 2–5 sections), `medium` (about 6–10) or `long` (about 11–18).
A section is a content block within the single long image.

**style\_image** `string`

`webpage` only. Style reference image URL (JPG/PNG, max 20 MB); its visual style and layout are borrowed. Mention it as `@style`.

**subject\_image** `string`

`webpage` only. Subject reference image URL (JPG/PNG, max 20 MB); the subject is kept in the design. Mention it as `@subject`.

**resolution** `string` (default: 2K)

Output resolution: `1K` or `2K` (case-insensitive).

**webhookUrl** `string`

URL to receive a webhook when the task completes.

**metadata** `object`

Custom key-value metadata to attach to the task.

```bash cURL theme={null}
curl -X POST https://api.modelhunter.ai/api/v1/kling/long-image \
  -H "Authorization: Bearer $MODELHUNTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "kling-4-0/long-image",
    "input": {
      "skill": "ecommerce",
      "prompt": "A product detail page for @image_1, clean white background, highlight the key features section by section",
      "image_urls": ["https://example.com/product.png"],
      "length": "short",
      "resolution": "1K"
    }
  }'
```

```json 202 theme={null}
{
  "success": true,
  "data": {
    "id": "task_abc123",
    "status": "pending",
    "type": "long-image",
    "provider": "kling",
    "model": "kling-4-0/long-image",
    "created_at": "2026-11-24T10:00:00Z",
    "estimated_seconds": 120
  }
}
```

```json 400 theme={null}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "input.image_urls is required"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.