Kling V3.0 モーション制御
curl --request POST \
--url https://api.highwayapi.ai/v3/async/kling-v3.0-motion-control \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"image": "<string>",
"video": "<string>",
"prompt": "<string>",
"model_name": "<string>",
"negative_prompt": "<string>",
"keep_original_sound": true,
"character_orientation": "<string>"
}
'import requests
url = "https://api.highwayapi.ai/v3/async/kling-v3.0-motion-control"
payload = {
"image": "<string>",
"video": "<string>",
"prompt": "<string>",
"model_name": "<string>",
"negative_prompt": "<string>",
"keep_original_sound": True,
"character_orientation": "<string>"
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
image: '<string>',
video: '<string>',
prompt: '<string>',
model_name: '<string>',
negative_prompt: '<string>',
keep_original_sound: true,
character_orientation: '<string>'
})
};
fetch('https://api.highwayapi.ai/v3/async/kling-v3.0-motion-control', 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.highwayapi.ai/v3/async/kling-v3.0-motion-control",
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([
'image' => '<string>',
'video' => '<string>',
'prompt' => '<string>',
'model_name' => '<string>',
'negative_prompt' => '<string>',
'keep_original_sound' => true,
'character_orientation' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.highwayapi.ai/v3/async/kling-v3.0-motion-control"
payload := strings.NewReader("{\n \"image\": \"<string>\",\n \"video\": \"<string>\",\n \"prompt\": \"<string>\",\n \"model_name\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"keep_original_sound\": true,\n \"character_orientation\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
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.highwayapi.ai/v3/async/kling-v3.0-motion-control")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"image\": \"<string>\",\n \"video\": \"<string>\",\n \"prompt\": \"<string>\",\n \"model_name\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"keep_original_sound\": true,\n \"character_orientation\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/async/kling-v3.0-motion-control")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"image\": \"<string>\",\n \"video\": \"<string>\",\n \"prompt\": \"<string>\",\n \"model_name\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"keep_original_sound\": true,\n \"character_orientation\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}動画
Kling V3.0 モーション制御
POST
/
v3
/
async
/
kling-v3.0-motion-control
Kling V3.0 モーション制御
curl --request POST \
--url https://api.highwayapi.ai/v3/async/kling-v3.0-motion-control \
--header 'Authorization: <authorization>' \
--header 'Content-Type: <content-type>' \
--data '
{
"image": "<string>",
"video": "<string>",
"prompt": "<string>",
"model_name": "<string>",
"negative_prompt": "<string>",
"keep_original_sound": true,
"character_orientation": "<string>"
}
'import requests
url = "https://api.highwayapi.ai/v3/async/kling-v3.0-motion-control"
payload = {
"image": "<string>",
"video": "<string>",
"prompt": "<string>",
"model_name": "<string>",
"negative_prompt": "<string>",
"keep_original_sound": True,
"character_orientation": "<string>"
}
headers = {
"Content-Type": "<content-type>",
"Authorization": "<authorization>"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': '<content-type>', Authorization: '<authorization>'},
body: JSON.stringify({
image: '<string>',
video: '<string>',
prompt: '<string>',
model_name: '<string>',
negative_prompt: '<string>',
keep_original_sound: true,
character_orientation: '<string>'
})
};
fetch('https://api.highwayapi.ai/v3/async/kling-v3.0-motion-control', 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.highwayapi.ai/v3/async/kling-v3.0-motion-control",
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([
'image' => '<string>',
'video' => '<string>',
'prompt' => '<string>',
'model_name' => '<string>',
'negative_prompt' => '<string>',
'keep_original_sound' => true,
'character_orientation' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"Content-Type: <content-type>"
],
]);
$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.highwayapi.ai/v3/async/kling-v3.0-motion-control"
payload := strings.NewReader("{\n \"image\": \"<string>\",\n \"video\": \"<string>\",\n \"prompt\": \"<string>\",\n \"model_name\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"keep_original_sound\": true,\n \"character_orientation\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "<content-type>")
req.Header.Add("Authorization", "<authorization>")
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.highwayapi.ai/v3/async/kling-v3.0-motion-control")
.header("Content-Type", "<content-type>")
.header("Authorization", "<authorization>")
.body("{\n \"image\": \"<string>\",\n \"video\": \"<string>\",\n \"prompt\": \"<string>\",\n \"model_name\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"keep_original_sound\": true,\n \"character_orientation\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.highwayapi.ai/v3/async/kling-v3.0-motion-control")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = '<content-type>'
request["Authorization"] = '<authorization>'
request.body = "{\n \"image\": \"<string>\",\n \"video\": \"<string>\",\n \"prompt\": \"<string>\",\n \"model_name\": \"<string>\",\n \"negative_prompt\": \"<string>\",\n \"keep_original_sound\": true,\n \"character_orientation\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>"
}Kling V3.0 モーション制御ツールは、参照動画から動きの軌跡を抽出し、それを参照画像に適用して動画を生成できます。同時に主体の一貫性を維持します。標準モードとプロモードをサポートし、秒単位で課金されます。
これは非同期APIであり、非同期タスクの task_id のみを返します。この task_id を使用して タスク結果照会 API にリクエストし、生成結果を取得してください。
リクエストヘッダー
string
必須
列挙値:
application/jsonstring
必須
Bearer 認証形式: Bearer {{API キー}}。
リクエストボディ
string
必須
参照画像 URL または base64 エンコード画像。.jpg、.jpeg、.png をサポートします。
画像ファイルサイズは 10MB を超えてはなりません。幅と高さはいずれも >= 300px である必要があります。アスペクト比は 1:2.5 から 2.5:1 の間である必要があります。
string
必須
参照モーション動画 URL。.mp4、.mov をサポートします。
動画ファイルサイズは 10MB を超えてはなりません。幅と高さはいずれも >= 300px である必要があります。長さは 3〜30 秒です。
string
シーンの説明、スタイル、照明などのポジティブプロンプト。長さは 2500 文字以内です。長さ制限:0 - 2500
string
デフォルト:"kling-v3-0-std"
必須
モデル名。kling-v3-0-std:標準モード、コストパフォーマンスに優れています。kling-v3-0-pro:プロモード、より高品質な動画を生成します。選択可能な値:
kling-v3-0-std, kling-v3-0-prostring
ネガティブプロンプト。生成動画で避けたい要素を記述します。長さは 2500 文字以内です。長さ制限:0 - 2500
boolean
デフォルト:true
参照動画の元の音声を保持するかどうか。
string
必須
出力フレームモード:
- image:参照画像の人物の姿勢と構図を主とし、動きを画像内の人物に転移します(出力 5 秒)
- video:参照動画の人物の姿勢と構図を主とし、動画内の動きを画像内の人物に適用します(出力時間は参照動画と同じ、最長 30 秒)
image, videoレスポンス情報
string
必須
task_id を使用して タスク結果照会 API にリクエストし、生成された出力を取得します。
⌘I