Kling 4.0 Reference to Video API

kling-video/v4/reference-to-video
Kling 4.0 reference-to-video keeps characters, objects and scenes from up to 10 reference images and 7 elements consistent across 3–30 second videos.
Output
$0.157 / sec (variable)
Released
Oct 15, 2026

Overview

What is Kling 4.0 Reference to Video API?

Kling 4.0 reference-to-video keeps characters, objects and scenes from up to 10 reference images and 7 elements consistent across 3–30 second videos. It is part of Kling AI's new-generation Kling 4.0 video model family and is available on AI/ML API through the video generation endpoint.

Technical specifications

  • Supported inputs: up to 10 reference images, up to 7 elements, optional first frame, text prompt
  • Output: video, 3–30 seconds
  • Resolution: 720p or 1080p; aspect ratio 16:9, 9:16, 1:1, 21:9 or auto
  • Model ID: kling-video/v4/reference-to-video
  • Release date: October 15, 2026

Kling 4.0 Reference to Video API pricing

  • 720p: $0.157 / sec
  • 1080p: $0.235 / sec

Where to use Kling 4.0 Reference to Video

Consistent characters
Keep the same character or mascot across clips and campaigns.

Product placement
Place a specific product into new scenes while keeping its look intact.

Branded series
Build a series of videos with recurring people, objects and locations.

Use cases

Kling 4.0 Reference to Video keeps characters, objects and scenes consistent with up to 10 reference images and 7 elements.

It fits recurring characters and mascots across a series of clips, where identity has to stay stable from shot to shot.

Elements with frontal and side views help place a specific product or object into new scenes without changing its look.

Multi-shot prompts and aspect ratios from 9:16 to 21:9 cover both social and widescreen formats.

How to use Kling 4.0 Reference to Video API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to kling-video/v4/reference-to-video.
import requests, time

headers = {"Authorization": "Bearer " + AIMLAPI_KEY}
job = requests.post(
    "https://api.aimlapi.com/v2/video/generations",
    headers=headers,
    json={
      "model": "kling-video/v4/reference-to-video",
      "prompt": "@Image1 walks through a neon-lit street at night",
      "image_urls": [
        "https://example.com/character.jpg"
      ],
      "duration": 5
    },
).json()
gid = job["id"]

while True:
    res = requests.get(f"https://api.aimlapi.com/v2/video/generations?generation_id={gid}", headers=headers).json()
    if res.get("status") in ("completed", "error"):
        break
    time.sleep(15)
print(res["video"]["url"])
const headers = {
  Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
  "Content-Type": "application/json",
};
const job = await (await fetch("https://api.aimlapi.com/v2/video/generations", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "model": "kling-video/v4/reference-to-video",
    "prompt": "@Image1 walks through a neon-lit street at night",
    "image_urls": [
      "https://example.com/character.jpg"
    ],
    "duration": 5
  }),
})).json();

let res;
do {
  await new Promise((r) => setTimeout(r, 15000));
  res = await (await fetch(`https://api.aimlapi.com/v2/video/generations?generation_id=${job.id}`, { headers })).json();
} while (!["completed", "error"].includes(res.status));
console.log(res.video.url);
# submit the generation — the response contains the job "id"
curl -X POST https://api.aimlapi.com/v2/video/generations \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "kling-video/v4/reference-to-video", "prompt": "@Image1 walks through a neon-lit street at night", "image_urls": ["https://example.com/character.jpg"], "duration": 5}'

# then poll until status is "completed" — video.url holds the result
curl "https://api.aimlapi.com/v2/video/generations?generation_id={id}" -H "Authorization: Bearer $AIMLAPI_KEY"

OpenAI-compatible — swap the base URL and it works with your existing SDK.

Kling 4.0 Reference to Video API Pricing

TypePrice
Output
$0.157 / sec (variable)

Billed per second of video: 720p — $0.157 / sec, 1080p — $0.235 / sec. Clips from 3 to 30 seconds.

Kling 4.0 Reference to Video vs other models

ModelInputOutputContextBest for
$0.157 / sec (variable)
Video generation
$0.2 / sec (variable)
Video generation
$1.95 / 1M tokens
$0.10136 / sec
Video generation
$0.0711 / sec
Cinematic video + native audio

Frequently asked questions

Kling 4.0 Reference to Video generates 3–30 second videos that keep characters, objects and scenes consistent with up to 10 reference images and 7 elements.

It takes reference images (image_urls), optional elements with frontal and side views, an optional first frame and a text prompt, and returns a video. References are mentioned in the prompt as @Image1, @Element1 and so on.

Up to 10 reference images and up to 7 elements per request. Each element has one frontal image and 1–3 additional views.

Kling 4.0 Reference to Video is billed per second of generated video: $0.157 per second at 720p and $0.235 per second at 1080p.

16:9 (default), 9:16, 1:1 and 21:9, or auto to follow the references. Output resolution is 720p or 1080p.

Submit a POST request to https://api.aimlapi.com/v2/video/generations with the model ID klingai/video-v4-reference-to-video, your image_urls and a prompt, then poll with the returned generation_id until the status is completed.

Start building with Kling 4.0 Reference to Video

Get API Key
1000+ models, one API.