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

# Kling Image 4.0 Long Image

> The Kling Image 4.0 Long Image API designs a full-length webpage or an ecommerce product detail page as one tall 1K or 2K image, from a prompt and up to 3 reference images.

> [!TIP]
>
> 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 result through the unified [Query Task Status](https://docs.vidgo.ai/api-manual/task-management/status.md) endpoint.

Kling Image 4.0 Long Image designs a whole page as one tall image: a website page (`skill: webpage`) or an ecommerce product detail page built from 1–3 product photos (`skill: ecommerce`). The width is fixed by `resolution` and the height follows the content, so one request returns a complete page mockup with all its sections.

For regular images, use [Kling Image 4.0 Text to Image](https://docs.vidgo.ai/api-manual/image-series/kwaivgi-kling-image-v4-0-text-to-image.md) or [Kling Image 4.0 Edit](https://docs.vidgo.ai/api-manual/image-series/kwaivgi-kling-image-v4-0-edit.md).

## Models

* **kwaivgi/kling-image-v4.0/long-image** — One tall webpage or ecommerce detail page design per request, 1K or 2K wide.

## Features

* Webpage designs with optional style (`@StyleImage`) and subject (`@SubjectImage`) references.
* Ecommerce detail pages from 1–3 product images, in three lengths (`short`, `medium`, `long`).
* 1K (1024 pixels wide) or 2K (2048 pixels wide) output; the height follows the content.

## Input modes

| `skill` | Inputs | Optional |
| - | - | - |
| `webpage` (default) | `prompt` | `style_image_url`, `subject_image_url`, `resolution` |
| `ecommerce` | `prompt`, `image_urls` (1–3 product images) | `length`, `resolution` |

## Required parameters

* `prompt` (string): Description of the page and its sections. 1–50,000 characters of text. Refer to product images as `@Image1`–`@Image3`, the style reference as `@StyleImage` and the subject reference as `@SubjectImage`.
* `image_urls` (string\[]): Used with `skill: ecommerce`, where it is required: 1–3 product images, numbered `@Image1`–`@Image3` by order. Each image must be a publicly accessible HTTP(S) URL, up to 30 MB, at least 300 pixels wide and high, with an aspect ratio (width / height) between 0.4 and 2.5.

## Optional parameters

* `skill` (string): `webpage` or `ecommerce`. Default `webpage`.
* `style_image_url` (string): Used with `skill: webpage`. The design follows the visual and layout style of this image (`@StyleImage`).
* `subject_image_url` (string): Used with `skill: webpage`. The design is built around the subject in this image (`@SubjectImage`).
* `length` (string): Used with `skill: ecommerce`. `short` (about 2–5 sections), `medium` (about 6–10) or `long` (about 11–18). Default `medium`.
* `resolution` (string): `1K` (1024 pixels wide) or `2K` (2048 pixels wide). Default `1K`.

## Output

* One tall PNG image per request. A 1K webpage is typically around 1024x5800 pixels; a long 2K ecommerce page can exceed 50,000 pixels in height and 80 MB.
* Generation usually takes 1.5–4 minutes and can take up to about 12 minutes for long 2K pages.

## Examples

* **Webpage**: a coffee brand website at `2K` that follows a style reference.
* **Ecommerce detail page**: a `medium` length page for one product photo at `1K`.

## Notes

* Each skill takes its own fields: `skill: ecommerce` takes 1–3 `image_urls` and `length`, and `skill: webpage` takes `style_image_url` and `subject_image_url`. Fields sent with the other skill return 400.
* Put `model` and `callback_url` at the request root, next to `input`. `input` accepts the fields listed above; other fields return 400.
* Credits are a fixed amount per request that depends on `skill`, `length` (for `ecommerce`) and `resolution`, plus a charge for each reference image (product, style or subject image). A failed task is refunded in full. See the [pricing page](https://vidgo.ai/apis/api-pricing) for current rates.


## OpenAPI

````yaml api-manual/image-series/kwaivgi-kling-image-v4-0-long-image.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Kling Image 4.0 Long Image
  description: >-
    The Kling Image 4.0 Long Image API designs a full-length webpage or an
    ecommerce product detail page as one tall 1K or 2K image, from a prompt and
    up to 3 reference images.
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Kling Image 4.0 Long Image
      summary: Submit Kling Image 4.0 Long Image Task
      operationId: submitKlingImage40LongImageTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              webpage:
                summary: Webpage with a style reference
                value:
                  model: kwaivgi/kling-image-v4.0/long-image
                  input:
                    skill: webpage
                    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.
                    style_image_url: https://cdn.vidgo.ai/temp/style-reference.png
                    resolution: 2K
              ecommerce:
                summary: Ecommerce product detail page
                value:
                  model: kwaivgi/kling-image-v4.0/long-image
                  input:
                    skill: ecommerce
                    prompt: >-
                      Design a product detail page for the insulated water
                      bottle in @Image1: hero shot, key features, capacity and
                      size, materials, and lifestyle scenes.
                    image_urls:
                      - https://cdn.vidgo.ai/temp/water-bottle.png
                    length: medium
                    resolution: 1K
      responses:
        '200':
          description: >-
            Task submission result. A task ID identifies asynchronous work;
            generation may still be running.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      additionalProperties: false
      properties:
        model:
          type: string
          example: kwaivgi/kling-image-v4.0/long-image
        callback_url:
          type: string
          format: uri
          description: Optional webhook URL for completion or failure notifications.
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - prompt
          additionalProperties: false
          properties:
            prompt:
              type: string
              minLength: 1
              maxLength: 50000
              description: >-
                Description of the page and its sections. Refer to product
                images as @Image1, @Image2 and @Image3, to the style reference
                as @StyleImage, and to the subject reference as @SubjectImage.


                Include at least one non-whitespace character.
            skill:
              type: string
              enum:
                - webpage
                - ecommerce
              default: webpage
              description: >-
                Design type. webpage designs a website page; ecommerce designs a
                product detail page from 1–3 product images in image_urls.
            image_urls:
              type: array
              minItems: 1
              maxItems: 3
              items:
                type: string
                format: uri
                description: Use a publicly accessible HTTP(S) download URL.
              description: >-
                Product images for skill ecommerce, where they are required: 1–3
                images. Numbered by order: @Image1, @Image2, @Image3.


                Each image must be a publicly accessible HTTP(S) URL, 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:
              type: string
              format: uri
              description: >-
                Optional style reference for skill webpage, referenced as
                @StyleImage. The design follows its visual and layout style.


                Use a publicly accessible HTTP(S) download URL with the same
                limits as image_urls.
            subject_image_url:
              type: string
              format: uri
              description: >-
                Optional subject reference for skill webpage, referenced as
                @SubjectImage. The design is built around the subject it shows.


                Use a publicly accessible HTTP(S) download URL with the same
                limits as image_urls.
            length:
              type: string
              enum:
                - short
                - medium
                - long
              default: medium
              description: >-
                Page length for skill ecommerce: short (about 2–5 sections),
                medium (about 6–10 sections) or long (about 11–18 sections).
            resolution:
              type: string
              enum:
                - 1K
                - 2K
              default: 1K
              description: >-
                Output width: 1K is 1024 pixels wide, 2K is 2048 pixels wide.
                The height follows the content.
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-example-001
            status:
              type: string
              example: not_started
            created_time:
              type: string
              format: date-time
              example: '2026-11-19T10:30:00'
    ErrorResponse:
      type: object
      required:
        - detail
      properties:
        detail:
          type: string
          description: Error message. See [Error Codes](/api-manual/error-codes).
          example: prompt is required
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: 'Use `Authorization: Bearer VIDGO_API_KEY`.'

````

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