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

動画

kling-o1 API

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

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

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

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

プロンプト: One continuous take, no cuts. A long subway escalator at night, tiled tunnel, nobody else on it. A figure in an oversized violet coat rides down with one hand on the rail; where the hand passes, the handrail stops being rubber and becomes a running river of liquid mercury that keeps flowing down both sides and pools at the bottom of the shaft, throwing the tunnel lights back as broken silver. The camera descends ahead of the figure, facing back up the escalator, and tilts down as the mercury reaches the floor. One hard cold key from the tunnel strip lights, a warm amber glow rising from the pool. Real weight and inertia, metal surface tension, no text.

このサンプルを作成したリクエスト
{
"model": "kling-o1",
"prompt": "One continuous take, no cuts. A long subway escalator at night, tiled tunnel, nobody else on it. A figure in an oversized violet coat rides down with one hand on the rail; where the hand passes, the handrail stops being rubber and becomes a running river of liquid mercury that keeps flowing down both sides and pools at the bottom of the shaft, throwing the tunnel lights back as broken silver. The camera descends ahead of the figure, facing back up the escalator, and tilts down as the mercury reaches the floor. One hard cold key from the tunnel strip lights, a warm amber glow rising from the pool. Real weight and inertia, metal surface tension, 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-o1",
"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 Omni/O1 は、model_name、prompt、およびメディア リストを使用します。 image_list、video_list、element_list、multi_shot、soundを組み合わせる場合は、各モデルの公式制約に従ってください。

フィールド 必須 注意事項
model_name はい kling-o1
prompt 条件付き マルチショット無効時に必須
mode いいえ std / pro
aspect_ratio 条件付き 16:9 / 9:16 / 1:1
duration いいえ 3~15秒(文字列)
image_list いいえ 最初/最後のフレーム、シーン、またはスタイルの参照。 Omni/O1 では、モデル制限内で複数の項目を許可します
video_list いいえ ビデオ編集またはスタイルのリファレンス
element_list いいえ Kling 要素 ID。この統合では要素管理は提供されません
multi_shot いいえ マルチショットのストーリーボードを有効にする
sound いいえ 同期音を発生するかどうか

O1 は、720p/1080p、3 ~ 10 秒、および画像/ビデオ/要素の参照をサポートします。 video_list が存在する場合は sound をオフに設定します。 4kやマルチショットには対応しておりません。

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

Section titled “文書化されたワークフローの例”
ターミナルウィンドウbash
curl https://modelflare.dev/v1/videos \
-H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model_name": "kling-o1",
"prompt": "让图 1 中的人物在雨中向镜头挥手",
"image_list": [{"image_url": "https://example.com/character.png"}],
"duration": "5", "mode": "pro", "aspect_ratio": "16:9", "sound": "off"
}'

参照ビデオ、要素、およびマルチショットの組み合わせは、このページの制限に従う必要があります。参照映像がある場合はsoundをオフにしてください。

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

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

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

メディア契約 · v1

契約ID: media.kling-o1.v1アダプター: video.kling.omni.v1@v1指紋: 64a427a3f22b5fe4674625e1d0b00f331fc9e2fcc37837e604944c682ec00002

公式ソース: Kuaishou Kling

契約パラメータ

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

サポートされる機能

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

構造化リクエストの例

text

インテント

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

プロバイダーリクエスト

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

reference

インテント

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

プロバイダーリクエスト

{
  "aspect_ratio": "16:9",
  "duration": "3",
  "image_list": [
    {
      "image_url": "https://example.com/reference.png"
    }
  ],
  "mode": "std",
  "model_name": "kling-o1",
  "prompt": "A red paper kite over a quiet harbour at dusk.",
  "sound": "off"
}