From the source
Replicate's guide walks through Kling 4.0, the new version of Kuaishou's video model, and how to direct a shot with it on Replicate and
Cloudflare AI Gateway.
- The model generates clips of 3 to 30 seconds at 720p or 1080p, in 16:9, 9:16, 1:1 and a new ultra-wide 21:9, with prompts up to 26,000 characters.
- The guide's headline change is keyframing: instead of a start and an end image, users can supply a start image, middle images and an end image, up to 10 in total, and the video passes through each in order in one continuous shot.
- On Replicate those inputs are start_image, middle_images and end_image; on AI Gateway they are first_frame, middle_frames and last_frame, and the model is called kwaivgi/kling-v4.0 and klingai/kling-v4 respectively.
- With keyframes the output takes the shape of the images, so aspect_ratio is ignored.
- Requests through AI Gateway can use logging, caching and rate limiting, and Cloudflare handles Kling credentials and bills usage per output second through Unified Billing, so no Kling API key is needed.
- The guide says a 10-second 1080p clip takes a few minutes to generate, and advises leading with the camera, naming keyframes in the prompt, and asking for one continuous shot.


