video-v2.6-pro/motion-control

This documentation is valid for the following list of our models:

  • klingai/video-v2-6-pro-motion-control

Model Overview

A next-generation cinematic video generation model developed by KlingAI. It focuses on transferring motion from reference videos to arbitrary target characters, producing smooth, realistic movement, detailed visuals, and native audio when enabled.

How to Make a Call

Step-by-Step Instructions

1️ Setup You Can’t Skip

▪️ Create an Account: Visit the AI/ML API website and create an account (if you don’t have one yet). ▪️ Generate an API Key: After logging in, navigate to your account dashboard and generate your API key. Ensure the key is enabled on the UI.

2️ Copy the code example

At the bottom of this page, you'll find a code example that shows how to structure the request. Choose the code snippet in your preferred programming language and copy it into your development environment.

3️ Modify the code example

▪️ Replace <YOUR_AIMLAPI_KEY> with your actual AI/ML API key. ▪️ Adjust the input field used by this model (for example, prompt, input text, instructions, media source, or other model-specific input) to match your request.

4️ (Optional) Adjust other optional parameters if needed

Only the required parameters shown in the example are needed to run the request, but you can include optional parameters to fine-tune behavior. Below, you can find the corresponding API schema, which lists all available parameters and usage notes.

5️ Run your modified code

Run your modified code inside your development environment. Response time depends on many factors, but for simple requests it rarely exceeds a few seconds.

API Schemas

Create a video generation task and send it to the server

post
Body
modelstring · enumRequiredPossible values:
promptstringOptional

Optional instructions that define the background elements, including their appearance, timing in the frame, and behavior, and can also subtly adjust the character’s animation.

image_urlstring · uriRequired

A direct link to an online image or a Base64-encoded local image that serves as the character reference for animation. The image must contain exactly one clearly visible character, who will be animated using the motion from the reference video provided in the video_url parameter. For optimal results, be sure the character’s proportions in the image match those in the video.

video_urlstring · uriRequired

A HTTPS URL pointing to a video or a data URI containing a video. The character’s movements from this video will be applied to the character from the image provided in the image_url parameter. For best results, use a video with a single clearly visible character. If the video contains two or more characters, the motion of the character occupying the largest portion of the frame will be used for generation.

character_orientationstring · enumOptional

Generate the orientation of the character in the video, which can be selected to match the image or the video:

  • image: has the same orientation as the person in the picture; At this time, the reference video duration should not exceed 10 seconds;
  • video: consistent with the orientation of the characters in the video; At this time, the reference video duration should not exceed 30 seconds;
Default: imagePossible values:
keep_audiobooleanOptional

Whether to keep the original audio from the video.

Default: true
Responses
200Success
application/json
post
/v2/video/generations
200Success

Retrieve the generated video from the server

After sending a request for video generation, this task is added to the queue. This endpoint lets you check the status of a video generation task using its id, obtained from the endpoint described above. If the video generation task status is completed, the response will include the final result — with the generated video URL and additional metadata.

get
Authorizations
AuthorizationstringRequired

Bearer key

Query parameters
generation_idstringRequiredExample: <REPLACE_WITH_YOUR_GENERATION_ID>
Responses
200Success
application/json
get
/v2/video/generations
200Success

Code Example

  1. Provide the URL of the image containing the character you want to animate.

  2. Provide the URL of the video where another character performs the movements you want to transfer to the animated character.

  3. If needed, describe minor background details or additional objects in the frame using the prompt parameter. Example: "At 00:03, a brightly colored parrot flies in from the left, briefly circles above the character once, and then hurries off to the right."

  4. Set the character_orientation parameter to image or video, depending on whether you want to use the character’s orientation from the image reference or from the video reference.

  5. By default, the model uses the audio track from the reference video. You can disable this behavior by setting the keep_audio parameter to false.

Input Reference Guidelines
  • Ensure the character’s entire body and head are clearly visible and not obstructed in both the image and the motion reference.

  • Keep the character’s proportions consistent between the image and the reference video. Avoid pairing a full-body motion reference with a half-body or cropped image.

  • Upload a motion reference featuring a single character whenever possible. If the motion reference contains two or more characters, the motion of the character occupying the largest portion of the frame will be used for generation.

  • Real human actions are recommended. Certain stylised characters, humanoid animals, and characters with partial humanoid body proportions are supported and can be recognised.

  • Avoid cuts, camera movements, and rapid scene changes in the motion reference video.

  • Avoid overly fast or complex motions. Steady, moderate movements generally produce better results.

  • The short edge of the input media must be at least 300–340 px (depending on the input type), and the long edge must not exceed 3850–65536 px.

  • The supported duration of the motion reference video ranges from 3 to 30 seconds. The generated video length will generally match the duration of the uploaded reference video.

  • If the motion is too complex or fast-paced, the generated output may be shorter than the original video, as the model can only extract valid continuous action segments.

The code below creates a video generation task, then automatically polls the server every 15 seconds until it finally receives the video URL.

Response

Processing time: ~ 5 min 56 sec.

Image and Video References

Generated video (1936x1072, without sound, the character’s orientation matches the orientation from the image reference):

"character_orientation":"image"

Generated video (1936x1072, without sound, the character’s orientation matches the orientation from the video reference):

"character_orientation":"video"

Last updated

Was this helpful?