Kling 3.0 Turbo API
快手 Kling 3.0 Turbo 影片生成模型的完整 API 參考。
模型變體
此 API 支援兩種模型變體:
快速比較
支援的長寬比(Text to Video)
Kling 3.0 Turbo Text to Video
端點
POST /api/v1/video/task
請求參數
必需
可選
請求範例
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: '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
}
回應格式
提交回應:
{
"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。
最佳實務
- 讓提示詞聚焦於動作、鏡頭行為和場景氛圍。
- 對於圖像生成影片,請使用主體清楚、乾淨的首影格圖像。
- 使用較短時長進行更快迭代,然後為最終渲染增加時長。