Kling IMAGE 4.0

Kling IMAGE 4.0 is an image model for text-to-image and reference-guided generation at native 2K, 4K, and 8K, with natural lighting and skin and material detail close to a camera photo. It renders up to 2,000 characters of legible text in seven languages, combines up to 10 reference images and elements, and plans series of up to 10 images that keep subjects and style consistent. It also designs e-commerce product pages and websites as a single tall image, which suits storyboards, slide decks, product shoots, and campaign visuals.

Complete technical specification for integration
Ready-to-use code snippets for common workflows
Step-by-step tutorials for advanced use cases
← All GuidesElements
How to save a product or a character in Kling IMAGE 4.0 as an element under your own id, build it from several angles, and reuse it by id across a whole campaign.
Introduction
An element is a product or a character that Kling IMAGE 4.0 saves for reuse under an id you choose. The first request builds it from a few photos taken from different angles. Every later request names the same id and gets the same product back without sending the photos again, which is what keeps a campaign's hero item identical from the first shot to the last.

A campaign photo for an outdoor gear brand. A young man with a short beard in a navy rain shell wears <<<element_1>>> on both shoulders as he steps onto a rocky trail at a misty trailhead, a wooden trail sign and pine trees behind him. Soft overcast morning light. Three-quarter view from behind and to the side at shoulder height, 35mm lens, the backpack sharp and in the center of the frame. Photoreal outdoor photography, no text, no logos.
- Front

A front-facing e-commerce packshot of a 28-liter hiking backpack in a rust orange ripstop fabric with charcoal gray side panels, a curved front zip pocket, two black compression straps, a small reflective tab at the top and a gray padded top handle. Standing upright on a plain light gray backdrop. Soft even studio lighting, a subtle contact shadow. Photoreal product photography, no logos, no text.
- Side

The same backpack from <<<image_1>>> in a side view, showing its side panel, the side bottle pocket and the padded shoulder strap, against the same light gray backdrop in the same light. Photoreal product photography, no logos, no text.
- Back

The same backpack from <<<image_1>>> seen from behind, showing the padded mesh back panel, both shoulder straps and the hip belt, against the same light gray backdrop in the same light. Photoreal product photography, no logos, no text.
The three packshots became the element in the same request that rendered the hero. Worn on the hiker's back, the backpack keeps the curved front pocket and the charcoal side panels of the packshots.
Creating an element
Elements go in inputs.elements. An element needs an id, a short description, a frontalImage, and one to three more angles in images. In the prompt it is <<<element_1>>>, numbered in array order and separately from reference images:
import { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: 'klingai:kling-image@4.0',
positivePrompt: 'A campaign photo for an outdoor gear brand. A young man with a short beard in a navy rain shell wears <<<element_1>>> on both shoulders as he steps onto a rocky trail at a misty trailhead, a wooden trail sign and pine trees behind him. Soft overcast morning light. Three-quarter view from behind and to the side at shoulder height, 35mm lens, the backpack sharp and in the center of the frame. Photoreal outdoor photography, no text, no logos.',
width: 2496,
height: 1664,
inputs: {
elements: [
{
id: 'k4i-trail-pack',
description: 'Rust orange 28-liter hiking backpack with charcoal side panels',
frontalImage: 'https://assets.runware.ai/guides/klingai-image-4-0/elements/source-backpack.jpg',
images: [
'https://assets.runware.ai/guides/klingai-image-4-0/elements/source-backpack-side.jpg',
'https://assets.runware.ai/guides/klingai-image-4-0/elements/source-backpack-back.jpg'
],
tags: [
'Item'
]
}
]
}
})import asyncio
import os
from runware import Runware
async def main():
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
results = await client.run({
"model": "klingai:kling-image@4.0",
"positivePrompt": "A campaign photo for an outdoor gear brand. A young man with a short beard in a navy rain shell wears <<<element_1>>> on both shoulders as he steps onto a rocky trail at a misty trailhead, a wooden trail sign and pine trees behind him. Soft overcast morning light. Three-quarter view from behind and to the side at shoulder height, 35mm lens, the backpack sharp and in the center of the frame. Photoreal outdoor photography, no text, no logos.",
"width": 2496,
"height": 1664,
"inputs": {
"elements": [
{
"id": "k4i-trail-pack",
"description": "Rust orange 28-liter hiking backpack with charcoal side panels",
"frontalImage": "https://assets.runware.ai/guides/klingai-image-4-0/elements/source-backpack.jpg",
"images": [
"https://assets.runware.ai/guides/klingai-image-4-0/elements/source-backpack-side.jpg",
"https://assets.runware.ai/guides/klingai-image-4-0/elements/source-backpack-back.jpg"
],
"tags": [
"Item"
]
}
]
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "imageInference",
"taskUUID": "6a3d8f15-2c9e-4b74-8a61-0f5e2b7c9d38",
"model": "klingai:kling-image@4.0",
"positivePrompt": "A campaign photo for an outdoor gear brand. A young man with a short beard in a navy rain shell wears <<<element_1>>> on both shoulders as he steps onto a rocky trail at a misty trailhead, a wooden trail sign and pine trees behind him. Soft overcast morning light. Three-quarter view from behind and to the side at shoulder height, 35mm lens, the backpack sharp and in the center of the frame. Photoreal outdoor photography, no text, no logos.",
"width": 2496,
"height": 1664,
"inputs": {
"elements": [
{
"id": "k4i-trail-pack",
"description": "Rust orange 28-liter hiking backpack with charcoal side panels",
"frontalImage": "https://assets.runware.ai/guides/klingai-image-4-0/elements/source-backpack.jpg",
"images": [
"https://assets.runware.ai/guides/klingai-image-4-0/elements/source-backpack-side.jpg",
"https://assets.runware.ai/guides/klingai-image-4-0/elements/source-backpack-back.jpg"
],
"tags": [
"Item"
]
}
]
}
}
]'runware run klingai:kling-image@4.0 \
positivePrompt="A campaign photo for an outdoor gear brand. A young man with a short beard in a navy rain shell wears <<<element_1>>> on both shoulders as he steps onto a rocky trail at a misty trailhead, a wooden trail sign and pine trees behind him. Soft overcast morning light. Three-quarter view from behind and to the side at shoulder height, 35mm lens, the backpack sharp and in the center of the frame. Photoreal outdoor photography, no text, no logos." \
width=2496 \
height=1664 \
inputs.elements.0.id=k4i-trail-pack \
inputs.elements.0.description="Rust orange 28-liter hiking backpack with charcoal side panels" \
inputs.elements.0.frontalImage=https://assets.runware.ai/guides/klingai-image-4-0/elements/source-backpack.jpg \
inputs.elements.0.images.0=https://assets.runware.ai/guides/klingai-image-4-0/elements/source-backpack-side.jpg \
inputs.elements.0.images.1=https://assets.runware.ai/guides/klingai-image-4-0/elements/source-backpack-back.jpg \
inputs.elements.0.tags.0=Item{
"taskType": "imageInference",
"taskUUID": "6a3d8f15-2c9e-4b74-8a61-0f5e2b7c9d38",
"model": "klingai:kling-image@4.0",
"positivePrompt": "A campaign photo for an outdoor gear brand. A young man with a short beard in a navy rain shell wears <<<element_1>>> on both shoulders as he steps onto a rocky trail at a misty trailhead, a wooden trail sign and pine trees behind him. Soft overcast morning light. Three-quarter view from behind and to the side at shoulder height, 35mm lens, the backpack sharp and in the center of the frame. Photoreal outdoor photography, no text, no logos.",
"width": 2496,
"height": 1664,
"inputs": {
"elements": [
{
"id": "k4i-trail-pack",
"description": "Rust orange 28-liter hiking backpack with charcoal side panels",
"frontalImage": "https://assets.runware.ai/guides/klingai-image-4-0/elements/source-backpack.jpg",
"images": [
"https://assets.runware.ai/guides/klingai-image-4-0/elements/source-backpack-side.jpg",
"https://assets.runware.ai/guides/klingai-image-4-0/elements/source-backpack-back.jpg"
],
"tags": [
"Item"
]
}
]
}
}Response
[
{
"taskType": "imageInference",
"taskUUID": "6a3d8f15-2c9e-4b74-8a61-0f5e2b7c9d38",
"imageUUID": "d4e9a2c7-5b18-4f63-9e07-2a8c6f3d1b95",
"imageURL": "https://im.runware.ai/image/os/a14d18/ws/2/ii/d4e9a2c7-5b18-4f63-9e07-2a8c6f3d1b95.jpg"
}
]You pick the id: up to 20 letters, digits, hyphens or underscores. It is the only handle you keep, so choose one you will recognize in a later request. tags is optional and classifies the element, with values such as Item, Character, Costume or Scene.
Shoot the angles against one backdrop in one light. The three packshots share the gray backdrop and the studio light, so the only thing that changes between them is the view, and the model reads them as one object.
Reusing an element
To bring the backpack back, send its id without the photos. The model looks the element up and places the saved product in the new scene:
import { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: 'klingai:kling-image@4.0',
positivePrompt: 'A lifestyle photo for the same outdoor gear brand\'s city line. A woman in her twenties with a curly bob, in a beige trench coat and white sneakers, waits on a modern train platform with <<<element_1>>> on one shoulder, looking down the track. Bright morning light through the glass canopy, a train softly blurred arriving behind her. Full length, eye level, 50mm lens. Photoreal lifestyle photography, no text, no logos.',
width: 1760,
height: 2336,
inputs: {
elements: [
{
id: 'k4i-trail-pack'
}
]
}
})import asyncio
import os
from runware import Runware
async def main():
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
results = await client.run({
"model": "klingai:kling-image@4.0",
"positivePrompt": "A lifestyle photo for the same outdoor gear brand's city line. A woman in her twenties with a curly bob, in a beige trench coat and white sneakers, waits on a modern train platform with <<<element_1>>> on one shoulder, looking down the track. Bright morning light through the glass canopy, a train softly blurred arriving behind her. Full length, eye level, 50mm lens. Photoreal lifestyle photography, no text, no logos.",
"width": 1760,
"height": 2336,
"inputs": {
"elements": [
{
"id": "k4i-trail-pack"
}
]
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "imageInference",
"taskUUID": "9b5e2a74-1d6c-4f38-b2a9-7e4c1f8d6a03",
"model": "klingai:kling-image@4.0",
"positivePrompt": "A lifestyle photo for the same outdoor gear brand's city line. A woman in her twenties with a curly bob, in a beige trench coat and white sneakers, waits on a modern train platform with <<<element_1>>> on one shoulder, looking down the track. Bright morning light through the glass canopy, a train softly blurred arriving behind her. Full length, eye level, 50mm lens. Photoreal lifestyle photography, no text, no logos.",
"width": 1760,
"height": 2336,
"inputs": {
"elements": [
{
"id": "k4i-trail-pack"
}
]
}
}
]'runware run klingai:kling-image@4.0 \
positivePrompt="A lifestyle photo for the same outdoor gear brand's city line. A woman in her twenties with a curly bob, in a beige trench coat and white sneakers, waits on a modern train platform with <<<element_1>>> on one shoulder, looking down the track. Bright morning light through the glass canopy, a train softly blurred arriving behind her. Full length, eye level, 50mm lens. Photoreal lifestyle photography, no text, no logos." \
width=1760 \
height=2336 \
inputs.elements.0.id=k4i-trail-pack{
"taskType": "imageInference",
"taskUUID": "9b5e2a74-1d6c-4f38-b2a9-7e4c1f8d6a03",
"model": "klingai:kling-image@4.0",
"positivePrompt": "A lifestyle photo for the same outdoor gear brand's city line. A woman in her twenties with a curly bob, in a beige trench coat and white sneakers, waits on a modern train platform with <<<element_1>>> on one shoulder, looking down the track. Bright morning light through the glass canopy, a train softly blurred arriving behind her. Full length, eye level, 50mm lens. Photoreal lifestyle photography, no text, no logos.",
"width": 1760,
"height": 2336,
"inputs": {
"elements": [
{
"id": "k4i-trail-pack"
}
]
}
}Response
[
{
"taskType": "imageInference",
"taskUUID": "9b5e2a74-1d6c-4f38-b2a9-7e4c1f8d6a03",
"imageUUID": "2f8c6e1a-9d43-4b07-a5e2-8c1f6d3a9b74",
"imageURL": "https://im.runware.ai/image/os/a14d18/ws/2/ii/2f8c6e1a-9d43-4b07-a5e2-8c1f6d3a9b74.jpg"
}
]
A lifestyle photo for the same outdoor gear brand's city line. A woman in her twenties with a curly bob, in a beige trench coat and white sneakers, waits on a modern train platform with <<<element_1>>> on one shoulder, looking down the track. Bright morning light through the glass canopy, a train softly blurred arriving behind her. Full length, eye level, 50mm lens. Photoreal lifestyle photography, no text, no logos.

An overhead flat lay for a "what to pack for a day hike" blog post. <<<element_1>>> lies open in the center of a weathered wooden deck, surrounded by neatly arranged gear: a folded windbreaker, a steel water bottle, a trail map, a headlamp, a first aid pouch, sunglasses and two energy bars, all in plain unprinted packaging. Soft even daylight, gentle shadows. Seen from directly above. Photoreal product photography, no text, no logos.
Describe the scene, not the element. Neither prompt mentions the backpack's color or pockets. They describe the place and what happens in it, and the element supplies the product.
An element belongs to the organization that created it. Its id only resolves in requests from that same organization, and an id that was never created there is rejected.
Several elements in one image
A request takes up to 10 elements and reference images combined. Each element gets its own number in the prompt, and reference images keep theirs. The request below reuses the backpack as <<<element_1>>>, creates a trail guide as <<<element_2>>> and takes the campsite from a reference image:

<<<element_2>>> sets <<<element_1>>> down on the wooden bench at the campsite in <<<image_1>>> and looks out over the lake with a calm smile, one hand still on the backpack strap. Warm golden hour light from the left, a long shadow across the grass. Wide shot at standing height, 35mm lens, the guide and the backpack on the left third of the frame. Photoreal outdoor campaign photography, no text, no logos.
- Guide, front

A front-facing full-length portrait of a woman in her forties with a long gray braid over one shoulder, sun-weathered fair skin and light freckles, wearing a forest green fleece jacket, tan hiking trousers and brown leather hiking boots, standing straight with her arms relaxed against a plain light gray studio backdrop. Even soft light, photoreal, no logos, no text.
- Guide, three-quarter

The same woman from <<<image_1>>> in a three-quarter view turned to her left, with the same braid, clothes and boots, against the same light gray backdrop in the same light. Full length, photoreal, no logos, no text.
- Campsite

A lakeside campsite in the mountains at golden hour: a small green tent on a grassy bank, a stone fire ring with a kettle, a wooden bench, a calm lake reflecting the sky and pine-covered ridges behind. Warm low sun from the left. Photoreal outdoor photography, no people, no text, no logos.
import { createClient } from '@runware/sdk'
const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()
const [result] = await client.run({
model: 'klingai:kling-image@4.0',
positivePrompt: '<<<element_2>>> sets <<<element_1>>> down on the wooden bench at the campsite in <<<image_1>>> and looks out over the lake with a calm smile, one hand still on the backpack strap. Warm golden hour light from the left, a long shadow across the grass. Wide shot at standing height, 35mm lens, the guide and the backpack on the left third of the frame. Photoreal outdoor campaign photography, no text, no logos.',
width: 2720,
height: 1536,
inputs: {
elements: [
{
id: 'k4i-trail-pack'
},
{
id: 'k4i-trail-guide',
description: 'Trail guide with a long gray braid in a forest green fleece',
frontalImage: 'https://assets.runware.ai/guides/klingai-image-4-0/elements/source-guide.jpg',
images: [
'https://assets.runware.ai/guides/klingai-image-4-0/elements/source-guide-side.jpg'
],
tags: [
'Character'
]
}
],
referenceImages: [
'https://assets.runware.ai/guides/klingai-image-4-0/elements/source-camp.jpg'
]
}
})import asyncio
import os
from runware import Runware
async def main():
async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
results = await client.run({
"model": "klingai:kling-image@4.0",
"positivePrompt": "<<<element_2>>> sets <<<element_1>>> down on the wooden bench at the campsite in <<<image_1>>> and looks out over the lake with a calm smile, one hand still on the backpack strap. Warm golden hour light from the left, a long shadow across the grass. Wide shot at standing height, 35mm lens, the guide and the backpack on the left third of the frame. Photoreal outdoor campaign photography, no text, no logos.",
"width": 2720,
"height": 1536,
"inputs": {
"elements": [
{
"id": "k4i-trail-pack"
},
{
"id": "k4i-trail-guide",
"description": "Trail guide with a long gray braid in a forest green fleece",
"frontalImage": "https://assets.runware.ai/guides/klingai-image-4-0/elements/source-guide.jpg",
"images": [
"https://assets.runware.ai/guides/klingai-image-4-0/elements/source-guide-side.jpg"
],
"tags": [
"Character"
]
}
],
"referenceImages": [
"https://assets.runware.ai/guides/klingai-image-4-0/elements/source-camp.jpg"
]
}
})
asyncio.run(main())curl https://api.runware.ai/v1 \
-H "Authorization: Bearer $RUNWARE_API_KEY" \
-H "Content-Type: application/json" \
-d '[
{
"taskType": "imageInference",
"taskUUID": "3c7f1e92-6a4d-4b85-9c13-5e8a2d7f4b60",
"model": "klingai:kling-image@4.0",
"positivePrompt": "<<<element_2>>> sets <<<element_1>>> down on the wooden bench at the campsite in <<<image_1>>> and looks out over the lake with a calm smile, one hand still on the backpack strap. Warm golden hour light from the left, a long shadow across the grass. Wide shot at standing height, 35mm lens, the guide and the backpack on the left third of the frame. Photoreal outdoor campaign photography, no text, no logos.",
"width": 2720,
"height": 1536,
"inputs": {
"elements": [
{
"id": "k4i-trail-pack"
},
{
"id": "k4i-trail-guide",
"description": "Trail guide with a long gray braid in a forest green fleece",
"frontalImage": "https://assets.runware.ai/guides/klingai-image-4-0/elements/source-guide.jpg",
"images": [
"https://assets.runware.ai/guides/klingai-image-4-0/elements/source-guide-side.jpg"
],
"tags": [
"Character"
]
}
],
"referenceImages": [
"https://assets.runware.ai/guides/klingai-image-4-0/elements/source-camp.jpg"
]
}
}
]'runware run klingai:kling-image@4.0 \
positivePrompt="<<<element_2>>> sets <<<element_1>>> down on the wooden bench at the campsite in <<<image_1>>> and looks out over the lake with a calm smile, one hand still on the backpack strap. Warm golden hour light from the left, a long shadow across the grass. Wide shot at standing height, 35mm lens, the guide and the backpack on the left third of the frame. Photoreal outdoor campaign photography, no text, no logos." \
width=2720 \
height=1536 \
inputs.elements.0.id=k4i-trail-pack \
inputs.elements.1.id=k4i-trail-guide \
inputs.elements.1.description="Trail guide with a long gray braid in a forest green fleece" \
inputs.elements.1.frontalImage=https://assets.runware.ai/guides/klingai-image-4-0/elements/source-guide.jpg \
inputs.elements.1.images.0=https://assets.runware.ai/guides/klingai-image-4-0/elements/source-guide-side.jpg \
inputs.elements.1.tags.0=Character \
inputs.referenceImages.0=https://assets.runware.ai/guides/klingai-image-4-0/elements/source-camp.jpg{
"taskType": "imageInference",
"taskUUID": "3c7f1e92-6a4d-4b85-9c13-5e8a2d7f4b60",
"model": "klingai:kling-image@4.0",
"positivePrompt": "<<<element_2>>> sets <<<element_1>>> down on the wooden bench at the campsite in <<<image_1>>> and looks out over the lake with a calm smile, one hand still on the backpack strap. Warm golden hour light from the left, a long shadow across the grass. Wide shot at standing height, 35mm lens, the guide and the backpack on the left third of the frame. Photoreal outdoor campaign photography, no text, no logos.",
"width": 2720,
"height": 1536,
"inputs": {
"elements": [
{
"id": "k4i-trail-pack"
},
{
"id": "k4i-trail-guide",
"description": "Trail guide with a long gray braid in a forest green fleece",
"frontalImage": "https://assets.runware.ai/guides/klingai-image-4-0/elements/source-guide.jpg",
"images": [
"https://assets.runware.ai/guides/klingai-image-4-0/elements/source-guide-side.jpg"
],
"tags": [
"Character"
]
}
],
"referenceImages": [
"https://assets.runware.ai/guides/klingai-image-4-0/elements/source-camp.jpg"
]
}
}Response
[
{
"taskType": "imageInference",
"taskUUID": "3c7f1e92-6a4d-4b85-9c13-5e8a2d7f4b60",
"imageUUID": "8e1b4d6f-7c29-4a53-b8e0-6d2f9a4c1e87",
"imageURL": "https://im.runware.ai/image/os/a14d18/ws/2/ii/8e1b4d6f-7c29-4a53-b8e0-6d2f9a4c1e87.jpg"
}
]A reused element and a new one can share a request. The backpack is sent by id alone and the guide with her photos, so this one request saves k4i-trail-guide for the next shot in the campaign as well. The campsite stays a plain reference: it is used once and needs no id.
Tips
-
Create once, reuse by id. Later requests need only the
id. -
Give an element several angles. A front view plus one to three more covers the views a scene asks for.
-
Keep the backdrop and light constant across the angles. Only the view should change between them.
-
Describe the scene, not the element. Its appearance comes from the saved photos.
-
Save what recurs, reference what does not. A product or a person that appears across a campaign is an element, and a location used once is a reference image.
-
Pick ids you will remember. The
idis the only handle you keep, and it works only inside your organization.