---
title: Kling 4.0 images | RunAPI
description: Generate standard images, ordered series, and ecommerce or webpage long
  images.
url: https://runapi.ai/docs/guides/task-api/kling-images.md
canonical: https://runapi.ai/docs/guides/task-api/kling-images
locale: en
---

> HTML version: https://runapi.ai/docs/guides/task-api/kling-images
> Site index for agents: https://runapi.ai/llms.txt

# Kling 4.0 images

Create with `POST /api/v1/kling/text_to_image` and query with `GET
/api/v1/kling/text_to_image/:id`. Use `callback_url` for completion
notifications. Both models return `images`, an ordered array of objects
with a `url`. Series stay in a single task and preserve the returned
order. Outputs are usually PNG at 2k and 4k; 8k output is JPEG. Do not
assume a fixed file extension.

## Standard and series images

Use `model: "kling-v4-image"` with a required `prompt` of at most 20,000
characters. `mode` defaults to `default`; `output_count` defaults to 1
and accepts 1–9. For `mode: "series"`, explicitly supply `output_count`
between 2 and 10. `output_resolution` accepts `2k`, `4k`, or `8k` and
defaults to `2k`. `aspect_ratio` defaults to `auto` and accepts `9:16`,
`2:3`, `3:4`, `1:1`, `4:3`, `3:2`, `16:9`, and `21:9`.

`source_image_urls` are ordered references addressed as `@image_1`,
`@image_2`, and so on. Optional `elements` contain `name`, `image_urls`,
`description`, and `tag`. Each element needs 2–4 image URLs and a
unique, case-insensitive name of 1–20 Chinese characters, letters,
digits, or underscores. Names matching `image_N` or `object_N` are
reserved. Descriptions allow up to 100 characters. Tags accept
`character`, `animal`, `prop`, `costume`, `scene`, `effect`, or
`others`. Source images and elements together cannot exceed 10
references. Address an element as `@name`.

## Long images

Use `model: "kling-v4-long-image"` and explicitly supply `skill`. Skills
are case-insensitive. The prompt limit is 20,000 characters and
`output_resolution` accepts `1k` or `2k`, defaulting to `2k`. A task
returns one image. Long images do not accept `mode`, `output_count`,
`elements`, or `aspect_ratio`.

| Skill | Input images | Length | Output resolution |
|----------
| `ecommerce` | 1–3 `source_image_urls` | `short` | `1k`, `2k` |
| `ecommerce` | 1–3 `source_image_urls` | `medium`, the default | `1k`, `2k` |
| `ecommerce` | 1–3 `source_image_urls` | `long` | `1k`, `2k` |
| `webpage` | Optional `style_image_url` and `subject_image_url` | Not accepted | `1k`, `2k` |

Ecommerce requests do not accept `style_image_url` or
`subject_image_url`. Product images of at least 300 pixels and aspect
ratios between 2:5 and 5:2 are recommended for generation quality.
Webpage requests do not accept `source_image_urls` or `length`.
Reference supplied webpage images with `@style` and `@subject`.

All input images must be publicly readable HTTP or HTTPS JPG, JPEG, or
PNG files, at most 20 MB each. References must name supplied images or
elements. Long-image prompts interpret `@` followed by letters, digits,
underscores, or Chinese characters as a reference, including email
addresses and handles. Use a full-width `＠` or a space after `@` for
literal text. Undeclared references return HTTP 422.

## Pricing

[Standard image pricing](https://runapi.ai/models/kling/v4-image) · [Long image
pricing](https://runapi.ai/models/kling/v4-long-image)

```json
{
  "model": "kling-v4-image",
  "prompt": "Show @image_1 and @Hero in two scenes",
  "mode": "series",
  "output_count": 2,
  "output_resolution": "2k",
  "source_image_urls": ["https://cdn.runapi.ai/public/samples/image.jpg"],
  "elements": [{
    "name": "Hero",
    "image_urls": ["https://cdn.runapi.ai/public/samples/portrait.jpg", "https://cdn.runapi.ai/public/samples/image-to-video.jpg"],
    "description": "The same character in both scenes",
    "tag": "character"
  }]
}
```

---

## More from RunAPI

- [Home](https://runapi.ai/.md)
- [Model Catalog](https://runapi.ai/models.md)
- [Pricing](https://runapi.ai/pricing.md)
- [Providers](https://runapi.ai/models)
- [Prompt Gallery](https://runapi.ai/prompts.md)
- [Documentation](https://runapi.ai/docs/guides)
- [SDKs](https://runapi.ai/sdk.md)
- [CLI](https://runapi.ai/cli.md)
- [MCP Server](https://runapi.ai/mcp.md)
- [x402](https://runapi.ai/x402.md)
- [Claude Code vs Cursor](https://runapi.ai/claude-code-vs-cursor.md)
- [Cursor API Setup](https://runapi.ai/cursor-api-setup.md)
- [RunAPI vs OpenRouter](https://runapi.ai/openrouter-alternative.md)
- [Enterprise](https://runapi.ai/contact.md)
- [Referral program](https://runapi.ai/referral-program.md)
- [Contact](https://runapi.ai/contact.md)
- [Terms](https://runapi.ai/terms.md)
- [Privacy](https://runapi.ai/privacy.md)
- [Site index for agents](https://runapi.ai/llms.txt)

Contact: contact@runapi.ai

## Structured data

```json
[
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "WebSite",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "potentialAction": {
      "@type": "SearchAction",
      "target": {
        "@type": "EntryPoint",
        "urlTemplate": "https://runapi.ai/models?q={search_term_string}"
      },
      "query-input": "required name=search_term_string"
    }
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "Organization",
    "name": "RunAPI",
    "url": "https://runapi.ai/",
    "logo": {
      "@type": "ImageObject",
      "url": "https://runapi.ai/icon.svg"
    },
    "sameAs": [
      "https://github.com/runapi-ai"
    ]
  },
  {
    "@context": "https://schema.org",
    "inLanguage": "en",
    "@type": "TechArticle",
    "headline": "Kling 4.0 images",
    "description": "Generate standard images, ordered series, and ecommerce or webpage long images.",
    "url": "https://runapi.ai/docs/guides/task-api/kling-images",
    "mainEntityOfPage": "https://runapi.ai/docs/guides/task-api/kling-images"
  }
]
```
