Kwaivgi Kling Video O3 4k Video Reference API Documentation
Playground
Try it on WaveSpeedAI!Kling O3 Omni 4K Video Reference generates 4K AI videos guided by an input video, text prompt, and optional reference images, supporting video-to-video creation with visual reference guidance, motion consistency, camera control, and high-quality cinematic output. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.
Features
Kling O3 Omni 4K Video Reference generates a new 4K video using an input video as a motion, appearance, or scene reference. Provide a reference video and a text prompt, then optionally add image references or element IDs for stronger visual guidance.
Why Choose This?
-
Video-reference generation
Use an input video as a reference for motion, appearance, subject behavior, or scene guidance. -
4K video output
Generate high-resolution 4K video for higher-quality delivery workflows. -
Prompt-guided control
Describe the new scene, subject behavior, camera movement, and visual treatment with text instructions. -
Image reference support
Add optional image references when extra subject, object, or style guidance is needed. -
Element reference support
Useelement_listto reference reusable Kling elements byelement_id. -
Original sound preservation
Keep the original audio from the reference video withkeep_original_sound.
Parameters
| Parameter | Required | Description |
|---|---|---|
| prompt | Yes | Describe the new scene, subject behavior, camera movement, and visual treatment. |
| video | Yes | Reference video used for motion, appearance, or scene guidance. |
| images | No | Optional reference images. Supports up to 4 image URLs. Combined official reference limits still apply. |
| keep_original_sound | No | Keep the original audio from the reference video. Default: true. |
| aspect_ratio | No | Output video aspect ratio: 16:9, 9:16, or 1:1. Default: 16:9. |
| duration | No | Generated video duration in seconds. Range: 3–15. Default: 5. |
| element_list | No | Element reference list. Supports up to 3 items. Each item uses an element_id returned by kwaivgi/kling-elements or kwaivgi/kling-elements-advanced. |
How to Use
- Write your prompt — Describe the target scene, subject behavior, camera movement, motion, and visual style.
- Upload a reference video — Provide the video used for motion, appearance, or scene guidance.
- Add image references optional — Use
imageswhen extra subject, object, or style reference is needed. - Add element references optional — Use
element_listwhen you want to guide generation with existing Kling element IDs. - Choose aspect ratio — Select
16:9,9:16, or1:1. - Set duration — Choose a generated video duration from
3to15seconds. - Configure sound optional — Keep
keep_original_soundenabled when the reference video’s audio should be preserved. - Submit — Generate the final 4K video-reference output.
Pricing
Pricing is based on generated video duration.
| Billing Unit | Price |
|---|---|
| Per second | $0.462 |
| Per 5 seconds | $2.31 |
Example Costs
| Duration | Price |
|---|---|
| 3 seconds | $1.386 |
| 5 seconds | $2.31 |
| 10 seconds | $4.62 |
| 15 seconds | $6.93 |
Best Use Cases
- Motion reference generation — Use a video to guide movement, pacing, gestures, or camera behavior.
- Character and action reference — Preserve useful action cues while generating a new scene from the prompt.
- Element-guided videos — Use existing Kling element IDs for stronger subject or object guidance.
- Product and commercial clips — Create high-resolution video variations guided by existing footage and references.
- Style and scene reference — Use reference video and images to guide visual traits, shot structure, or scene context.
- 4K creative delivery — Generate higher-resolution outputs for polished social, marketing, or presentation use.
Pro Tips
- Use a clear reference video with the motion, appearance, or scene cues you want to preserve.
- Keep the prompt focused on the new scene and how the reference video should guide it.
- Use image references when subject, object, or style consistency matters.
- Use
element_listwhen you already have reusable Kling element IDs. - Keep
element_listfocused; too many unrelated elements can reduce control. - Enable
keep_original_soundonly when the input video’s audio should be carried into the result. - Choose
9:16for vertical content,16:9for widescreen output, and1:1for square formats.
Notes
promptandvideoare required.imagessupports up to4reference images.element_listsupports up to3element references.- Each
element_listitem must include anelement_id. element_idshould come fromkwaivgi/kling-elementsorkwaivgi/kling-elements-advanced.durationmust be between3and15seconds.keep_original_sounddefaults totrue.
Related Models
Related Models
- Kling O3 Omni 4K Video Reference — Generate 4K videos using an input video as a reference.
- Kling O3 Omni 4K Video Edit — Edit an existing 4K video with prompt instructions.
- Kling Elements Advanced — Generate reusable Kling elements that can be used as
element_idreferences.
Authentication
For authentication details, please refer to the Authentication Guide.
API Endpoints
Submit Task & Query Result
set -euo pipefail
export WAVESPEED_API_KEY="your-api-key"
REQUEST_BODY=$(cat <<'JSON'
{
"prompt": "A cinematic ocean wave at sunrise, highly detailed",
"video": "https://interactive-examples.mdn.mozilla.net/media/cc0-videos/flower.mp4",
"keep_original_sound": true,
"aspect_ratio": "16:9",
"duration": 5
}
JSON
)
# 1. Submit the prediction.
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
-X POST "https://api.wavespeed.ai/api/v3/kwaivgi/kling-video-o3-4k/video-reference" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}" \
-H "Content-Type: application/json" \
-d "${REQUEST_BODY}")
TASK=$(printf '%s' "${SUBMIT_RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
PREDICTION_ID=$(printf '%s' "${TASK}" | jq -r '.id // empty')
if [ -z "${PREDICTION_ID}" ]; then
printf 'Submission response did not contain a prediction id
' >&2
exit 1
fi
RESULT_URL="https://api.wavespeed.ai/api/v3/predictions/${PREDICTION_ID}/result"
# 2. Poll until the prediction finishes.
while true; do
RESPONSE=$(curl --silent --show-error --fail-with-body \
"${RESULT_URL}" \
-H "Authorization: Bearer ${WAVESPEED_API_KEY}")
RESULT=$(printf '%s' "${RESPONSE}" | jq 'if type == "object" and has("data") then .data else . end')
STATUS=$(printf '%s' "${RESULT}" | jq -r '.status // empty')
case "${STATUS}" in
completed) printf '%s\n' "${RESULT}" | jq '.outputs'; break ;;
failed|cancelled|timeout|deleted) printf '%s\n' "${RESULT}" | jq . >&2; exit 1 ;;
*) sleep 2 ;;
esac
doneParameters
Task Submission Parameters
Request Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
| prompt | string | Yes | - | Describe the new scene, subject behavior, camera movement, and visual treatment. | |
| video | string | Yes | - | Reference video used for motion, appearance, or scene guidance. | |
| images | array<string> | No | - | 0 ~ 4 items | Optional reference images. The combined official reference limits still apply. |
| keep_original_sound | boolean | No | true | - | Keep the original audio from the reference video. |
| aspect_ratio | string | No | 16:9 | 16:9, 9:16, 1:1 | Output video aspect ratio. |
| duration | integer | No | 5 | 3 ~ 15 | Generated video duration in seconds. |
| element_list | array<object> | No | - | 0 ~ 3 items | Element reference list. |
Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data.id | string | Unique identifier for the prediction, Task Id |
| data.model | string | Model ID used for the prediction |
| data.outputs | array | Output values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed) |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Task status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses. |
| data.created_at | string | ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”) |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |
Result Request Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| id | string | Yes | - | Task ID |
Result Response Parameters
| Parameter | Type | Description |
|---|---|---|
| code | integer | HTTP status code (e.g., 200 for success) |
| message | string | Status message (e.g., “success”) |
| data | object | The prediction data object containing all details |
| data.id | string | Unique identifier for the prediction |
| data.model | string | Model ID used for the prediction |
| data.outputs | array<string | object> | Array of generated outputs (empty when status is not completed). Items are usually URL strings, but may be text strings or structured result objects, depending on the model. |
| data.urls | object | Object containing related API endpoints |
| data.status | string | Status: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses |
| data.created_at | string | ISO timestamp of when the request was created |
| data.error | string | Error message (empty if no error occurred) |
| data.timings | object | Object containing timing details |
| data.timings.inference | integer | Inference time in milliseconds |