# Kling 3.0 Turbo API Kuaishou による Kling 3.0 Turbo 動画生成モデルの完全な API リファレンスです。 ## モデルバリアント この API は 2 つのモデルバリアントをサポートします。 | モデル | ID | 説明 | |-------|-----|-------------| | **Kling 3.0 Turbo Text to Video** | `kling-3.0-turbo-text-to-video` | 高速なテキストから動画生成 | | **Kling 3.0 Turbo Image to Video** | `kling-3.0-turbo-image-to-video` | 高速な画像から動画アニメーション生成 | ## クイック比較 | 機能 | Text to Video | Image to Video | |---------|---------------|----------------| | 入力 | テキストプロンプト | 画像 + テキストプロンプト | | 長さの範囲 | 3-15 秒 | 3-15 秒 | | 解像度オプション | 720p、1080p | 720p、1080p | | アスペクト比 | 16:9、9:16、1:1 | 非対応(ソース依存) | | 開始フレーム | 非対応 | 必須 | ### 対応アスペクト比(Text to Video) | 比率 | 説明 | |-------|-------------| | `16:9` | 横向き(ワイドスクリーン) | | `9:16` | 縦向き(縦長) | | `1:1` | 正方形 | ## Kling 3.0 Turbo Text to Video ### エンドポイント ``` POST /api/v1/video/task ``` ### リクエストパラメータ #### 必須 | パラメータ | 型 | 説明 | |-----------|------|-------------| | `model_name` | string | `"kling-3.0-turbo-text-to-video"` である必要があります | | `prompt` | string | 動画生成プロンプト | | `resolution` | string | 出力解像度: `"720p"` または `"1080p"` | | `duration` | number | 動画の長さ(秒、3-15) | #### 任意 | パラメータ | 型 | 説明 | |-----------|------|-------------| | `aspect_ratio` | string | 動画のアスペクト比: `"16:9"`、`"9:16"`、または `"1:1"`。デフォルトは `"16:9"` | | `sound` | boolean | 動画の環境音を生成します | ### リクエスト例 ```javascript const response = await fetch('https://api.flaq.ai/api/v1/video/task', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ model_name: 'kling-3.0-turbo-text-to-video', prompt: 'A girl sits on a train, looking out the window with a melancholic expression, cinematic lighting', aspect_ratio: '16:9', resolution: '720p', duration: 5, sound: true }) }); const { data } = await response.json(); const taskId = data.task_id; ``` ## Kling 3.0 Turbo Image to Video ### リクエストパラメータ #### 必須 | パラメータ | 型 | 説明 | |-----------|------|-------------| | `model_name` | string | `"kling-3.0-turbo-image-to-video"` である必要があります | | `prompt` | string | モーションとシーンのプロンプト | | `image_url` | string | 最初のフレーム画像 URL | | `resolution` | string | 出力解像度: `"720p"` または `"1080p"` | | `duration` | number | 動画の長さ(秒、3-15) | #### 任意 | パラメータ | 型 | 説明 | |-----------|------|-------------| | `sound` | boolean | 動画の環境音を生成します | ### リクエスト例 ```javascript { model_name: 'kling-3.0-turbo-image-to-video', prompt: 'The character slowly turns her head and looks out the window, subtle camera movement', image_url: 'https://example.com/test-first-frame.png', resolution: '720p', duration: 5, sound: true } ``` ## レスポンス形式 送信レスポンス: ```json { "code": 0, "message": "success", "data": { "task_id": "{task_id}", "response_url": "https://api.flaq.ai/api/v1/video/{task_id}", "task_status": "submitted" } } ``` `GET /api/v1/video/{task_id}` でポーリングします。タスクステータス: `submitted`、`processing`、`succeed`、`failed`。 ## ベストプラクティス - プロンプトはモーション、カメラの動き、シーンの雰囲気に集中させます。 - 画像から動画生成では、被写体が明確でクリーンな最初のフレーム画像を使用します。 - すばやく反復するには短い長さを使い、最終レンダリングでは長さを増やします。