Kling 4.0 Video Editing API

kling-video/v4/video-to-video/edit
Kling 4.0 video editing changes expressions, motion, style or backgrounds of a 3–30 second clip from an instruction, keeping the rest of the scene stable.
Output
$0.188 / sec (variable)
Released
Oct 15, 2026

Overview

What is Kling 4.0 Video Editing API?

Kling 4.0 video editing changes expressions, motion, style or backgrounds of a 3–30 second clip from an instruction, keeping the rest of the scene stable. It is part of Kling AI's new-generation Kling 4.0 video model family and is available on AI/ML API through the video generation endpoint.

Technical specifications

  • Supported inputs: source video (3–30 s), edit instruction, optional reference images and elements
  • Output: edited video of the same length
  • Resolution: 720p or 1080p
  • Model ID: kling-video/v4/video-to-video/edit
  • Release date: October 15, 2026

Kling 4.0 Video Editing API pricing

  • 720p: $0.188 / sec
  • 1080p: $0.282 / sec

Where to use Kling 4.0 Video Editing

Background and style changes
Swap locations, lighting or visual style without reshooting.

Performance tweaks
Adjust expressions or motion while keeping the rest of the shot intact.

Object and character insertion
Add products or characters from reference images into existing footage.

Use cases

Kling 4.0 Video Editing changes an existing 3–30 second clip from a text instruction, while keeping the rest of the scene stable.

It fits background swaps, restyling and lighting changes without reshooting footage.

Expressions and motion can be adjusted, which suits fixing or refining a performance in post-production.

Reference images and elements let you insert specific products or characters into the source video.

How to use Kling 4.0 Video Editing API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to kling-video/v4/video-to-video/edit.
import requests, time

headers = {"Authorization": "Bearer " + AIMLAPI_KEY}
job = requests.post(
    "https://api.aimlapi.com/v2/video/generations",
    headers=headers,
    json={
      "model": "kling-video/v4/video-to-video/edit",
      "prompt": "Change the background of @Video1 to a snowy forest",
      "video_url": "https://example.com/input.mp4",
      "resolution": "1080p"
    },
).json()
gid = job["id"]

while True:
    res = requests.get(f"https://api.aimlapi.com/v2/video/generations?generation_id={gid}", headers=headers).json()
    if res.get("status") in ("completed", "error"):
        break
    time.sleep(15)
print(res["video"]["url"])
const headers = {
  Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
  "Content-Type": "application/json",
};
const job = await (await fetch("https://api.aimlapi.com/v2/video/generations", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "model": "kling-video/v4/video-to-video/edit",
    "prompt": "Change the background of @Video1 to a snowy forest",
    "video_url": "https://example.com/input.mp4",
    "resolution": "1080p"
  }),
})).json();

let res;
do {
  await new Promise((r) => setTimeout(r, 15000));
  res = await (await fetch(`https://api.aimlapi.com/v2/video/generations?generation_id=${job.id}`, { headers })).json();
} while (!["completed", "error"].includes(res.status));
console.log(res.video.url);
# submit the generation — the response contains the job "id"
curl -X POST https://api.aimlapi.com/v2/video/generations \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "kling-video/v4/video-to-video/edit", "prompt": "Change the background of @Video1 to a snowy forest", "video_url": "https://example.com/input.mp4", "resolution": "1080p"}'

# then poll until status is "completed" — video.url holds the result
curl "https://api.aimlapi.com/v2/video/generations?generation_id={id}" -H "Authorization: Bearer $AIMLAPI_KEY"

OpenAI-compatible — swap the base URL and it works with your existing SDK.

Kling 4.0 Video Editing API Pricing

TypePrice
Output
$0.188 / sec (variable)

Billed per second of video: 720p — $0.188 / sec, 1080p — $0.282 / sec. Clips from 3 to 30 seconds.

Kling 4.0 Video Editing vs other models

ModelInputOutputContextBest for
$0.188 / sec (variable)
Video generation
$0.2 / sec (variable)
Video generation
$1.95 / 1M tokens
$0.10136 / sec
Video generation
$0.0711 / sec
Cinematic video + native audio

Frequently asked questions

Kling 4.0 Video Editing changes the expressions, motion, style or background of an existing 3–30 second clip from a text instruction, while keeping the rest of the scene stable.

It takes a source video (video_url) and an edit instruction, plus optional reference images and elements, and returns the edited video. The edited video keeps the length of the source.

Source videos must be 3–30 seconds long, up to 300MB, 700–4553px per side, with an aspect ratio between 0.4 and 2.5 and 24–60 fps.

Kling 4.0 Video Editing is billed per second of video: $0.188 per second at 720p and $0.282 per second at 1080p.

Refer to the source video as @Video1, to reference images as @Image1, @Image2 and to elements as @Element1, @Element2. For example: Change the background of @Video1 to a snowy forest.

Submit a POST request to https://api.aimlapi.com/v2/video/generations with the model ID klingai/video-v4-video-to-video-edit, a video_url and a prompt, then poll with the returned generation_id until the status is completed.

Start building with Kling 4.0 Video Editing

Get API Key
1000+ models, one API.