
Kling Video 4.0 Video-Edit API by Kuaishou
Kling 4.0 video editing: restyle, replace or add content in an existing clip using text plus optional reference images, videos, subjects and voices.
Kling Video 4.0 Video-Edit is developed by Kuaishou. Atlas Cloud (operated by Atlas Cloud AI LLC) provides access to it and does not own it. All trademarks belong to their respective owners.
Kling Video 4.0 Video-Edit
Kling Video 4.0 Video-Edit makes localized edits and style changes to an existing clip from a text instruction — swap a background, change the weather, restyle the whole shot — optionally guided by reference images, videos, subjects and voices.
Why Choose This?
- Precise local edits. Change what you ask for and keep the rest of the clip.
- Style adjustments. Restyle the full video while keeping subject and camera motion.
- Reference-guided. Bring in a product, a character or a look from references.
Parameters
| Parameter | Required | Description |
|---|---|---|
| model | Yes | kwaivgi/kling-v4.0/video-edit |
| prompt | Yes | Editing instruction. The video to edit is @video_1; other inputs are @image_N, @video_2…, @element_N, @voice_N. |
| video | Yes | Video to edit. MP4 / MOV, max 300MB, 3–30s, 700–4553px. |
| reference_images | No | Reference images (URLs or Base64). |
| reference_videos | No | Feature reference videos, up to 4. |
| elements | No | Subjects created for this request from images or a video clip (see Notes). |
| voice_ids | No | Kling voice IDs, up to 3. |
| duration | No | Output length in seconds, integer 3–30. Default 5. |
| resolution | No | Native 720p or 1080p (default); Tencent ESR 1080p-esr, 2k-esr, or 4k-esr. |
How to Use
curl -X POST "https://api.atlascloud.ai/api/v1/model/generateVideo" \ -H "Authorization: Bearer $AIP_API_KEY" \ -H "Content-Type: application/json" \ --data-raw '{ "model": "kwaivgi/kling-v4.0/video-edit", "prompt": "Turn the scene into a snowy winter evening while keeping the subject and camera motion of @video_1 unchanged.", "video": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/animals-video-5s.mp4", "duration": 5, "resolution": "1080p" }'
Generation is asynchronous. The response contains a request id; poll GET https://api.atlascloud.ai/api/v1/model/prediction/{id} until status is completed, then read the video URL from outputs.
Notes
- Preview. Kling 4.0 is in early access upstream; pricing and limits follow Kling's preview terms and may change.
- The Kling 4.0 API has no audio on/off or
multi_shotparameter; describe sound and shot structure in the prompt. durationmust be an integer from 3 to 30. Supported resolutions are720p,1080p,1080p-esr,2k-esr, and4k-esr.- ESR choices generate a Kling source video, then enhance it with Tencent ESR:
1080p-esruses a native 720p source;2k-esrand4k-esruse a native 1080p source. These are enhanced outputs. 2k-esrtargets 1440p (2560×1440 at 16:9);4k-esrtargets 2160p (3840×2160 at 16:9). The source aspect ratio and frame rate are preserved; portrait outputs use the corresponding short-edge target.- ESR pricing adds an enhancement charge for output seconds to the source-generation price. Video-input billing still applies to source generation; the enhancement charge is not multiplied by input-video duration. ESR requires an additional processing stage, so completion can take longer than native generation.
- The output video is transferred to AtlasCloud storage before it is returned.
- Subjects (
elements): describe each subject in the request withelement_name(and an optionalelement_description) plusreference_type—image_refer:frontal_image+ 1–3refer_images;video_refer: one 3–8srefer_videosclip of a real person. The subjects are created first and the video is generated right after, in the same request; this adds a short wait before generation starts. - Subjects are created anew for every request and are not saved: no subject ID is returned, and there is no
element_idto reuse. To keep a character consistent across generations, send the same subject images or clip again. - Limits per request: up to 10 images (keyframes + reference images), 5 videos (3–30s in total), 7 subjects (at most 3 video character subjects), 3 voices, and 15 items in total.
- Set
durationto the length you want back; it is billed as the output duration.
Related Models
- Kling Video 4.0 Text-to-Video: generate from text only.
- Kling Video 4.0 Image-to-Video: animate from first, middle and last keyframes.
- Kling Video 4.0 Reference-to-Video: combine reference images, videos, subjects and voices.


















