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.
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.
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.
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.
| Type | Price |
|---|---|
| Output | |
Billed per second of video: 720p — $0.157 / sec, 1080p — $0.235 / sec. Clips from 3 to 30 seconds.
| Model | Input | Output | Context | Best for |
|---|---|---|---|---|
Kling 4.0 Reference to Video This page | Video generation |
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.