curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kwaivgi/kling-video/v1.6/pro/image-to-video",
"input": {
"prompt": "A quiet forest in morning light, with a slow camera pan.",
"duration": 5,
"start_image_url": "https://example.com/start-frame.png"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-example",
"status": "running",
"created_time": "2026-09-10T08:00:00"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Request timeout{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Kling
Kling 1.6 Pro 图生视频
Kling 1.6 Pro 图生视频的参数与计费因素。
POST
/
api
/
generate
/
submit
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kwaivgi/kling-video/v1.6/pro/image-to-video",
"input": {
"prompt": "A quiet forest in morning light, with a slow camera pan.",
"duration": 5,
"start_image_url": "https://example.com/start-frame.png"
}
}
'{
"code": 200,
"data": {
"task_id": "task-unified-example",
"status": "running",
"created_time": "2026-09-10T08:00:00"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Request timeout{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
kwaivgi/kling-video/v1.6/pro/image-to-video。
输入模式
二选一:提供start_image_url 进行首帧动画,或提供 image_urls 使用 Elements。该接口不接受纯文本请求。
- Elements 接受 1–4 张参考图,不能与
start_image_url、end_image_url或cfg_scale组合使用。 - 提供
start_image_url时,Pro 支持可选的end_image_url;两种工作流程都支持宽高比。
参数
生成参数放在input 中。model 和可选的 callback_url 保留在请求根级。不支持的 input 字段会在扣除积分前被拒绝。
| 参数 | 要求 | 说明 |
|---|---|---|
prompt | 必填 | 必填的非空字符串,去除首尾空白后最多 2,500 个 Unicode 字符。 |
duration | 必填 | 必填整数:5 或 10 秒。无 API 默认值。 |
aspect_ratio | 可选 | 可选:1:1、16:9 或 9:16。无 API 默认值。 |
negative_prompt | 可选 | 可选字符串,最多 2,500 个 Unicode 字符。 |
cfg_scale | 可选 | 可选,0 到 1 之间的有限数值。不支持与 image_urls 一起使用。无 API 默认值。 |
start_image_url | 条件必填 | 首帧 HTTP(S) URL。首帧工作流程必填;与 image_urls 互斥。 |
end_image_url | 可选 | 可选的 Pro 尾帧 HTTP(S) URL。需要同时提供 start_image_url;不支持与 image_urls 一起使用。 |
image_urls | 条件必填 | Elements:1 到 4 个 HTTP(S) 参考 URL。与 start_image_url、end_image_url 和 cfg_scale 互斥。 |
计费因素
计费取决于所选模型档位(Standard 或 Pro)和视频时长(duration),按生成的秒数计费。同一档位内,文生视频、首帧动画和 Elements 费率相同。
提交时扣除积分,任务失败时退还。授权
使用 VIDGO_API_KEY。
请求体
application/json
model 和 callback_url 放在根级。未知的根级字段会被忽略;不支持的 input 字段会被拒绝。