Kwaivgi Kling Video O3 4k Video Edit API Documentation

Kwaivgi Kling Video O3 4k Video Edit API Documentation

Playground

Try it on WaveSpeedAI!

Kling O3 Omni 4K Video Edit edits input videos in 4K with natural-language instructions and optional image references, supporting prompt-guided video modification, visual style updates, scene refinements, motion control, and high-quality cinematic editing. Ready-to-use REST inference API, best performance, no coldstarts, affordable pricing.

Features

Kling O3 Omni 4K Video Edit edits an existing video in 4K using natural-language instructions. Provide an input video and describe the changes you want to apply, then optionally add image references or Kling element IDs to guide subject, object, scene, or style edits.


Why Choose This?

  • Prompt-guided video editing
    Describe the desired changes in natural language instead of building a manual editing pipeline.

  • Context-aware video edits
    Use the input video as the base context while applying subject, object, scene, or style changes.

  • 4K video output
    Generate high-resolution edited videos for polished delivery workflows.

  • Image reference support
    Add optional image references to guide replacement objects, scene details, or visual style.

  • Element reference support
    Use element_list to reference reusable Kling elements by element_id.

  • Original sound preservation
    Keep the original input audio with keep_original_sound.


Parameters

ParameterRequiredDescription
promptYesDescribe the changes to apply to the input video.
videoYesInput video to edit.
imagesNoOptional images that guide an element, scene, or style edit. Supports up to 4 image URLs.
keep_original_soundNoKeep the original audio from the input video. Default: true.
element_listNoElement 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

  1. Upload the input video — Provide the video you want to edit.
  2. Write your edit prompt — Describe what should change and what should remain consistent.
  3. Add image references optional — Use images when replacement objects, scene details, or style references are needed.
  4. Add element references optional — Use element_list when you want to guide the edit with existing Kling element IDs.
  5. Configure sound optional — Keep keep_original_sound enabled when the original video audio should be preserved.
  6. Submit — Generate the final 4K edited video.

Pricing

Pricing is based on input video duration.

Input duration is rounded up to the next whole second, with a minimum billed duration of 3 seconds and a maximum billed duration of 16 seconds.

Billing UnitPrice
Per second$0.462
Per 5 seconds$2.31

Example Costs

Billed DurationCost
3 seconds$1.386
5 seconds$2.31
10 seconds$4.62
16 seconds$7.392

images, element_list, prompt, and keep_original_sound do not add separate charges in the current pricing formula.


Best Use Cases

  • Video restyling — Change the visual style, tone, lighting, or atmosphere of an existing clip.
  • Subject and object edits — Modify characters, products, props, or scene elements while preserving video context.
  • Element-guided editing — Use existing Kling element IDs for stronger subject or object guidance.
  • Commercial video edits — Refine product clips, ads, campaign assets, and social media videos.
  • 4K creative delivery — Produce high-resolution edited videos for polished output.
  • Reference-guided transformations — Combine prompt instructions, image references, and element IDs for more controlled edits.

Pro Tips

  • Keep edit prompts focused on the specific change you want.
  • Describe what should remain unchanged, especially subject motion, camera movement, background, or lighting.
  • Use image references when subject, object, or style consistency matters.
  • Use element_list when you already have reusable Kling element IDs.
  • Keep element_list focused; too many unrelated elements can reduce edit control.
  • Enable keep_original_sound when the input video’s audio should be retained.
  • Use clean source videos with clear subjects and stable motion for better edit results.

Notes

  • prompt and video are required.
  • images supports up to 4 reference images.
  • element_list supports up to 3 element references.
  • Each element_list item must include an element_id.
  • element_id should come from kwaivgi/kling-elements or kwaivgi/kling-elements-advanced.
  • Input duration is billed from 3 to 16 seconds.
  • Edit mode uses the input video as the base context, and output duration follows the input video.
  • Native generated audio is unavailable with a base video, but original input audio can be retained.

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
}
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-edit" \
  -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
done

Parameters

Task Submission Parameters

Request Parameters

ParameterTypeRequiredDefaultRangeDescription
promptstringYes-Describe the changes to apply to the input video.
videostringYes-Input video to edit.
imagesarray<string>No-0 ~ 4 itemsOptional images that guide an element, scene, or style edit.
keep_original_soundbooleanNotrue-Keep the original audio from the input video.
element_listarray<object>No-0 ~ 3 itemsElement reference list.

Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
data.idstringUnique identifier for the prediction, Task Id
data.modelstringModel ID used for the prediction
data.outputsarrayOutput values, usually URL strings; some models return text strings or structured result objects (empty when status is not completed)
data.urlsobjectObject containing related API endpoints
data.statusstringTask status. completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses.
data.created_atstringISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”)
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds

Result Request Parameters

ParameterTypeRequiredDefaultDescription
idstringYes-Task ID

Result Response Parameters

ParameterTypeDescription
codeintegerHTTP status code (e.g., 200 for success)
messagestringStatus message (e.g., “success”)
dataobjectThe prediction data object containing all details
data.idstringUnique identifier for the prediction
data.modelstringModel ID used for the prediction
data.outputsarray<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.urlsobjectObject containing related API endpoints
data.statusstringStatus: completed is successful; failed, cancelled, timeout, and deleted are failure terminal statuses
data.created_atstringISO timestamp of when the request was created
data.errorstringError message (empty if no error occurred)
data.timingsobjectObject containing timing details
data.timings.inferenceintegerInference time in milliseconds
© 2026 WaveSpeedAI. All rights reserved.