Kling Motion Control
curl --request POST \
--url https://api.mixroute.ai/kling/motion-control/{model}import requests
url = "https://api.mixroute.ai/kling/motion-control/{model}"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.mixroute.ai/kling/motion-control/{model}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mixroute.ai/kling/motion-control/{model}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mixroute.ai/kling/motion-control/{model}"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mixroute.ai/kling/motion-control/{model}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixroute.ai/kling/motion-control/{model}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyKling
Kling Motion Control
Generate Kling videos from a character image and motion-reference video.
Kling Motion Control
curl --request POST \
--url https://api.mixroute.ai/kling/motion-control/{model}import requests
url = "https://api.mixroute.ai/kling/motion-control/{model}"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.mixroute.ai/kling/motion-control/{model}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mixroute.ai/kling/motion-control/{model}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.mixroute.ai/kling/motion-control/{model}"
req, _ := http.NewRequest("POST", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.mixroute.ai/kling/motion-control/{model}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixroute.ai/kling/motion-control/{model}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyAuthenticate with your MixRoute API Key using
See Kling Overview.
Keep
Authorization: Bearer $MIXROUTE_API_KEY and send JSON. The model ID belongs in the URL, not a body model field. Do not add /v1 or wrap the request in metadata.
Supports kling-3.0 and kling-2.6, both at 720p / 1080p only, not 4k. This controls character motion from a reference video; it is not a separate motion model or a camera-movement-only setting.
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
contents | object[] | Yes | Input collection containing an appearance image and a motion video, with an optional prompt. |
contents[].type | string | Yes | Required per item: prompt, image, video; 3.0 additionally supports element. |
contents[].text | string | By type | Required for prompt items, maximum 2500 characters; may include positive and negative descriptions. |
contents[].url | string | By type | Required for image/video items. Images accept URLs or Base64; videos use public URLs. |
contents[].element_id | string | By type | Required for 3.0 element items only; at most 1 Element. |
contents[].id | string | By type | Required for element items, unique within the task and referenced as @id. |
settings.character_orientation | string | Yes | video: follow video orientation, reference length 3-30 s; image: follow image orientation, reference length 3-10 s. With an Element, orientation follows the video; set video. |
settings.resolution | string | No | 720p (default) or 1080p; 4k is unsupported. |
settings.audio | string | No | original (default) preserves reference audio; off removes audio. native is unsupported. |
Do not send
settings.duration. Usable continuous motion determines output length, which may be shorter than the reference; at least 3 seconds of usable motion is required. Billing uses actual generated duration.Media Limits
- Image: JPG/JPEG/PNG, at most 50 MB; both dimensions at least 300 px, aspect ratio 1:2.5 to 2.5:1.
- Video: MP4/MOV, at most 100 MB, each dimension 340-3850 px; duration depends on character_orientation.
- Match character proportions across image and video. Keep the head and limbs visible and unobstructed. Prefer one person in a continuous single shot; avoid cuts and fast movements.
Request Example
Set theMIXROUTE_API_KEY environment variable. Replace example.com media URLs with real, publicly accessible files.
curl --request POST "https://api.mixroute.ai/kling/motion-control/kling-3.0" \
--header "Authorization: Bearer $MIXROUTE_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"contents": [
{
"type": "prompt",
"text": "The person follows the reference motion."
},
{
"type": "image",
"url": "https://example.com/person.png"
},
{
"type": "video",
"url": "https://example.com/motion.mp4"
}
],
"settings": {
"resolution": "720p",
"character_orientation": "video",
"audio": "original"
}
}'
Submission Response
{
"code": 0,
"message": "",
"request_id": "REQUEST_ID",
"data": {
"id": "task_example",
"status": "submitted"
}
}
data.id and use Query Kling Task until succeeded or failed. Successful submission does not mean generation has finished.