About Kling 4.0
Up to 30-second 1080p clips with keyframes; may queue when busy.
Call it with the model name kling/4.0/reference-to-video on POST /jobs/createTask, from 162 credits for a 5-second clip ($1.62).
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
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.
Request parameters
| Parameter | Required | Description |
|---|---|---|
aspect_ratio | No | The shape of the frame: wide, square or tall. auto · 16:9 · 9:16 · 1:1 · 21:9 · Default: auto |
duration_seconds | No | How long the clip runs. You pay per second. ≥ 3 · ≤ 30 · Default: 5 |
keep_original_audio | No | Keep the reference video's own sound instead of generating new audio. Only used with a reference video. Default: false |
prompt | Yes | Say what each reference is and what the shot should do with it. Refer to images as @Image1, @Image2, to videos as @Video1 and to audio clips as @Audio1, numbered in upload order. |
reference_audio_urls | No | Audio to match: a voice, music or a rhythm. |
reference_image_urls | No | Pictures of the people, outfits or places the result should keep. |
reference_video_urls | No | Clips whose motion, camera or style the result should follow. |
resolution | No | Output size. Bigger sizes look sharper and cost more. 720p · 1080p · Default: 720p |
Pricing
Prices are in credits, the same credits you use on the website (1 credit = $0.01). The hold is taken when the task is accepted and settled to the actual charge when it finishes; failed tasks are refunded.
| Option | Credits per second | ≈ USD |
|---|---|---|
| resolution 720p | 32.4 | $0.32 |
| resolution 1080p | 48.6 | $0.49 |
For an exact number before you run, send the same body to POST /jobs/quote.
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
Call the Kling 4.0 API in three steps
- Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow- and use the same credits as the website.
- Send the request. POST /jobs/createTask with model kling/4.0/reference-to-video and an input object that follows the parameter table. The response returns a task ID straight away.
- Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
-H "Authorization: Bearer $POPNOW_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{
"model": "kling/4.0/reference-to-video",
"input": {
"prompt": "A slow aerial shot drifting over a misty pine forest at sunrise",
"aspect_ratio": "auto",
"resolution": "720p",
"duration_seconds": 5
}
}'
# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
-H "Authorization: Bearer $POPNOW_API_KEY"Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.
Kling 4.0 API questions
How much does the Kling 4.0 API cost?
Kling 4.0 starts at 162 credits ($1.62) for a 5-second clip with Reference to Video, its cheapest task. Prices by option: 720p 32.4 credits per second, 1080p 48.6 credits per second. Credits are the same as on the website (1 credit = $0.01), and failed tasks are refunded.
What are the limits of the Kling 4.0 · Reference to Video API?
Clip length: 3–30 s; Resolutions: 720p · 1080p; Aspect ratios: auto · 16:9 · 9:16 · 1:1 · 21:9; Reference audio: 3; Reference images: 10. Requests outside these limits are rejected before anything is charged.