Kling 4.0

Kling AI · Video Generation
POST /v1/videos/generationsMakes 3 to 30 second clips at 720p or 1080p with native audio from text, first, middle and last frames, reference images and videos, or a video to edit.
At a glance
Pricing
Example request
Parameters
Notes
Generates 3 to 30 second clips at 24 fps in 720p or 1080p, each with a native stereo audio track.
Inputs
- Text to video: prompt only.
- Keyframes: a first frame (
image), middle frames (middle_images) and a last frame (image_end). The video follows the first frame’s aspect ratio. - Reference images (
reference_images): characters, objects, scenes or style to use. - Reference videos (
reference_videos): motion, camera work or style to follow, 3 to 30 seconds each. - Video edit (
video): a video to edit, 3 to 30 seconds. The result keeps its length and aspect ratio. - Up to 10 images and 5 videos per request. In the prompt, refer to images as @image_1, @image_2 (first frame, middle frames, last frame, then references) and to videos as @video_1, @video_2 (the video to edit first).
In the Playground
One attached image is the first frame, two are the first and last frames, and three or more are references. The first attached video is the one edited; any others are references.
Media limits
- Images: JPG or PNG, at least 300 px, aspect ratio between 2:5 and 5:2, up to 30 MB.
- Videos: MP4 or MOV, 3 to 30 seconds, 700 to 4553 px per side, up to 300 MB.
Billing
- Without a video input: billed per second of the generated clip at the resolution you request.
- With a video input (a video to edit or a reference video): billed at the video input rate on twice the length of the generated clip, or on the input plus the output when the input is longer.
Machine-readable schema: GET https://api.empiriolabs.ai/v1/models/kling-4-0.
