Kling 4.0 参照から動画

kwaivgi/kling-v4.0/reference-to-video

画像・動画・音声を参照して3〜30秒の720pまたは1080p動画を生成します。プロンプトで素材を指定できます。

サンプル

Kling 4.0 参照から動画 サンプル 1

パラメータ

名前型既定制約説明
prompt *プロンプトtextarea—≤ 5000 chars生成に使用するポジティブプロンプトです。参照画像は配列順に @Image1、@Image2…、参照動画は @Video1、@Video2…、参照音声は @Audio1、@Audio2… のように指定してください。
images参照画像image_upload—image/* · 0–10 items参照画像(最大 10 枚)。
audios参照音声audio_upload_group—audio/* · 0–3 items音声・サウンドを指定する参照音声。最大 3 本、各 5〜30 秒。
keep_original_sound元の音声を保持booleanfalse—参照動画の元の音声を保持します。参照動画が必要です。オフの場合は新しい音声を生成します。
resolution解像度select720p720p | 1080p出力解像度。
duration長さselect53 ~ 30 · step 1 · 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | …生成する動画の長さ(秒)です(3〜30)。
aspect_ratioアスペクト比selectautoauto | 16:9 | 9:16 | 1:1 | 21:9出力動画のアスペクト比。自動では参照画像または動画に合わせます。

出力フィールド

フィールド型説明
videosarray<string>

API

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

cURL
# 1) Submit — returns { "task_uuid": "..." }
curl -X POST "https://www.namifusion.com/api/v1/marketplace/run/kwaivgi/kling-v4.0/reference-to-video" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "prompt": "A cinematic portrait, dramatic rim light, shallow depth of field",
    "keep_original_sound": false,
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "auto"
  }
}'

# 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-v4.0/reference-to-video",
    headers=HEADERS,
    json={
        "input": {
            "prompt": "A cinematic portrait, dramatic rim light, shallow depth of field",
            "keep_original_sound": False,
            "resolution": "720p",
            "duration": 5,
            "aspect_ratio": "auto"
        }
    },
)
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 1800s server-side.
deadline = time.time() + 1860
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-v4.0/reference-to-video", {
  method: "POST",
  headers: { ...HEADERS, "Content-Type": "application/json" },
  body: JSON.stringify({
    "input": {
      "prompt": "A cinematic portrait, dramatic rim light, shallow depth of field",
      "keep_original_sound": false,
      "resolution": "720p",
      "duration": 5,
      "aspect_ratio": "auto"
    }
  }),
});
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 1800s server-side.
const deadline = Date.now() + 1860 * 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);

ドキュメント

Kling 4.0 · 参照素材から動画

プロンプトと任意の画像、動画、音声の参照から、新しい3〜30秒の動画を生成します。出力時間は参照動画の長さとは別に指定できます。

入力パラメーター

  • prompt:文字列、必須。
  • images:任意の画像URL配列、最大10枚。
  • videos:任意の動画URL配列、最大5本。各元動画は3秒以上で、使用される動画時間は合計30秒までです。
  • audios:任意の音声URL配列、最大3本。各音声は5〜30秒。
  • keep_original_sound:ブール値、既定はfalse。trueで参照動画の元音声を保持します。videosの指定が必要です。
  • resolution:"720p"(既定)または"1080p"。
  • duration:3〜30の整数、既定は5。
  • aspect_ratio:"auto"(既定)、"16:9"、"9:16"、"1:1"、"21:9"。

制限と参照方法

images、videos、audiosを合わせて最大15ファイルです。合計30秒を超える動画部分は切り詰められます。promptの@Image1、@Video1、@Audio1は、それぞれの配列の最初の項目を指します。媒体ごとに1から番号を付け、各参照の役割を記述してください。

通常料金と事前のクレジット計算

入力動画720p1080p課金単位
なし$0.157$0.235出力動画の1秒
あり$0.094$0.141課金対象の1秒

参照動画がない場合:料金 = 出力秒数 × 解像度別単価。5秒の動画は720pで$0.785、1080pで$1.175です。

出力秒数をD、V = ceil(min(入力動画の合計秒数, 30))とします。入力動画がある場合、料金 = 単価 × (D + max(D, V))です。720p、出力5秒、入力8.2秒の場合はV=9、料金は$1.316、事前の請求額は131.60クレジットになります。

1 USD = 100 Namiクレジット。合計を0.01クレジット単位で切り上げます:クレジット = ceil(USD料金 × 10000) / 100。通常料金を使用し、期間限定割引は適用しません。

この式では、画像、参照音声、アスペクト比、元音声の保持設定に個別の追加料金はありません。

MaaS へのマッピング

images、videos、audiosはMaaSでもURL配列です。videosを単一文字列として送信しないでください。 その他の記載フィールドはMaaSでも同名です。durationは整数、対応するAPIのkeep_original_soundはブール値で送信します。配列の順序は維持されます。

Nami API

Authorization: Bearer YOUR_NAMI_API_KEY と Content-Type: application/json を指定し、次のURLへPOSTします。

https://www.namifusion.com/api/v1/marketplace/run/kwaivgi/kling-v4.0/reference-to-video

リクエスト本文の例:

{
  "input": {
    "prompt": "Use the person from @Image1, follow the camera movement of @Video1, and use @Audio1 as the voice reference. The person greets the viewer in a quiet studio.",
    "images": [
      "https://example.com/person.jpg"
    ],
    "videos": [
      "https://example.com/camera-reference.mp4"
    ],
    "audios": [
      "https://example.com/voice-reference.mp3"
    ],
    "keep_original_sound": false,
    "resolution": "720p",
    "duration": 5,
    "aspect_ratio": "auto"
  }
}

example.com のURLは公開アクセス可能な素材URLに置き換えてください。返されたtask_uuidを使い、同じ認証で GET https://www.namifusion.com/api/v1/marketplace/run/tasks/{task_uuid} をポーリングします。成功後、生成された動画URLの配列を output.videos から取得します。

関連モデル

xAI Grok Imagine Video v1.5 参照画像から動画
参照画像から動画X Ai

xAI Grok Imagine Video v1.5 参照画像から動画

プロンプトと1-7枚の参照画像から1-15秒の動画を生成します。480pと720pに対応しています。

〜 $0.850 / 1 回
Vidu Q4 Preview 参照から動画
参照画像から動画Vidu

Vidu Q4 Preview 参照から動画

プロンプトから3〜16秒の動画を生成します。参照画像は最大15枚、参照音声は最大3件まで任意で指定でき、アスペクト比選択、音声生成、540p〜4kに対応します。

〜 $0.475 / 1 回
MiniMax H3 参照画像から動画生成
参照画像から動画Minimax

MiniMax H3 参照画像から動画生成

MiniMax H3 Reference to Video は、自然言語のプロンプトと画像・動画・音声を含むマルチモーダルな参照情報から、一貫性のある 2K 動画を生成します。被写体の一貫性、モーション、タイミング、ビジュアルスタイル、シーンの連続性をコントロールできます。すぐに使える REST 推論 API を提供し、高性能・コールドスタートなし・手頃な価格で利用できます。

〜 $0.650 / 1 回
MiniMax H3 Singularity 参照動画生成 LoRA
参照画像から動画Minimax H3 Singularity

MiniMax H3 Singularity 参照動画生成 LoRA

ネイティブステレオ音声付き動画。3–15 秒、4 段階の解像度に対応。カスタム LoRA 対応。

〜 $0.300 / 1 回
MiniMax H3 Singularity 参照動画生成
参照画像から動画Minimax H3 Singularity

MiniMax H3 Singularity 参照動画生成

ネイティブステレオ音声付き動画。3–15 秒、4 段階の解像度に対応。

〜 $0.250 / 1 回
Gemini Omni Flash 参照画像から動画生成 API
参照画像から動画Google

Gemini Omni Flash 参照画像から動画生成 API

Gemini Omni Flash 参照画像から動画生成は、1枚以上の参照画像とテキストのプロンプトから、音声が同期した短い AI 動画を生成します。視覚的な一貫性を保ちながら、提供された参照内容に従ってガイド付きのマルチモーダル動画生成を行います。すぐに使える REST 推論 API、高性能、コールドスタートなし、手頃な価格。

〜 $1.28 / 1 回
Seedance 2.0 Mini 参照生成動画
参照画像から動画Doubao

Seedance 2.0 Mini 参照生成動画

Seedance 2.0 Mini Reference-to-Video(リファレンス画像指定動画生成)は、ByteDance(バイトダンス)が開発した、シネマティックなマルチショット動画の作成に最適な、高速かつ低コストな動画生成モデルです。参考画像とテキストプロンプトを高度に融合させ、ストーリー性豊かな動画セグメントを生成します。AIによる柔軟なカメラワーク制御に対応しているだけでなく、異なるシーン間でのキャラクターの同一性を維持するという課題もクリアしています。480Pから4Kまでのマルチ解像度出力、4〜15秒の動画長、そして自由なアスペクト比をサポート。すぐに使えるREST推論APIが提供されており、コールドスタートなしの圧倒的なパフォーマンスを圧倒的なコストパフォーマンスで実現します。

〜 $0.3591 / 1 回
Seedance 2.5 参照画像/動画から動画生成
参照画像から動画Doubao

Seedance 2.5 参照画像/動画から動画生成

Seedance 2.5の「リファレンス動画生成」機能は、ビジュアルの統一性を保つ究極のソリューションです。参考素材からアートスタイル、ライティング、構図の意図を正確に抽出。新しく生成される動画に完璧に融合させ、シリーズ作品を通して一貫した世界観を維持します。

〜 $0.6565 / 1 回