接口调用视频模型
可灵 3.0 Omni
可灵 3.0 全能版,文生视频与图生视频的参数和示例。
可灵 3.0 全能版,支持文生视频、首帧 / 首尾帧图生视频,可同步生成音频。
请求参数
Authorizationstring必填
Bearer YOUR_API_KEY,在 控制台的 API 密钥页 创建。
modelstring必填
kling-3.0-omni
promptstring
画面与运动描述。文生视频必填;图生视频可选。
secondsinteger默认 5
时长:3–15 秒的整数,默认 5。
resolutionstring默认 720P
720P 或 1080P。
aspect_ratiostring
16:9、9:16、1:1。只对文生视频生效;图生视频的比例跟随首帧图片。
audioboolean默认 false
是否同步生成音频。支持,720P 和 1080P 都可以。
input_referencestring | string[]
首帧图片的公网 URL。传两张时,第一张为首帧,第二张为尾帧。
negative_promptstring
不希望出现的内容。
seedinteger
随机种子。
示例:文生视频
curl https://modelrouter.club/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-3.0-omni",
"prompt": "清晨的海边,一只柯基在沙滩上奔跑,镜头缓慢跟随",
"seconds": 5,
"resolution": "720P",
"aspect_ratio": "16:9"
}'示例:首尾帧图生视频
curl https://modelrouter.club/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-3.0-omni",
"prompt": "花朵从含苞到完全绽放",
"seconds": 5,
"input_reference": [
"https://example.com/first.jpg",
"https://example.com/last.jpg"
]
}'响应
提交成功后返回任务对象(示例结构):
{
"id": "task_xxxxxxxx",
"object": "video",
"status": "queued",
"progress": 0
}拿到 id 后,按 视频通用说明 查询进度并下载视频。
计费
按秒计费,按分辨率(720P / 1080P)和是否有声分档。提交时按请求的时长和分辨率预扣,任务失败自动全额退回。
注意
- 首帧、尾帧只接受公网可访问的
http(s)图片 URL,不支持上传文件或 Base64。 - 视频约 7 天内可以下载,过期后返回
410 artifact_gone,请及时下载转存。