Kling 4.0 Reference to Video API with Image and Video Refs

Send model: kling-4-0-refs to POST /api/v1/videos/generations with up to 10 reference images for style, scene or subject and up to 5 reference videos for motion and camera work to imitate. Name each asset in the prompt as <<<image_1>>> or <<<video_1>>>. Takes run 3 to 30 seconds with a native audio track.
Get API Key
Mood board of photos and film stills pinned next to a monitor on a director's desk

Show the Model What You Mean

Up to 10 reference images

Pass image_urls for characters, products, scenes or styles. <<<image_1>>> is the first item; a number with no matching asset is rejected. Reference images are not charged.
Fan of printed reference photos spread across a light table

Up to 5 reference videos for motion

video_urls supplies motion and camera work to imitate; the videos are not edited. Each is at least 3 seconds, 30 seconds in total, MP4 or MOV up to 200 MB, 720 to 2160 px, 24 to 60 fps.
Camera on a gimbal tracing a curved path marked on a studio floor

Any ratio, up to 30 seconds

duration 3 to 30 seconds (default 5), resolution 720p or 1080p, and ratio 16:9, 9:16, 1:1 or 21:9. Audio is always included.
Three empty picture frames of different proportions on a gallery wall
A prompt and at least one image or video are required.

Kling 4.0 Reference to Video Request Fields and Limits

model and prompt (required)

kling-4-0-refs and a prompt of up to 2500 characters that refers to assets as <<<image_N>>> / <<<video_N>>>, numbered from 1 by array order.

image_urls

Up to 10 reference images, up to 10 MB each, width and height at least 300 px.

video_urls

Up to 5 reference videos, each at least 3 seconds and 30 seconds in total; MP4 or MOV, up to 200 MB, 720 to 2160 px each side, 24 to 60 fps.

duration

Output length, integer from 3 to 30 seconds. Defaults to 5.

resolution and ratio

720p (default) or 1080p, quality as alias; ratio 16:9 (default), 9:16, 1:1 or 21:9.

Not accepted

image_url, image_end_url, keyframes, sound, generate_audio, negative_prompt, model_params.multi_shot and 4K are rejected.
Images-only requests bill output seconds; adding reference videos switches to a lower rate on more seconds.

Kling 4.0 Reference to Video API Pricing

Images only: 10.205 tokens ($0.2041) / 15.275 tokens ($0.3055) per second

At 720p / 1080p, billed on output seconds only. 5 seconds at 720p costs 51.03 tokens ($1.0206).

With videos: 6.11 tokens ($0.1222) / 9.165 tokens ($0.1833) per second

At 720p / 1080p, billed on output seconds + max(total reference video seconds, output seconds).

Example: 5 s output, 8 s reference video

At 720p: 5 + 8 = 13 billed seconds, 79.43 tokens ($1.5886).

Example: 10 s output, 5 s reference video

At 720p: 10 + 10 = 20 billed seconds, 122.2 tokens ($2.444). Reference video length is measured and rounded up to a whole second.

Integrate the Kling 4.0 Reference to Video API

1

1. Create an API key

Generate a key at /keys and send it as Authorization: Bearer <key> from your server.
2

2. Order the references

Put images in image_urls and videos in video_urls; their array position becomes image_1, video_1 and so on.
3

3. Write the prompt and submit

Reference assets inline, e.g. The woman in <<<image_1>>> follows the moves of <<<video_1>>>, and POST to /api/v1/videos/generations.
4

4. Track completion

Store img_uuid, poll GET /api/v1/jobs/detail or use custom_callback_url, then download the clip.
Create an API Key
Consistent subjects and borrowed motion in generated clips.

What Developers Build with Kling 4.0 Reference to Video

Character-consistent stories

Keep the same character or mascot across many clips by reusing its reference images.

Dance and motion imitation

Have a character from an image follow the choreography or camera move of a reference video.

Product placement scenes

Combine a product photo with scene and style references to place it in new settings.

Style-matched campaigns

Reuse one set of style references to keep a series of ads visually aligned.
References, prompts, audio and pricing.

Kling 4.0 Reference to Video API FAQ

What is the endpoint?

POST https://api.goenhance.ai/api/v1/videos/generations with model: kling-4-0-refs.

How do I refer to my assets in the prompt?

Use <<<image_1>>>, <<<video_1>>> and so on, numbered from 1 in array order. A number with no matching asset is rejected.

Are the reference videos edited?

No. They only guide motion, camera work and other features to imitate. To edit an existing clip, use kling-4-0-edit.

Can I set a first or last frame?

No. image_url, image_end_url and keyframes are rejected here; use kling-4-0 for frame control.

Why does adding a reference video change the price?

With videos, billing is output seconds + max(total reference video seconds, output seconds) at 6.11 tokens ($0.1222) per second at 720p or 9.165 tokens ($0.1833) at 1080p.

Does the output include audio?

Yes. Every clip has a native audio track; sound and generate_audio are rejected.

Start Building with the Kling 4.0 Reference to Video API