Kling Video O3 API
快手 Kling Video O3 模型完整 API 参考文档。
模型版本
此 API 支持八种模型版本:
快速对比
支持的宽高比
16:9, 9:16, 1:1
Kling Video O3 文本生成视频(Std & Pro)
接口地址
POST /api/v1/video/task
请求参数
必填
可选
@ (AT) 引用占位符
@ (AT) 引用功能通过带编号的 <<<...>>> 占位符将参考媒体关联到提示词。图像编号从 1 开始,并遵循 images 数组的顺序。由于该模型接受一个参考视频 URL,<<<video_1>>> 引用 video_url。
请求示例
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-video-o3-std-text-to-video',
prompt: 'A drone flying over a mountain range at sunrise',
duration: 5,
aspect_ratio: '16:9'
})
});
const { data } = await response.json();
const taskId = data.task_id;
Kling Video O3 图像转视频(Std & Pro)
请求参数
必填
可选
请求示例
{
model_name: 'kling-video-o3-pro-image-to-video',
image_url: 'https://example.com/image.jpg',
prompt: 'Camera slowly pulls back revealing the landscape',
duration: 5,
image_end_url: 'https://example.com/end-frame.jpg'
}
Kling Video O3 参考引导视频(Std & Pro)
请求参数
必填
可选参数
请求示例
{
model_name: 'kling-video-o3-std-reference-to-video',
video_url: 'https://example.com/source.mp4',
images: ['https://example.com/reference-a.jpg', 'https://example.com/reference-b.jpg'],
prompt: 'Character walking through a forest',
duration: 8,
aspect_ratio: '16:9',
keep_original_sound: true
}
Kling Video O3 视频编辑(Std & Pro)
请求参数
必填
可选参数
请求示例
{
model_name: 'kling-video-o3-pro-video-edit',
video_url: 'https://example.com/source.mp4',
duration: 5,
images: ['https://example.com/ref.jpg'],
prompt: 'Add falling snow throughout the scene',
keep_original_sound: true
}
@ (AT) 参考视频生成请求示例
{
model_name: 'kling-video-o3-std-reference-to-video',
video_url: 'https://example.com/motion-reference.mp4',
images: [
'https://example.com/athlete-reference.jpg',
'https://example.com/uniform-reference.jpg'
],
prompt: 'Make the athlete from <<<image_1>>> follow the motion in <<<video_1>>> while preserving the uniform details from <<<image_2>>>',
duration: 8,
aspect_ratio: '16:9',
keep_original_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/{taskId} 轮询查询状态:
{
"code": 0,
"message": "success",
"data": {
"task_id": "{task_id}",
"response_url": "https://api.flaq.ai/api/v1/video/{task_id}",
"task_status": "succeed",
"task_status_msg": null,
"task_result": {
"videos": [
{
"url": "https://example.com/generated-video.mp4"
}
]
}
}
}
状态值
submitted:任务已提交,等待处理
processing:视频生成中
succeed:视频生成完成
failed:视频生成失败
处理时长
- Standard:2-5 分钟
- Pro:3-8 分钟
最佳实践
- 版本选择:迭代阶段使用 Std,最终输出使用 Pro
- 运动描述:包含具体的镜头与主体运动细节
- 参考输入:使用清晰、高质量的参考图或参考视频以保持角色一致性
- 视频编辑提示词:明确指出修改内容,同时保留原始画面