Skip to main content
Kuaishou’s Kling 4.0 generates realistic 3–30-second shots with stable fast motion, tracking, and orbiting cameras. Keyframe mode accepts up to 10 frames, including first, last, and intermediate frames anywhere on the timeline. Combine up to 15 images, videos, elements, and voices to reproduce appearance, motion, camera work, and pacing, or edit expressions, actions, and backgrounds in an existing clip. It generates synchronized stereo sound with multilingual lip sync, accepts prompts up to 8,000 tokens, and outputs 720p or 1080p with support for 21:9 ultrawide framing for ads, short films, drama, and e-commerce.

Model parameters

The following video API parameters are not supported:
  • negative_prompt
  • size
  • quality
  • fps
Kling 4.0 supports these aspect ratios (aspect_ratio):
  • 16:9: landscape
  • 9:16: portrait
  • 1:1: square
  • 21:9: ultrawide
  • adaptive: choose the ratio automatically from the prompt.
Do not pass aspect_ratio for image-to-video.
Kling 4.0 supports a duration of 3–30 seconds. Set action to the type of task, corresponding to Kling’s text, image, and reference endpoints. An empty or incorrect value returns an error. Kling 4.0 supports:
  • text-to-video: text to video
  • image-to-video: image to video using a first frame, first and last frames, or first, intermediate, and last frames
  • omni-video: reference generation using up to 10 images, five videos, three voices, and seven elements, with no more than 15 assets in total
Kling 4.0 accepts resolution values of 720p and 1080p (default: 720p).

Pricing

Kling 4.0 pricing depends on resolution and duration: Reference video duration counts toward billing as follows:
  • Input no longer than output: billable duration = output duration × 2.
  • Input longer than output: billable duration = input duration + output duration.
For example, a 5-second 720p video without a reference is billed for 5 seconds at 5 x 1.0 = 5 CNY. With a 3-second reference, the billable duration is 5 x 2 = 10 seconds and the charge is 10 x 0.6 = 6 CNY. For discounted GeekAI channels, multiply the listed price by the channel’s discount multiplier.

Text to video

Describe the video in text:
The JSON response includes a task ID. Poll the video result endpoint until the status is succeed. The response then includes the video URL:

Image to video

First frame Pass one image in image to generate a video starting from that frame:
First and last frames Pass the first and last frame images in image and image_tail:
To add intermediate frames as in the official API, pass an array in images. Images can be URLs or Base64 data and must meet these requirements:
  • JPG, JPEG, or PNG
  • Maximum file size: 30 MB per image
  • Both dimensions at least 300 px; aspect ratio between 2:5 and 5:2
  • No more than 10 images

Reference to video

Kling 4.0 accepts up to 15 reference assets in total: at most 10 images, five videos, three voices, and seven elements. Reference images Pass one or more reference images in images:
You can pass images together with first and last frames in image and image_tail. Multimodal references Supply reference images, video, and audio together:
GeekAI distinguishes reference videos from videos to edit, corresponding to the official base_video and feature_video. Pass reference videos in videos (type feature_video), or one video to edit in video (type base_video).
As with Seedance and MiniMax, pass one or more custom audio URLs in audio. GeekAI calls the voice management API to convert them into voice IDs. Refer to the clips in your prompt as @Audio1, @Audio2, and so on. You can supply custom reference elements similarly; see the Kling 3.0 documentation. Alternatively, create voices and elements through their management APIs. Pass their IDs in extra_body.voice_list and extra_body.element_list and refer to them in the prompt:
For creation and retrieval, see Voice management and Element management.

Video editing

Pass the source video in video to edit it according to your prompt:

Voice management

Create a custom voice with the voice management API:
Voice creation is asynchronous. Poll the voice result endpoint after submitting the task:
When task_status is succeed, retrieve the custom voice ID from task_result.voices[0].voice_id and use it in subsequent tasks such as reference-based generation:

Element management

Create a custom element with the element management API:
Pass the front view in image, other reference images in images, and reference videos in the videos array. These fields differ from the official parameter format.
Element creation is asynchronous. Poll the element result endpoint after submitting the task:
When task_status is succeed, retrieve the element ID from task_result.elements[0].element_id and use it in a video request: