Motion ControlKling

Kling 2.6 モーションコントロール

kwaivgi/kling-v2.6/motion-control

Kling 2.6 モーションコントロールは、参照モーション(ダンス、アクション、ジェスチャー)を滑らかでリアルなアニメーションに変換します。キャラクター画像(またはソース動画)とモーション動画をアップロードすると、アイデンティティと時間的一貫性を保ちながら動きを転送します。

サンプル

Kling 2.6 モーションコントロール example 1

パラメータ

名前既定制約説明
image *キャラクター画像image_uploadimage/jpeg,image/jpg,image/png · 0–1 itemsキャラクター画像をアップロードしてください。対応形式: .jpg/.jpeg/.png。最大ファイルサイズ: 10MB。最小サイズ: 300x300px。アスペクト比: 1:2.5 から 2.5:1。
character_orientationキャラクターの向きselectimageimage | videoキャラクターソースとして画像または動画を使用するかを選択します。
promptプロンプトtext≤ 500 chars生成のためのオプションのポジティブプロンプト。
negative_promptネガティブプロンプトtext≤ 500 chars生成のためのオプションのネガティブプロンプト。
resolution生成モードselect1080P720P | 1080P
keep_original_sound元の音声を保持booleantrue出力で元の動画の音声を保持するかどうか。

API

統一 REST API でこのモデルを呼び出せます。API Keys ページでキーを取得してください。

cURL
# 1) Submit — returns { "task_uuid": "..." }
curl -X POST "https://www.namifusion.com/api/v1/marketplace/run/kwaivgi/kling-v2.6/motion-control" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "image": [
      "https://assets.namifusion.com/uploads/image/e6d71928-36de-4d71-a26c-9b1b427a6dfd/2026-03-27/0847e5142a20.jpg?imageMogr2/thumbnail/600x/format/webp/quality/85"
    ],
    "character_orientation": "image",
    "resolution": "1080P",
    "keep_original_sound": true
  }
}'

# 2) Poll until status is "completed", then read the output URLs
curl "https://www.namifusion.com/api/v1/marketplace/run/tasks/TASK_UUID" \
  -H "Authorization: Bearer YOUR_API_KEY"
Python
import time, requests

API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# 1) Submit
resp = requests.post(
    "https://www.namifusion.com/api/v1/marketplace/run/kwaivgi/kling-v2.6/motion-control",
    headers=HEADERS,
    json={
        "input": {
            "image": [
                "https://assets.namifusion.com/uploads/image/e6d71928-36de-4d71-a26c-9b1b427a6dfd/2026-03-27/0847e5142a20.jpg?imageMogr2/thumbnail/600x/format/webp/quality/85"
            ],
            "character_orientation": "image",
            "resolution": "1080P",
            "keep_original_sound": True
        }
    },
)
resp.raise_for_status()  # 401/402/429/5xx stop here instead of polling a bad task
task = resp.json()

# 2) Poll until a terminal state (completed / failed / cancelled).
#    This model is allowed up to 600s server-side.
deadline = time.time() + 660
while task.get("status") not in ("completed", "failed", "cancelled"):
    if time.time() > deadline:
        raise TimeoutError(f"still {task.get('status')} — keep the task_uuid and poll later")
    time.sleep(3)
    poll = requests.get(f"https://www.namifusion.com/api/v1/marketplace/run/tasks/{task['task_uuid']}", headers=HEADERS)
    poll.raise_for_status()
    task = poll.json()

print(task["status"], task.get("output"))
JavaScript
const API_KEY = "YOUR_API_KEY";
const HEADERS = { Authorization: `Bearer ${API_KEY}` };

// 1) Submit
const resp = await fetch("https://www.namifusion.com/api/v1/marketplace/run/kwaivgi/kling-v2.6/motion-control", {
  method: "POST",
  headers: { ...HEADERS, "Content-Type": "application/json" },
  body: JSON.stringify({
    "input": {
      "image": [
        "https://assets.namifusion.com/uploads/image/e6d71928-36de-4d71-a26c-9b1b427a6dfd/2026-03-27/0847e5142a20.jpg?imageMogr2/thumbnail/600x/format/webp/quality/85"
      ],
      "character_orientation": "image",
      "resolution": "1080P",
      "keep_original_sound": true
    }
  }),
});
if (!resp.ok) throw new Error(`submit failed: ${resp.status} ${await resp.text()}`);
let task = await resp.json();

// 2) Poll until a terminal state (completed / failed / cancelled).
//    This model is allowed up to 600s server-side.
const deadline = Date.now() + 660 * 1000;
while (!["completed", "failed", "cancelled"].includes(task.status)) {
  if (Date.now() > deadline) throw new Error(`still ${task.status} — keep the task_uuid and poll later`);
  await new Promise((r) => setTimeout(r, 3000));
  const poll = await fetch(`https://www.namifusion.com/api/v1/marketplace/run/tasks/${task.task_uuid}`, { headers: HEADERS });
  if (!poll.ok) throw new Error(`poll failed: ${poll.status}`);
  task = await poll.json();
}

console.log(task.status, task.output);

ドキュメント

NamiFusion Kling 2.6 Motion Control

AI モーション制御動画生成:キャラクター画像とモーション参照動画をアップロードして、キャラクターのアイデンティティを保持したアニメーション動画を生成します。

NamiFusion Kling 2.6 Motion Control は、モーション転送シナリオ向けに設計された動画生成サービスです。キャラクター画像とモーション参照動画を受け取り、参照動画のダンス・アクション・ジェスチャーをターゲットキャラクターに転送し、より高いアイデンティティ一貫性と時系列的な整合性を持つ結果動画を出力します。


主な機能

  • モーション転送: 参照動画の身体動作をターゲットキャラクターに転送します。ダンス、パフォーマンス、アクションデモンストレーションのシナリオに適しています。
  • キャラクター一貫性: キャラクター画像を生成動画の視覚的主体として使用し、人物の外見とアイデンティティ特徴を可能な限り保持します。
  • オプションのプロンプト制御: スタイルや不要なコンテンツに対する追加ガイダンスとして promptnegative_prompt をサポートします。
  • 非同期タスク: 送信後に task_uuid を返し、ポーリングによって処理状況と最終結果を取得できます。

技術仕様

パラメータ詳細
モデル IDkwaivgi/kling-v2.6-pro/motion-control
リクエスト方式非同期 POST(タスク送信 + 結果ポーリング)
入力キャラクター画像 URL + モーション参照動画 URL
出力生成動画 URL
処理時間通常数十秒から数分、最大ポーリング待機時間は 10 分
料金$0.112 / 秒、最低 3 秒単位で課金

クイックスタート

API エンドポイント

エンドポイントメソッド説明
/api/v1/marketplace/run/kwaivgi/kling-v2.6/motion-controlPOSTモーション制御タスクを送信
/api/v1/marketplace/run/tasks/{task_uuid}GETタスクの状態と結果を照会

認証

リクエストヘッダーに API Key を含めてください:

X-API-Key: sk-your-api-key

使用例

ステップ 1:タスクを送信する

curl -X POST "https://www.namifusion.com/api/v1/marketplace/run/kwaivgi/kling-v2.6/motion-control" \
  -H "X-API-Key: sk-your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "image": "https://static.example.com/character.png",
      "video": "https://static.example.com/motion.mp4",
      "character_orientation": "image",
      "prompt": "full body, natural motion, cinematic lighting",
      "negative_prompt": "blur, distortion, extra limbs, low quality",
      "resolution": "720P",
      "keep_original_sound": true
    }
  }'

レスポンス例:

{
  "task_uuid": "443ea3cd-4025-40d2-901f-ef18970dbc43",
  "status": "pending",
  "cost_credits": 0
}

ステップ 2:タスク状態をポーリングする

curl -X GET "https://www.namifusion.com/api/v1/marketplace/run/tasks/443ea3cd-4025-40d2-901f-ef18970dbc43" \
  -H "X-API-Key: sk-your-api-key"

処理中:

{
  "task_uuid": "443ea3cd-4025-40d2-901f-ef18970dbc43",
  "status": "processing"
}

完了:

{
  "task_uuid": "443ea3cd-4025-40d2-901f-ef18970dbc43",
  "model_id": "kwaivgi/kling-v2.6/motion-control",
  "status": "completed",
  "output": {
    "video_url": "https://cdn.example.com/results/kling_motion_control_output.mp4"
  },
  "cost_credits": 0,
  "created_at": "2026-03-27T11:40:00Z",
  "completed_at": "2026-03-27T11:41:20Z"
}

Python サンプル

import requests
import time

API_KEY = "sk-your-api-key"
BASE_URL = "https://www.namifusion.com/api/v1/marketplace/run"
HEADERS = {
    "X-API-Key": API_KEY,
    "Content-Type": "application/json",
}

payload = {
    "input": {
        "image": "https://static.example.com/character.png",
        "video": "https://static.example.com/motion.mp4",
        "character_orientation": "image",
        "prompt": "full body, natural motion, cinematic lighting",
        "negative_prompt": "blur, distortion, extra limbs, low quality",
        "resolution": "720P",
        "keep_original_sound": True,
    }
}

submit_resp = requests.post(
    f"{BASE_URL}/kwaivgi/kling-v2.6-pro/motion-control",
    headers=HEADERS,
    json=payload,
)
submit_resp.raise_for_status()
task = submit_resp.json()

task_uuid = task["task_uuid"]
print(f"タスクを送信しました:{task_uuid}")

while True:
    status_resp = requests.get(
        f"{BASE_URL}/tasks/{task_uuid}",
        headers=HEADERS,
    )
    status_resp.raise_for_status()
    result = status_resp.json()

    status = result["status"]
    print(f"ステータス:{status}")

    if status == "completed":
        print("結果:", result["output"]["video_url"])
        break

    if status == "failed":
        print("失敗:", result.get("error_message", "不明なエラー"))
        break

    time.sleep(5)

詳細パラメータと戻り値

リクエストパラメータ

リクエストボディは JSON 形式で、すべてのパラメータは input オブジェクト内に配置します:

{
  "input": {
    "image": "https://...",
    "video": "https://...",
    "character_orientation": "image",
    "prompt": "full body, natural motion",
    "negative_prompt": "blur, low quality",
    "keep_original_sound": true
  }
}
パラメータ必須デフォルト説明
imagestringはい-キャラクター画像 URL。.jpg.jpeg.png をサポート。最大ファイルサイズ 10MB、最小サイズ 300x300、アスペクト比範囲 1:2.52.5:1
videostringはい-モーション参照動画 URL。.mp4.mov をサポート。最大ファイルサイズ 10MB、最小サイズ 300x300、アスペクト比範囲 1:2.52.5:1
character_orientationstringいいえ"image"キャラクターのソースタイプ。現在のモデル設定ではデフォルトで image を使用。サポート値:imagevideo
promptstringいいえnullモーションスタイル、カメラの雰囲気、キャラクターの表情などを記述するオプションのポジティブプロンプト。最大長 500 文字。
negative_promptstringいいえnull不要なコンテンツを制限するオプションのネガティブプロンプト。最大長 500 文字。
keep_original_soundbooleanいいえtrueモーション参照動画の元の音声を保持するかどうか。

タスクステータス

タスク送信後、ポーリングでステータスを照会します。5 秒間隔のポーリングを推奨します:

ステータス説明
pendingタスクが作成され、処理待ちの状態です。
processingタスクが処理中です。
completedタスクが完了し、結果動画 URL が output.video_url から取得できます。
failedタスクが失敗しました。error_message で原因を確認してください。

戻り値の構造

タスク送信レスポンス

フィールド説明
task_uuidstring後続のステータス照会に使用する一意のタスク識別子。
statusstring初期タスクステータス、通常は pending
cost_creditsnumberこのタスクで消費されたクレジット。

タスク完了レスポンス

フィールド説明
task_uuidstring一意のタスク識別子。
model_idstringモデル ID(kwaivgi/kling-v2.6-pro/motion-control)。
statusstringタスクステータス。
output.video_urlstring生成された結果動画 URL。
cost_creditsnumber消費されたクレジット。
created_atstringタスク作成時刻(ISO 8601)。
completed_atstringタスク完了時刻(ISO 8601)。
error_messagestringエラーメッセージ、failed 時のみ返されます。

パラメータが出力に与える影響

パラメータ出力への影響
image最終動画のメインキャラクターの外見を決定します。遮蔽がなく、フレーミングが完全な明瞭なキャラクター画像を推奨します。
videoモーションの軌跡とリズムの参照を提供します。動きが明確で主体が目立つほど、転送結果が安定する傾向があります。
promptカメラスタイル、モーションの雰囲気、衣装の詳細、シーンの傾向に対するガイダンスを追加しますが、参照モーション自体を置き換えるものではありません。
negative_promptぼかし、歪み、余分な手足、低品質な詳細などの問題を軽減するのに役立ちます。
keep_original_sound: true出力動画は参照動画の元の音声を可能な限り保持し、ダンスやパフォーマンスのシナリオに適しています。
keep_original_sound: false出力動画は参照動画の元の音声を保持せず、後の音声置換や編集に適しています。

注意事項

  1. 入力 URL は公開アクセス可能である必要があります: imagevideo はどちらも、サーバーが直接ダウンロードできる公開 URL である必要があります。
  2. キャラクター入力には画像の使用を推奨します: 現在のモデル設定はデフォルトで character_orientation: "image" となっており、これが最も安定した明確に定義された統合方法です。
  3. プロンプトは簡潔かつ具体的に保ってください: promptnegative_prompt は補足的なガイダンスとして最も効果的です。相互に矛盾する説明を多数重ねることは避けてください。
  4. 5 秒のポーリング間隔を推奨します: このモデルは非同期タスク処理を使用します。5 秒ごとにタスクステータスを照会し、最大待機時間は 600 秒です。
  5. 結果フィールドは単一の動画 URL です: タスク完了後、videos のような配列フィールドではなく、output.video_url から結果を読み取ってください。