videostringrequired
Video to edit (3-20s, min 700x700 px, up to 300 MB). The output keeps its length.
kwaivgi/kling-video/v4/flash/video-editKling V4 Flash Video Edit by Kuaishou edits a 3-20 second source video into a 720p result from a text instruction and optional reference images.
Try the model
PNG, JPEG, WebP, or GIF · 20 MiB maximum each · up to 10
What would you like to do next?
Select an example to load its inputs and result into the playground.
{
"images": [
"https://static.sandbase.ai/examples/e72b57c8-1fef-4fc5-93f8-0473dd8fb581/input/b6aa6d28-155c-42b5-b034-064ed3222127.png",
"https://static.sandbase.ai/examples/e72b57c8-1fef-4fc5-93f8-0473dd8fb581/input/cc34d877-819c-4495-a496-625cee4cc554.png"
],
"prompt": "The blocky car proxy is the KESSEL R4 rally car from @Image1 - chalk-white body with the diagonal signal-orange and charcoal band, black 27 on a white roundel on the doors, slim LED headlamps joined by a light bar, roof scoop, rear wing, red mudflaps, white six-spoke gravel wheels. The grey road ribbon is the loose ochre-grey gravel stage and the cones and cylinders are the pine and birch forest of @Image2, on a crisp autumn morning with low sun raking through the trees and hanging dust. The mannequin proxies behind the rope are rally spectators in muted outdoor jackets and beanies behind red-and-white tape. Keep the exact blocking, timing, camera position and pan of the playblast. Physically real gravel rally: the car slides through the hairpin with opposite lock, rear wheels throwing a thick fan of gravel and a rolling dust cloud that drifts across the spectators; stones rattle off the bank; the suspension works over the ruts; spectators flinch, cheer and raise phones. Sound: a turbocharged four-cylinder rally engine on anti-lag with pops and bangs, gravel spray, crowd cheering. No text other than the number 27, no sponsor logos.",
"video": "https://static.sandbase.ai/examples/e72b57c8-1fef-4fc5-93f8-0473dd8fb581/input/4494b4bf-ff4e-4cc8-ac0d-9895bf65742e.mp4"
}{
"prompt": "Turn the scene in @Video1 into a snowy winter night with falling snowflakes and warm street lamps, keep the paper boat and the camera motion.",
"video": "https://static.sandbase.ai/examples/10c551a4-b8e2-42db-9f69-23eeefe474a4/input/5aeb6a40-0bad-4b5d-b97b-5a031ae1721f.mp4"
}Kling V4 Flash video edit changes a 3–20 second source video from a text instruction, with optional reference images. The 720p output keeps the source length.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Edit instruction. Refer to the source as @Video1 and images as @Image1, … |
video | video URL, required | — | 3–20s, min 700×700 px, up to 300 MB. |
images | image URL[] | — | Up to 10 reference images. |
$0.063 per second, counted on input plus output (2× the source length). Settlement uses the output length (it matches the source); the quote before submission assumes a 20 second source when the length cannot be read.
| Source | Price |
|---|---|
| 5s | $0.63 |
| 10s | $1.26 |
| 20s | $2.52 |
| Failed runs are not charged. |
Other Kling V4 Flash endpoints: kwaivgi/kling-video/v4/flash/text-to-video, kwaivgi/kling-video/v4/flash/image-to-video, kwaivgi/kling-video/v4/flash/reference-to-video, kwaivgi/kling-video/v4/flash/video-edit. For 1080p or clips up to 30 seconds, use Kling V4 (kwaivgi/kling-video/v4/text-to-video and its siblings).
Start building
Submit this model through the SandBase Unified Run API.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "kwaivgi/kling-video/v4/flash/video-edit",
"prompt": "Change the background to a tropical island at sunset."
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"Create a SandBase API key and set it in your server environment. All requests use Bearer authentication.
export SANDBASE_API_KEY="YOUR_API_KEY"Keep the key on your server. Do not expose it in browser code or commit it to a repository.
POST to /v1/run with this model ID and its inputs. The request example above includes submission and polling.
Use the returned run ID to poll until the status is completed, failed or timeout. Read output only after completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Pass a publicly accessible file URL in the model’s image, video or audio field. Supported formats and limits are shown beside each Playground input.
Use the upload or replace control on supported image fields in the Playground. Video URL fields accept a hosted driving video; they do not imply video-upload support.
videostringrequiredVideo to edit (3-20s, min 700x700 px, up to 300 MB). The output keeps its length.
imagesarrayOptional reference images, referenced as @Image1, @Image2, ...
promptstringrequiredEdit instruction. Refer to the source video as @Video1 and reference images as @Image1, @Image2, ...
{
"model": "kwaivgi/kling-video/v4/flash/video-edit",
"prompt": "Change the background to a tropical island at sunset."
}A completed run exposes its result in output. The following is the model’s saved example, not a new generation.
[
{
"url": "https://static.sandbase.ai/examples/e72b57c8-1fef-4fc5-93f8-0473dd8fb581/output/1b1033c7-a1e4-4051-82c4-f2cf9522e9d0.mp4"
}
]