curl --request POST \
--url https://api.omniall.ai/v1/videos \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kling-2.6",
"prompt": "赛博朋克城市夜景,镜头慢慢推进",
"seconds": "5",
"metadata": {
"output_config": {
"resolution": "720P",
"aspect_ratio": "16:9"
}
}
}
'{
"id": "task_xxxxxxxx",
"task_id": "task_xxxxxxxx",
"object": "video",
"model": "kling-2.5-720p",
"status": "queued",
"progress": 0,
"created_at": 1780891541
}快手可灵
创建视频
创建 Kling 视频任务。
路径: POST https://api.omniall.ai/v1/videos
文生 / 图生判定:存在 image / images / input_reference / metadata.last_frame_* / 参考视频等 → 图生;否则 → 文生。
鉴权:Authorization: Bearer sk-...
POST
/
v1
/
videos
curl --request POST \
--url https://api.omniall.ai/v1/videos \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kling-2.6",
"prompt": "赛博朋克城市夜景,镜头慢慢推进",
"seconds": "5",
"metadata": {
"output_config": {
"resolution": "720P",
"aspect_ratio": "16:9"
}
}
}
'{
"id": "task_xxxxxxxx",
"task_id": "task_xxxxxxxx",
"object": "video",
"model": "kling-2.5-720p",
"status": "queued",
"progress": 0,
"created_at": 1780891541
}请求头
Bearer API Key,例如 Bearer sk-...。
示例:
"Bearer sk-..."
请求体
application/json
Kling 创建视频请求体。
模型别名(大小写不敏感)。生成:kling-1.0 … kling-3.0-omni、kling-o1。专用: kling-identify-face、kling-avatar-720p、kling-avatar-1080p。
示例:
"kling-2.5"
文本提示词(多数场景必填)。
视频时长(秒)字符串,如 "5"、"10"。时长优先级最高。
示例:
"5"
时长(秒);与顶层 seconds 同时存在时 seconds 优先。
尺寸快捷写法,如 720x1280、720P、1080P,可隐含分辨率与宽高比。
示例:
"720x1280"
单张参考图 URL。
多张参考图 URL(最多 3 张)。Omni 有参考计费请优先用 images。
Maximum array length:
3参考图 URL(类似 image)。
动作控制时可传 pro 表示 Pro 档位。
示例:
"pro"
OpenAI 风格多模态内容;网关从 type=text 提取文本。
Show child attributes
Show child attributes
Kling 扩展参数。
Show child attributes
Show child attributes
响应
200 - application/json
任务已受理