# Kling 3.0 Turbo API 快手 Kling 3.0 Turbo 视频生成模型的完整 API 参考。 ## 模型变体 此 API 支持两种模型变体: | 模型 | 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`。 ## 最佳实践 - 让提示词聚焦于动作、镜头行为和场景氛围。 - 对于图像生成视频,请使用主体清晰、干净的首帧图像。 - 使用较短时长进行更快迭代,然后为最终渲染增加时长。