コンテンツにスキップ
オープンキャスタリーコンソール

動画

kling-2.6 API

Modelflare 非同期ビデオ ルーティングを通じて正確な kling-2.6 モデル ID を使用します。

正確なモデル ID kling-2.6 を使用します。モデル フィールドはこのページと正確に一致する必要があります。

サンプル出力kling-2.6POST /v1/videos5.0s

パラメータ: duration=5resolution=1080pratio=16:9

プロンプト: One continuous take, no cuts. An automatic car wash bay, brushes stopped mid-turn, foam sliding down the glass. A figure in a translucent PVC raincoat steps into the bay and the foam stops being foam: it sets into iridescent shells that peel off the car and the walls and drift up around the coat, each one catching a different colour. The camera pushes in slowly through the bay and rotates around the figure as the shells rise. One hard magenta wash light from the far end, cold blue daylight at the entrance. Real weight and inertia, soap and water still running, no text.

このサンプルを作成したリクエスト
{
"model": "kling-2.6",
"prompt": "One continuous take, no cuts. An automatic car wash bay, brushes stopped mid-turn, foam sliding down the glass. A figure in a translucent PVC raincoat steps into the bay and the foam stops being foam: it sets into iridescent shells that peel off the car and the walls and drift up around the coat, each one catching a different colour. The camera pushes in slowly through the bay and rotates around the figure as the shells rise. One hard magenta wash light from the far end, cold blue daylight at the entrance. Real weight and inertia, soap and water still running, no text.",
"seconds": "5",
"duration": 5,
"resolution": "1080p",
"ratio": "16:9",
"aspect_ratio": "16:9"
}

https://modelflare.dev/v1 で Modelflare API キーを使用します。ゲートウェイのエントリ ポイントは POST /v1/videos です。

HTTP
Authorization: Bearer YOUR_MODELFLARE_API_KEY
ターミナルウィンドウbash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_name": "kling-2.6",
"prompt": "A white cat runs through a neon-lit street in the rain, cinematic tracking shot",
"duration": "5", "mode": "std"
}'

タスクIDを保存します。 GET /v1/videos/{task_id} をポーリングし、GET /v1/videos/{task_id}/content でダウンロードします。結果 URL は有効期限が切れている可能性があるため、速やかにファイルを転送してください。

ターミナルウィンドウbash
curl https://modelflare.dev/v1/videos/TASK_ID \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"

Kling は、ファミリー固有の model_name、prompt、mode、duration、image_list、または contents / settings フィールドを使用します。ネイティブ JSON が保存され、転送されます。

Kling Legacy は、text2video / image2video リクエスト構造で model_name を使用します。モード、解像度、オーディオレーンについては、モデルの公式ページと価格ページを確認してください。

フィールド 必須 注意事項
model_name はい kling-2.6
prompt 条件付き テキストからビデオへの変換には必須。画像とビデオを結合する
image 条件付き 先頭フレーム画像URLまたはBase64
image_tail いいえ オプションの終了フレーム画像
video_url 条件付き Kling 3.0 モーション コントロールの参考ビデオ
image_list いいえ Omni/O1 およびマルチモーダル ワークフローのイメージ リスト
negative_prompt いいえ 否定プロンプト
mode いいえ std / pro / 4k (機種依存)
duration いいえ 5 / 10(字符串)
multi_shot いいえ マルチショットのストーリーボードを有効にする
sound いいえ サポートされている場合は同期サウンドを生成します
camera_control いいえ カメラ制御がサポートされている場合

Kling 2.6 は、固定長 5/10 秒、720p/1080p、16:9/9:16/1:1、画像からビデオへの変換、ネイティブ オーディオ、およびモーション コントロールを備えたレガシー API を使用します。 soundはon/offを受け付けます。

文書化されたワークフローの例

Section titled “文書化されたワークフローの例”

レガシー モデルは、ワークフローによって model_name、最初/終了フレーム、またはモーション コントロール フィールドを選択します。固定期間と音声制限は、このページの表に従います。

ターミナルウィンドウbash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_name": "kling-2.6", "prompt": "一只狗在海边奔跑",
"duration": "5", "mode": "pro", "aspect_ratio": "16:9", "sound": "on"
}'

無効なモデル パラメーターは、リクエスト ID を含む 4xx を返します。非同期タスクは、作成が成功した後に失敗することもあります。ポーリング応答からの error_code と error_message を最終タスク理由として使用します。異なる JSON 形式で同じリクエストを再試行しないでください。

このページでは、Modelflare モデルの生成と編集呼び出しについて説明します。検索またはマップのエンリッチメント、音声管理、および要素ライブラリ管理は、このパブリック モデル呼び出しサーフェスの外部にあるリソース API であり、必須のリクエスト フィールドではありません。

動画秒単位課金モデルです。現在の顧客価格、参考定価、完全な仕様については、モデル価格ページを参照してください。

メディア契約 · v1

契約ID: media.kling-2-6.v1アダプター: video.kling.legacy.v1@v1指紋: b53fa35546d2b5028a69146a031a053d852003d673d1b7a334d8b124997101cc

公式ソース: Kuaishou Kling

契約パラメータ

インテントフィールドコントロールオプション
ratioselect16:9 / 9:16 / 1:1
resolutionselect720p / 1080p
durationselect5 / 10
audioswitch—

サポートされる機能

  • allowed_values · ratio · 16:9, 9:16, 1:1
  • allowed_values · resolution · 720p, 1080p
  • allowed_values · duration · 5, 10
  • max_assets · reference_asset_ids · 2

構造化リクエストの例

text

インテント

{
  "audio": false,
  "duration": 5,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "720p"
}

プロバイダーリクエスト

{
  "aspect_ratio": "16:9",
  "duration": "5",
  "mode": "std",
  "model_name": "kling-2.6",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "sound": "off"
}

reference

インテント

{
  "audio": false,
  "duration": 5,
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "ratio": "16:9",
  "resolution": "720p"
}

プロバイダーリクエスト

{
  "aspect_ratio": "16:9",
  "duration": "5",
  "image": "https://example.com/reference.png",
  "mode": "std",
  "model_name": "kling-2.6",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "sound": "off"
}