Introduction
Kling 4.0 Reference to video casts a new clip from what you upload: up to 10 reference images for people, objects and places, up to 5 reference videos (30 seconds in total) for motion, camera and pacing, and up to 3 audio clips for a voice or a sound. Name each one in the prompt as @Image1, @Image2, @Video1 or @Audio1, numbered in upload order. Clips run 3 to 30 seconds at 720p or 1080p with a stereo soundtrack.
Choose a Kling 4.0 mode by starting material
| What you have at the start | Mode |
|---|---|
| a written scene or script | Kling 4.0 Text to video |
| an opening frame, and optionally a closing frame and in-between frames | Kling 4.0 Image to video |
| photos, clips or voice samples to cast from | Kling 4.0 Reference to video (you are here) |
Key features & highlights
Images, videos and voices in one request
Kling 4.0 takes all three kinds of reference together. Images set who and what appears, videos set how the camera and the subject move, and audio clips set how someone sounds.
Name each reference in the prompt
Write @Image1, @Image2 and so on in upload order, and say what each one is. In our trailer example "@Image1 is the woman, @Image2 is the chrome trailer" was enough to put that woman in front of that trailer.
Borrow a camera move from a clip
A reference video passes on its motion and pacing. Turn on keep_original_audio to keep that clip's own sound instead of generating new audio. The reference video's own seconds are billed too, at a lower rate than output seconds.
Request parameters
| Parameter | Required | Description |
|---|---|---|
prompt | Yes | Say what each reference is and what the shot does with it. Write @Image1, @Image2 for images, @Video1 for videos and @Audio1 for audio clips, each numbered in upload order. at least 1 characters |
reference_image_urls | No | Up to 10 images of people, objects, outfits or places, referred to as @Image1, @Image2 and so on. They do not change the price. at least 1 items · at most 10 items |
reference_video_urls | No | Up to 5 videos, 30 seconds in total, for motion, camera and pacing, referred to as @Video1, @Video2. at least 1 items · at most 5 items |
reference_audio_urls | No | Up to 3 audio clips of 5 to 30 seconds each for a voice or a sound, referred to as @Audio1, @Audio2. Write the spoken words in the prompt. at least 1 items · at most 3 items |
aspect_ratio | No | auto (default) follows the reference images or video; 16:9, 9:16, 1:1 or 21:9 set it yourself. It does not change the price. |
resolution | No | 720p or 1080p (default 720p). 1080p costs more per second. |
keep_original_audio | No | Off by default. On keeps the reference video's own sound instead of generating a new soundtrack; it only matters when you give a reference video. Default: |
duration_seconds | No | Whole seconds, 3 to 30 (default 5). Drives the price. |
Pricing
Billed per second of output, plus the seconds of any reference video (each clip rounded up to a whole second) at a lower per-second rate. 1080p costs more per second than 720p. Reference images and audio clips do not change the price. A refused or failed request is not charged.
| Specification | Price |
|---|---|
| $0.216 / second |
| $0.324 / second |
Use cases
Put a person in a place they were never photographed
A portrait plus a photo of a location becomes a scene of that person there, with the action you describe.
Keep a prop or vehicle consistent
Give a car, a motorcycle or an outfit its own reference image so it looks the same in every clip.
Match a voice
Add a voice sample of 5 to 30 seconds as @Audio1 and write the line in quotes; the spoken line follows that voice.
Prompt guide & pro tips
Open with the cast list
Start with one sentence per reference - "@Image1 is the man, @Image2 is the motorcycle" - then describe the shot.
A few clear references beat many similar ones
One clear photo per person or object works better than several near-duplicates that the model has to average.
Leave aspect_ratio on auto
On auto the clip follows the shape of your references; set it only when you need a specific frame.
API quick start
# Generate the idempotency key once; reuse it when retrying after a lost response.
export SPICY_IDEMPOTENCY_KEY="${SPICY_IDEMPOTENCY_KEY:-$(uuidgen)}"
curl -X POST https://api.spicyapi.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $SPICY_IDEMPOTENCY_KEY" \
-d '{
"model": "kling/4.0/reference-to-video",
"input": {
"aspect_ratio": "auto",
"duration_seconds": 5,
"prompt": "A slow aerial shot drifting over a misty pine forest at sunrise",
"resolution": "720p"
}
}'
# Copy data.taskId from the response into TASK_ID, then poll the status.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.spicyapi.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $SPICY_API_KEY"
See the API reference for authentication, the complete schema, polling, and error handling.










