Model routes
Create a Kling motion-control video
Create a Kling motion-control task from a character image and a reference motion video.
POST
/
motion-control
/
{model}
cURL
curl https://api.cometapi.com/motion-control/kling-2.6 \
-H "Authorization: Bearer $COMETAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"contents": [
{
"type": "prompt",
"text": "The character performs the dance shown in the reference video."
},
{
"type": "image",
"url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.ng.png"
},
{
"type": "video",
"url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4"
}
],
"settings": {
"resolution": "720p",
"character_orientation": "video",
"audio": "off"
}
}
JSONimport os
import requests
response = requests.post(
"https://api.cometapi.com/motion-control/kling-2.6",
headers={"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]},
json={
"contents": [
{
"type": "prompt",
"text": "The character performs the dance shown in the reference video.",
},
{
"type": "image",
"url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.ng.png",
},
{
"type": "video",
"url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4",
},
],
"settings": {
"resolution": "720p",
"character_orientation": "video",
"audio": "off",
},
},
)
response.raise_for_status()
result = response.json()
print(result["data"]["id"])
const response = await fetch(
"https://api.cometapi.com/motion-control/kling-2.6",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"contents": [
{
"type": "prompt",
"text": "The character performs the dance shown in the reference video."
},
{
"type": "image",
"url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.ng.png"
},
{
"type": "video",
"url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4"
}
],
"settings": {
"resolution": "720p",
"character_orientation": "video",
"audio": "off"
}
}),
},
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
console.log(result.data.id);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometapi.com/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",
CURLOPT_POSTFIELDS => json_encode([
'contents' => [
[
'type' => 'prompt',
'text' => 'The character performs the dance shown in the reference video.'
],
[
'type' => 'image',
'url' => 'https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.ng.png'
],
[
'type' => 'video',
'url' => 'https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4'
]
],
'settings' => [
'resolution' => '720p',
'character_orientation' => 'video',
'audio' => 'off'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cometapi.com/motion-control/{model}"
payload := strings.NewReader("{\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"The character performs the dance shown in the reference video.\"\n },\n {\n \"type\": \"image\",\n \"url\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.ng.png\"\n },\n {\n \"type\": \"video\",\n \"url\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4\"\n }\n ],\n \"settings\": {\n \"resolution\": \"720p\",\n \"character_orientation\": \"video\",\n \"audio\": \"off\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.cometapi.com/motion-control/{model}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"The character performs the dance shown in the reference video.\"\n },\n {\n \"type\": \"image\",\n \"url\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.ng.png\"\n },\n {\n \"type\": \"video\",\n \"url\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4\"\n }\n ],\n \"settings\": {\n \"resolution\": \"720p\",\n \"character_orientation\": \"video\",\n \"audio\": \"off\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/motion-control/{model}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"The character performs the dance shown in the reference video.\"\n },\n {\n \"type\": \"image\",\n \"url\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.ng.png\"\n },\n {\n \"type\": \"video\",\n \"url\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4\"\n }\n ],\n \"settings\": {\n \"resolution\": \"720p\",\n \"character_orientation\": \"video\",\n \"audio\": \"off\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"message": "SUCCEED",
"data": {
"id": "example-task-id",
"status": "submitted"
}
}Use
Use the character image and reference video as publicly accessible URLs. Set
To animate a character image, send this request body to
The response returns an
Use the
POST /motion-control/{model} to animate a character image with the movement from a reference video. The request creates an asynchronous task.
Choose a model
| Model ID | Resolution | settings.audio |
|---|---|---|
kling-3.0 | 720p, 1080p | original, off |
kling-2.6 | 720p, 1080p | original, off |
settings.audio to original to retain audio from the reference video, or off for silent output.
The image must be JPG or PNG, at most 50 MB, and at least 300 pixels on each edge. Use an MP4 or MOV reference video of at least 3 seconds and at most 100 MB. With character_orientation: image, the video can be up to 10 seconds; with video, it can be up to 30 seconds.
Request parameters
| Field | Required | Description |
|---|---|---|
model | Yes | Model ID in the URL: kling-3.0 or kling-2.6. |
contents | Yes | Array containing one image item and one video item. Add a prompt item to describe the scene. |
contents[].type | Yes | image for the character, video for the motion reference, or prompt for text guidance. |
contents[].url | For image and video items | Public URL for the character image or reference motion video. |
contents[].text | For a prompt item | Required text guidance for the generated scene. |
settings.resolution | No | Output resolution: 720p or 1080p. If omitted, the request uses 720p. |
settings.character_orientation | Yes | image uses the character orientation from the image; video uses the reference video. |
settings.audio | No | original retains reference audio; off disables it. If omitted, the request uses off. |
options.callback_url | No | HTTPS URL that receives task status callbacks. |
options.external_task_id | No | Your own task identifier for correlation; retain the returned data.id for queries. |
options.watermark_info.enabled | No | Set to true to request a watermark. |
POST /motion-control/kling-2.6. Replace the media URLs with your own accessible files when using your own character and motion:
{
"contents": [
{
"type": "prompt",
"text": "The character performs the dance shown in the reference video."
},
{
"type": "image",
"url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.ng.png"
},
{
"type": "video",
"url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4"
}
],
"settings": {
"resolution": "720p",
"character_orientation": "video",
"audio": "off"
}
}
id for the asynchronous task:
{
"code": 0,
"message": "SUCCEED",
"data": {
"id": "example-task-id",
"status": "submitted"
}
}
data.id value with Get a Kling task until the task completes. Read the finished video URL from the task’s outputs array. Store the video in your own storage if you need durable access.
The OpenAPI panel contains matching Shell, Python, and JavaScript requests. For more input details, see the Kling motion-control API reference.Authorizations
Authenticate with your CometAPI API key.
Path Parameters
Kling motion-control model ID.
Available options:
kling-3.0, kling-2.6 Body
application/json
Send a character image and motion reference video. Add a prompt item for scene guidance.
Minimum array length:
2Show child attributes
Show child attributes
Output resolution, reference orientation, and audio settings.
Show child attributes
Show child attributes
Optional task notification and identification settings.
Show child attributes
Show child attributes
Response
200 - application/json
Task created. Store data.id for a GET /tasks query.
Last modified on September 25, 2026
⌘I
cURL
curl https://api.cometapi.com/motion-control/kling-2.6 \
-H "Authorization: Bearer $COMETAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"contents": [
{
"type": "prompt",
"text": "The character performs the dance shown in the reference video."
},
{
"type": "image",
"url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.ng.png"
},
{
"type": "video",
"url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4"
}
],
"settings": {
"resolution": "720p",
"character_orientation": "video",
"audio": "off"
}
}
JSONimport os
import requests
response = requests.post(
"https://api.cometapi.com/motion-control/kling-2.6",
headers={"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]},
json={
"contents": [
{
"type": "prompt",
"text": "The character performs the dance shown in the reference video.",
},
{
"type": "image",
"url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.ng.png",
},
{
"type": "video",
"url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4",
},
],
"settings": {
"resolution": "720p",
"character_orientation": "video",
"audio": "off",
},
},
)
response.raise_for_status()
result = response.json()
print(result["data"]["id"])
const response = await fetch(
"https://api.cometapi.com/motion-control/kling-2.6",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"contents": [
{
"type": "prompt",
"text": "The character performs the dance shown in the reference video."
},
{
"type": "image",
"url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.ng.png"
},
{
"type": "video",
"url": "https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4"
}
],
"settings": {
"resolution": "720p",
"character_orientation": "video",
"audio": "off"
}
}),
},
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
console.log(result.data.id);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometapi.com/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",
CURLOPT_POSTFIELDS => json_encode([
'contents' => [
[
'type' => 'prompt',
'text' => 'The character performs the dance shown in the reference video.'
],
[
'type' => 'image',
'url' => 'https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.ng.png'
],
[
'type' => 'video',
'url' => 'https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4'
]
],
'settings' => [
'resolution' => '720p',
'character_orientation' => 'video',
'audio' => 'off'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cometapi.com/motion-control/{model}"
payload := strings.NewReader("{\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"The character performs the dance shown in the reference video.\"\n },\n {\n \"type\": \"image\",\n \"url\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.ng.png\"\n },\n {\n \"type\": \"video\",\n \"url\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4\"\n }\n ],\n \"settings\": {\n \"resolution\": \"720p\",\n \"character_orientation\": \"video\",\n \"audio\": \"off\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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.cometapi.com/motion-control/{model}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"The character performs the dance shown in the reference video.\"\n },\n {\n \"type\": \"image\",\n \"url\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.ng.png\"\n },\n {\n \"type\": \"video\",\n \"url\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4\"\n }\n ],\n \"settings\": {\n \"resolution\": \"720p\",\n \"character_orientation\": \"video\",\n \"audio\": \"off\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/motion-control/{model}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"The character performs the dance shown in the reference video.\"\n },\n {\n \"type\": \"image\",\n \"url\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-3.ng.png\"\n },\n {\n \"type\": \"video\",\n \"url\": \"https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/dance.mp4\"\n }\n ],\n \"settings\": {\n \"resolution\": \"720p\",\n \"character_orientation\": \"video\",\n \"audio\": \"off\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"message": "SUCCEED",
"data": {
"id": "example-task-id",
"status": "submitted"
}
}