動画
kling-3.0-turbo API
Modelflare 非同期ビデオ ルーティングを通じて正確な kling-3.0-turbo モデル ID を使用します。
正確なモデル ID kling-3.0-turbo を使用します。モデル フィールドはこのページと正確に一致する必要があります。
パラメータ: duration=5resolution=1080pratio=16:9
プロンプト: A skateboarder launches a kickflip over a concrete stair set in a skate park at golden hour. Low-angle slow-motion tracking shot, the board spins under his feet, dust and sunlight flare, he lands and rolls past the camera. Realistic physics, cinematic sports film, no text.
{ "model": "kling-3.0-turbo", "prompt": "A skateboarder launches a kickflip over a concrete stair set in a skate park at golden hour. Low-angle slow-motion tracking shot, the board spins under his feet, dust and sunlight flare, he lands and rolls past the camera. Realistic physics, cinematic sports film, no text.", "seconds": "5", "duration": 5, "resolution": "1080p", "ratio": "16:9", "aspect_ratio": "16:9"}認証とエンドポイント
Section titled “認証とエンドポイント”https://modelflare.dev/v1 で Modelflare API キーを使用します。ゲートウェイのエントリ ポイントは POST /v1/videos です。
Authorization: Bearer YOUR_MODELFLARE_API_KEYタスクの作成
Section titled “タスクの作成”curl https://modelflare.dev/v1/videos \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "kling-3.0-turbo", "prompt": "A white cat runs through a neon-lit street in the rain, cinematic tracking shot", "settings": {"duration": 5, "resolution": "720p"} }'ポーリングとダウンロード
Section titled “ポーリングとダウンロード”タスクIDを保存します。 GET /v1/videos/{task_id} をポーリングし、GET /v1/videos/{task_id}/content でダウンロードします。結果 URL は有効期限が切れている可能性があるため、速やかにファイルを転送してください。
curl https://modelflare.dev/v1/videos/TASK_ID \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY"リクエストメモ
Section titled “リクエストメモ”Kling は、ファミリー固有の model_name、prompt、mode、duration、image_list、または contents / settings フィールドを使用します。ネイティブ JSON が保存され、転送されます。
リクエストパラメータ
Section titled “リクエストパラメータ”Kling 3.0 Turbo は URL パス内のモデルを選択します。ボディにmodel_nameを入れないでください。テキストからビデオへの変換と最初のフレームの画像からビデオへの変換では、異なる公式パスが使用されます。
| フィールド | 必須 | 注意事項 |
|---|---|---|
prompt |
はい | テキストからビデオへのプロンプト。公式の長さ制限を使用する |
contents[] |
条件付き | 画像からビデオへの変換には、prompt と first_frame を含めます。 |
settings.resolution |
いいえ | 720p / 1080p |
settings.aspect_ratio |
いいえ | 16:9 / 9:16 / 1:1 |
settings.duration |
いいえ | 3~15秒 |
options.watermark_info |
いいえ | ウォーターマーク設定 |
テキストからビデオへの変換と最初のフレームの画像からビデオへの変換では、それぞれ prompt と contents[] が使用されます。出力は 3 ~ 15 秒間 720p または 1080p です。マルチショット プロンプトは最大 6 つのショットをサポートします。
文書化されたワークフローの例
Section titled “文書化されたワークフローの例”Turbo は、アップグレードされた contents/settings/options エンベロープを使用します。モデル ID は Modelflare の model フィールドに残り、呼び出しは /v1/videos を介して入力されます。
curl https://modelflare.dev/v1/videos \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "kling-3.0-turbo", "contents": [{"type": "prompt", "text": "列车缓慢驶过雨夜城市"}], "settings": {"resolution": "1080p", "aspect_ratio": "16:9", "duration": 5}, "options": {"watermark_info": {"enabled": false}} }'curl https://modelflare.dev/v1/videos \ -H "Authorization: Bearer YOUR_MODELFLARE_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "kling-3.0-turbo", "contents": [{"type": "prompt", "text": "角色转身看向窗外"}, {"type": "first_frame", "url": "https://example.com/first.png"}], "settings": {"resolution": "1080p", "duration": 5} }'エラーと失敗したタスク
Section titled “エラーと失敗したタスク”無効なモデル パラメーターは、リクエスト ID を含む 4xx を返します。非同期タスクは、作成が成功した後に失敗することもあります。ポーリング応答からの error_code と error_message を最終タスク理由として使用します。異なる JSON 形式で同じリクエストを再試行しないでください。
サポート範囲
Section titled “サポート範囲”このページでは、Modelflare モデルの生成と編集呼び出しについて説明します。検索またはマップのエンリッチメント、音声管理、および要素ライブラリ管理は、このパブリック モデル呼び出しサーフェスの外部にあるリソース API であり、必須のリクエスト フィールドではありません。
価格設定と請求
Section titled “価格設定と請求”動画秒単位課金モデルです。現在の顧客価格、参考定価、完全な仕様については、モデル価格ページを参照してください。
メディア契約 · v1
公式ソース: Kuaishou Kling
契約パラメータ
| インテントフィールド | コントロール | オプション |
|---|---|---|
ratio | select | 16:9 / 9:16 / 1:1 |
resolution | select | 720p / 1080p |
duration | select | 3 / 5 / 8 / 10 / 15 |
サポートされる機能
allowed_values·ratio· 16:9, 9:16, 1:1allowed_values·resolution· 720p, 1080pallowed_values·duration· 3, 5, 8, 10, 15max_assets·reference_asset_ids· 1
構造化リクエストの例
text
インテント
{
"duration": 3,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"ratio": "16:9",
"resolution": "720p"
}プロバイダーリクエスト
{
"contents": [
{
"text": "A red paper kite over a quiet harbour at dusk.",
"type": "prompt"
}
],
"settings": {
"aspect_ratio": "16:9",
"duration": 3,
"resolution": "720p"
}
}reference
インテント
{
"duration": 3,
"prompt": "A red paper kite over a quiet harbour at dusk.",
"ratio": "16:9",
"resolution": "720p"
}プロバイダーリクエスト
{
"contents": [
{
"text": "A red paper kite over a quiet harbour at dusk.",
"type": "prompt"
},
{
"type": "first_frame",
"url": "https://example.com/reference.png"
}
],
"settings": {
"aspect_ratio": "16:9",
"duration": 3,
"resolution": "720p"
}
}