PopNowAPI
Get API key

by Kuaishou

Up to 30-second 1080p clips with keyframes, edits and extensions; may queue when busy

kling/4.0/video-edit
  • Up to 1080p
  • 3–30s clips
  • Sound included
  • Start and end frames
  • Up to 10 reference images
  • 4 aspect ratios
  • Create Video
  • Image to Video
  • Reference to Video
  • Extend Video
  • Edit Video

About Kling 4.0

Supply video_url and a prompt explaining the visual revision. The source should be 3 to 30 seconds. Up to ten reference images can guide objects, settings or style, with @Image1 tokens matching their order.

Call it with the model name kling/4.0/video-edit on POST /jobs/createTask, from $0.564.

Introduction

Kling 4.0 Video edit changes a video you already have instead of making one from nothing. Upload a clip of 3 to 30 seconds and write what should change: a subject, the setting, the weather, the time of day or the style. The scene, the subject and the motion stay as they were filmed. You can add up to 10 reference images to bring in a person, an object or a look. Results come back at 720p or 1080p with sound.

Choose a Kling 4.0 mode by starting material

What you have at the startMode
a written scene or scriptKling 4.0 Text to video
an opening frame, and optionally a closing frame and in-between framesKling 4.0 Image to video
photos, clips or voice samples to cast fromKling 4.0 Reference to video
a clip you want to changeKling 4.0 Video edit (you are here)
a clip you want to continueKling 4.0 Video extend

Key features

Keeps the scene and the motion

The model follows your source clip, so the camera move, the pose and the timing carry over. In our test a man leaning on a vintage convertible at a desert gas station was turned into a heavy snowfall: snow settled on the hood and the canopy, and his pose, the road map, the car and the slow dolly move all matched the source.

Refer to your uploads in the prompt

Call the clip @Video1 and the reference images @Image1, @Image2 and so on, in the order you uploaded them. Say which one is which, then say what to change.

Sound can stay or be new

keep_original_audio is on by default and keeps the source clip's own sound. Turn it off and the model generates new, synchronized audio instead.

Length follows the source, or you set it

Leave the length on Match source and the result runs as long as your clip, rounded up to a whole second. Or pick any whole number from 3 to 30 seconds.

Request parameters

ParameterRequiredDescription
aspect_ratioNoThe shape of the frame: wide, square or tall. auto · 16:9 · 9:16 · 1:1 · 21:9 · Default: auto
duration_secondsNoHow long the clip runs. You pay per second. -1–30 · Default: -1
keep_original_audioNoKeep the source clip's own sound. Turn it off to generate new synchronized audio instead. Default: true
promptYesDescribe the edit: change a subject, the setting, the weather or the style. Refer to the video as @Video1 and to reference images as @Image1, @Image2, numbered in upload order.
reference_image_urlsNoPictures of the people, outfits or places the result should keep.
resolutionNoOutput size. Bigger sizes look sharper and cost more. 720p · 1080p · Default: 720p
video_urlYesThe clip to work on.

Pricing

Prices are in USD. The API uses a separate USD balance. Website credits cannot be used or transferred to it, and API funds cannot be transferred to website credits. When a task is accepted, we reserve the maximum quoted amount from your API balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

OptionUSD per second
resolution 720p$0.1128
resolution 1080p$0.1692

Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.

Use cases

Change the weather or the time of day

Keep a shot you already like and turn a sunny afternoon into snow, rain or dusk without filming it again.

Swap the setting or the style

Move the same performance into a different place, or restyle a clip while the movement stays put.

Bring in a person or an object

Add reference images when the edit needs something the source never showed, such as a specific jacket, a car or a character.

Prompt guide & pro tips

Say what must stay the same

Name the parts to protect: "keep the man, his movements and the camera move as they are". Then describe the change. This keeps the model from redoing more than you intended.

Expect a slightly longer clip on Match source

With the length on Match source, the result is the source length rounded up to a whole second, and the model carries the motion on for that last fraction. A 5.04 second source came back as a 6.04 second clip in our test. The source's own sound ends a moment before the picture.

Use references only for what is new

Reference images are for something the clip does not already contain. For a change like weather or time of day, the prompt alone is usually enough.

Match the 1080p choice to the job

Draft at 720p to check the change, then render at 1080p once the result is right.

API quick start

Call the Kling 4.0 API in three steps

  1. Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow-. API calls use your separate USD balance.
  2. Send the request. POST /jobs/createTask with model kling/4.0/video-edit and an input object that follows the parameter table. The response returns a task ID straight away.
  3. Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "model": "kling/4.0/video-edit",
  "input": {
    "prompt": "A slow aerial shot drifting over a misty pine forest at sunrise",
    "video_url": "https://media.popnow.ai/effects/flower-bloom-1abd6efb.mp4",
    "aspect_ratio": "auto",
    "resolution": "720p",
    "duration_seconds": -1
  }
}'

# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.

About the Kling 4.0 Edit Video endpoint

duration_seconds -1 matches the source length; a positive value chooses an output length from 3 to 30 seconds. aspect_ratio auto follows the source, and keep_original_audio defaults to true.

Both source and output duration can enter the cost calculation. Quote the selected input and duration rather than treating the per-second output rate as the full bill. Keep the original clip available for comparing the revised result.

Kling 4.0 API questions

How much does the Kling 4.0 API cost?

Kling 4.0 starts at $0.564 for a 5-second clip with Edit Video, its cheapest task. Prices by option: 720p $0.1128 per second, 1080p $0.1692 per second. The API uses a separate USD balance. Website credits cannot be used or transferred to it, and API funds cannot be transferred to website credits. When a task is accepted, we reserve the maximum quoted amount from your API balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

What are the limits of the Kling 4.0 · Edit Video API?

Clip length: 3–30 s; Resolutions: 720p · 1080p; Aspect ratios: auto · 16:9 · 9:16 · 1:1 · 21:9; Reference images: 10; Largest upload: 10 MB. Requests outside these limits are rejected before anything is charged.

More about Kling 4.0