Kling 4.0 Keyframe to Video API: Image-to-Video

Turn a first frame, middle keyframes and a last frame into a Kling 4.0 video. 3-30s, 720p/1080p. Pay per generation, no subscription. Kling 4.0 Keyframe-to-Video turns a first frame, up to 8 middle keyframes and a last frame into a 3-30 second clip at 720p/1080p, with each frame addressable in the prompt.

Interactive model controls

Kling 4.0 Keyframe-to-Video turns a first frame, up to 8 middle keyframes and a last frame into a 3-30 second clip at 720p/1080p, with each frame addressable in the prompt.

📝

Overview

About this model

Kling 4.0 Keyframe-to-Video generates a 3-30 second clip at 720p or 1080p from a first frame, up to 8 middle keyframes and a last frame. Mention the frames in your prompt with @first_frame, @keyframe_1 and @last_frame to describe how the scene moves between them. The output follows the first frame's aspect ratio. For character, voice and video references use Kling 4.0 Reference to Video.

1Storyboards: Turn a sequence of stills into one continuous clip.
2Transitions: Move from a start frame to an end frame with a described path.
3Product reveals: Control the opening and closing shot of an ad.
4Multi-shot stories: Chain locations with middle keyframes.
💰

Pricing & Value

Cost analysis

muapiapp$0.157 per second at 720p ($0.785 per 5s clip)

$0.157/s at 720p, $0.235/s at 1080p.

** Competitor pricing is estimated based on similar model architectures and usage tiers.

⚙️

Technical Details

Configuration schema

Promptstring

Video description (max 8000 chars). Mention frames with @first_frame, @keyframe_1, ..., @last_frame.

Default ValueThe girl in @first_frame walks out, passes the street in @keyframe_1, and arrives at the party in @last_frame
First Frame URLstring

First-frame image URL. Mention as @first_frame.

Default Value-
Keyframe URLsarray

Middle-frame image URLs in chronological order (up to 8, also limited by duration). Mention as @keyframe_1, @keyframe_2, ...

Default Valueundefined
Last Frame URLstring

Last-frame image URL. Mention as @last_frame.

Default Value-
Durationint

Video length in seconds (3-30).

Default Value5
ResolutionEnum (2 options)

Output resolution.

Default Value720p
Aspect RatioEnum (5 options)

Only used when no frame is provided; otherwise the output follows the first frame.

Default Value-
📖

Implementation Guide

Developer documentation

How to Use Kling 4.0 Keyframe to Video

  1. Provide frames: first_frame_url is required when you set keyframe_urls (up to 8, in order) or last_frame_url.

  2. Mention frames in the prompt: @first_frame, @keyframe_1, @keyframe_2, @last_frame.

  3. Mind the frame cap: total frames are limited by duration — 3s allows 4, 5s allows 6, 8s allows 9, and 9s or longer allows 10.

  4. Submit and collect the result: poll /api/v1/predictions/{request_id}/result or pass a webhook_url.

curl -X POST https://api.muapi.ai/api/v1/kling-4.0-keyframe-to-video \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{"prompt": "The girl in @first_frame walks out, passes the street in @keyframe_1, and arrives at the party in @last_frame", "first_frame_url": "https://example.com/first.png", "keyframe_urls": ["https://example.com/street.png"], "last_frame_url": "https://example.com/party.png", "duration": 10, "resolution": "720p"}'
❓

Common Questions

Frequently asked

How many frames can I use?

A first frame, up to 8 middle keyframes and a last frame, capped by duration: 3s allows 4 frames in total, 5s allows 6, 8s allows 9, and 9s or longer allows 10.

Is the first frame required?

Yes, whenever keyframe_urls or last_frame_url is set.

What aspect ratio does the output use?

It follows the first frame. aspect_ratio only applies when no frame is provided.

How is pricing calculated?

Per second of output video: $0.157/s at 720p and $0.235/s at 1080p. With reference videos or video elements the rate is $0.094/s (720p) or $0.141/s (1080p), billed on the reference-video seconds plus the output seconds, with a minimum of 2x the output length.

How do I get the result?

The endpoint is asynchronous. Poll /api/v1/predictions/{request_id}/result or pass a webhook_url to be notified when the video is ready.