Kling v2.6 Motion Control
Kling v2.6 Motion Control transfers full-body motion from a 3-30 second reference clip to a generated scene, capturing gestures, facial expressions, lip-sync, and camera movement with frame-accurate fidelity.
View API reference- Price
- $0.07, Per secondLowest available configuration
import { experimental_generateVideo as generateVideo } from 'ai';
const result = await generateVideo({ model: 'klingai/kling-v2.6-motion-control', prompt: 'A serene mountain lake at sunrise.'});Copy link to headingPlayground
Try out Kling v2.6 Motion Control by Kling AI. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.
Your generated video will appear here.
Copy link to headingProviders
Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.
| Provider |
|---|
Getting started
Generate videos with Kling v2.6 Motion Control using the experimental_generateVideo function from AI SDK 6 or later. AI Gateway handles routing and polls until the video is ready.
Install the AI SDK (pnpm add ai dotenv), create an API key from the API Keys page, and set it as AI_GATEWAY_API_KEY in your environment. Full setup is covered in the video generation quickstart.
import { experimental_generateVideo as generateVideo } from 'ai';import fs from 'node:fs';import 'dotenv/config';
async function main() { const result = await generateVideo({ model: 'klingai/kling-v2.6-motion-control', prompt: { image: fs.readFileSync('./character.png'), }, providerOptions: { klingai: { videoUrl: 'https://example.com/dance-reference.mp4', characterOrientation: 'video', mode: 'std', }, }, });
// Save the generated video fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');}
main().catch(console.error);Top-level parameters
Exercise the supported top-level parameters: prompt.image, prompt.text, aspectRatio, resolution, and duration.
import { experimental_generateVideo as generateVideo } from 'ai';import fs from 'node:fs';import 'dotenv/config';
async function main() { const result = await generateVideo({ model: 'klingai/kling-v2.6-motion-control', prompt: { image: fs.readFileSync('./character.png'), text: 'The character walks forward through a serene mountain landscape', }, aspectRatio: '16:9', resolution: '720p', duration: 5, });
// Save the generated video fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');}
main().catch(console.error);| Parameter | Type | Required | Description |
|---|---|---|---|
prompt.image | string | Yes | URL of the image to animate. |
prompt.text | string | No | Description of the motion or animation. Max 2500 characters. |
duration | number | No | Video length in seconds. 3-30 seconds. |
resolution | string | No | Resolution ('1280x720', '1920x1080'). |
aspectRatio | string | No | Aspect ratio ('16:9', '9:16', '1:1'). |
Input limits
| Input | Formats | Sources | Max count | Max size | Limits |
|---|---|---|---|---|---|
| Text | — | — | — | — | Up to 2500 characters |
| Image | jpg, jpeg, png | url, base64, buffer | 1 | 10 MB | ≥300px · aspect 2:5–5:2 |
| Video | mp4, mov | url | 1 | 100 MB | 3-30s · ≥340px · ≤3850px |
Provider options
Load the required KlingAI motion-control options under providerOptions.klingai: videoUrl, characterOrientation, and mode.
import { experimental_generateVideo as generateVideo } from 'ai';import fs from 'node:fs';import 'dotenv/config';
async function main() { const result = await generateVideo({ model: 'klingai/kling-v2.6-motion-control', prompt: { image: fs.readFileSync('./character.png'), text: 'The character performs the motion from the reference clip', }, providerOptions: { klingai: { videoUrl: 'https://example.com/dance-reference.mp4', characterOrientation: 'video', mode: 'pro', keepOriginalSound: 'yes', watermarkEnabled: true, pollIntervalMs: 5000, pollTimeoutMs: 600000, }, }, });
// Save the generated video fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');}
main().catch(console.error);Pass KlingAI-specific options under providerOptions.klingai in your generateVideo call.
| Parameter | Type | Required | Description |
|---|---|---|---|
videoUrl | string | Yes | URL of the reference motion video — see the Input limits table for supported formats, size, and dimensions. Max duration depends on characterOrientation. |
characterOrientation | 'image' | 'video' | Yes | 'image' matches the character image orientation (max 10s output). 'video' matches the reference video orientation (max 30s output). |
mode | 'std' | 'pro' | Yes | 'std' for standard quality. 'pro' for professional quality. |
keepOriginalSound | 'yes' | 'no' | No | Keep audio from the reference video. Defaults to 'yes'. |
watermarkEnabled | boolean | No | Generate a watermarked result alongside the video. |
pollIntervalMs | number | No | How often to check task status. Defaults to 5000. |
pollTimeoutMs | number | No | Maximum wait time. Defaults to 600000 (10 minutes). |
Reference video and orientation
Motion control requires a reference clip via providerOptions.klingai.videoUrl. Provide the character as prompt.image and set characterOrientation to control how output duration is capped.
characterOrientation: 'image' limits output to 10 seconds and matches the character image orientation. 'video' limits output to 30 seconds and matches the reference video orientation.
The reference video must be a URL (use Vercel Blob for local files). Minimum 3 seconds of usable continuous motion is required.
Base64 image encoding
When passing an image as base64 (for example prompt.image), submit only the raw base64 string. Do not include a data:image/png;base64, prefix.
Motion transfer with Vercel Blob
Drive the character image with motion from a reference video. Upload local clips to Vercel Blob first, then pass the URL as videoUrl.
import { experimental_generateVideo as generateVideo } from 'ai';import fs from 'node:fs';import 'dotenv/config';import { put } from '@vercel/blob';
async function main() { const referenceVideo = fs.readFileSync('./dance.mp4'); const { url: videoUrl } = await put('dance.mp4', referenceVideo, { access: 'public', });
const result = await generateVideo({ model: 'klingai/kling-v2.6-motion-control', prompt: { image: fs.readFileSync('./character.png'), }, providerOptions: { klingai: { videoUrl, characterOrientation: 'video', mode: 'pro', }, }, });
// Save the generated video fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');}
main().catch(console.error);Copy link to headingAbout Kling v2.6 Motion Control
Kling v2.6 Motion Control is a video-to-video generation model built around Total Motion Transfer: replicating a motion sequence from a reference clip in an entirely new generated scene. You provide a 3-30 second reference video containing the movement to capture. The model applies that motion to a new subject and setting defined by a text or image prompt.
The system handles fast, intricate actions with high frame-level fidelity. Martial arts sequences, dance routines, and other high-speed movements that challenge basic motion estimation render with reduced artifacts in hand regions. Hand articulation has historically been a weak point in motion transfer systems. Facial expression tracking and lip-sync alignment carry over from the reference, making the model suitable for character animation and talking-head video production.
Kling v2.6 Motion Control also extracts camera behavior from the reference clip. Panning, push-in, pull-out, and rotation moves replicate in the generated output. A reference shot with deliberate camera motion carries that staging into the new scene, not only the actor motion. Output duration extends up to 30 seconds without manual clip stitching.
Copy link to headingWhat To Consider When Choosing a Provider
- Configuration: Reference video quality drives transfer accuracy. Use clear subjects, stable framing, and well-lit motion.
- Zero Data Retention: Zero Data Retention is offered on a per-provider and model basis. See the documentation for details.
- Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.
Copy link to headingWhen to Use Kling v2.6 Motion Control
Best for
- Dance and performance content: A reference performance transfers to a generated character or setting
- Talking-head dialogue: Videos that need accurate facial expression and lip-sync replication
- Camera movement transfer: Camera behavior from a reference shot carries into the new scene
- Fashion and product video: Production using human movement references in controlled studio footage
Consider alternatives when
- No reference video: You don't have a reference motion video and prefer purely text-driven generation
- Simple image animation: You want to animate an image into short video without motion transfer, so see i2v variants
- Multi-shot narratives: You need narrative generation with independent scene segments, so see v3.0
Copy link to headingConclusion
Kling v2.6 Motion Control transfers a precise movement sequence to a generated scene without manual animation or frame-by-frame keyframing. For character performance, staged shots, dance, or action, it moves hands, face, and camera together from the reference.
Copy link to headingFrequently Asked Questions
What format and duration should the reference video be?
The reference video should be 3-30 seconds long. Clearer subject visibility and stable framing produce more accurate motion transfer in the output.
Does Kling v2.6 Motion Control also transfer camera movement from the reference video?
Yes. Camera behavior (pan, push, pull, and rotation) in the reference clip replicates in the generated video, not just subject body motion.
How does it handle fast or complex movements like martial arts or dance?
The model reduces artifacts on fast, intricate motions. Hand articulation and high-speed body movements render with improved fidelity compared to earlier motion transfer approaches.
What is the maximum output duration?
Outputs can reach up to 30 seconds. This eliminates the need to stitch multiple short clips together for longer sequences.
Can the model transfer facial expressions and lip-sync from the reference video?
Yes. Facial expression tracking and lip-sync alignment transfer from the reference and apply to the generated subject.
Is a text prompt required alongside the reference video?
A text prompt is optional. Use it to describe the desired scene, subject, and styling for the output. Motion derives from the reference clip while the prompt defines what appears in the new video.