Introduction
Kling 4.0 Flash reference-to-video creates a new 720p scene using a required prompt and supplied references. Add up to 10 images and up to 5 video clips with a combined duration of 20 seconds. Name images as @Image1 and videos as @Video1, continuing the numbers in upload order.
Use the prompt to explain what each reference contributes. In the desert example, one image identifies the subject while two videos guide camera movement in a dusk scene. New clips run 3–20 whole seconds with a 5-second default and include synchronized audio; keep_original_audio can retain a reference video’s sound. Reference audio files are not supported.
Key features & highlights
- Assign up to 10 reference images to subjects, objects, or scene details in the prompt.
- Guide motion and framing with up to 5 videos totaling no more than 20 seconds.
- Use @Image1 and @Video1 labels to connect the scene description to the supplied files.
- Generate a 3–20 second 720p result with audio, or retain reference video sound with
keep_original_audio. - Follow input framing with auto, or select 16:9, 9:16, 1:1, or 21:9.
Request parameters
| Parameter | Required | Description |
|---|---|---|
prompt | Yes | Required scene instructions with no preset text; assign roles to @Image1, @Image2, @Video1, and subsequent uploads. Prompt wording adds no separate charge. at least 1 characters |
reference_image_urls | No | Supply up to 10 image URLs and name them @Image1, @Image2, and so on in upload order. They guide the scene without changing the price. at least 1 items · at most 10 items |
reference_video_urls | No | Supply up to 5 video URLs totaling 20 seconds and name them @Video1, @Video2, and so on. at least 1 items · at most 5 items |
aspect_ratio | No | Choose auto to follow the references or select 16:9, 9:16, 1:1, or 21:9. Frame shape does not affect the per-second rate or add a charge. |
keep_original_audio | No | Set true to retain reference video sound or false to generate a new soundtrack; it applies when a reference video is supplied. This audio choice does not alter the price. Default: |
duration_seconds | No | Output length accepts whole seconds from 3 to 20 and defaults to 5 seconds. It changes the total charge through the billed output duration. |
Pricing
$0.113 / second
Reference generation is charged per output second. Including a reference video applies a higher per-second rate to the output duration; reference video length is not billed separately. Image references, prompt wording, aspect ratio, and keep_original_audio add no separate charge. Requests refused by Kling moderation incur no charge.
Use cases
- Place a subject from an image into a desert social scene guided by short motion clips.
- Explore a character and location combination using separately named image references.
- Build several short scene drafts around a chosen camera movement for a content review.
Prompt guide & pro tips
- Identify each image’s role, such as “@Image1 provides the subject,” before describing the new scene.
- Explain what to borrow from a video, such as “use the slow camera approach from @Video1,” so the reference has a defined purpose.
- Describe the new setting, such as “a quiet desert at dusk,” to distinguish the requested scene from the reference material.
- Keep the requested action concise, such as “the traveler stops beside the sign,” when drafting a 3-second result.
- If generating a fresh soundtrack, add a cue such as “Sound: dry wind and a distant train” to guide the included audio.
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-flash/reference-to-video",
"input": {
"aspect_ratio": "auto",
"duration_seconds": 5,
"prompt": "A slow aerial shot drifting over a misty pine forest at sunrise"
}
}'
# 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.












