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/v2.1/standard/image-to-video",
"input": {
"prompt": "A quiet forest under soft morning light, with natural detail.",
"start_image_url": "https://example.com/image.png",
"duration": 5
}
}
'{
"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 2.1 图生视频
Kling 2.1 Standard 图生视频,首帧必填。
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/v2.1/standard/image-to-video",
"input": {
"prompt": "A quiet forest under soft morning light, with natural detail.",
"start_image_url": "https://example.com/image.png",
"duration": 5
}
}
'{
"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/v2.1/standard/image-to-video - 根据图像输入生成视频。
功能
- 根据图像输入生成视频。
- 用
start_image_url提供首帧。 - 如需可选的尾帧,请使用 Pro 接口。
时长选项
- 5、10 秒 -
duration设为整数。可选。省略时默认为 5 秒。字符串、布尔值、null 和小数值会被拒绝。
高级参数
model 和可选的 callback_url 放在请求根级。所有工作流程参数(包括输出选项)都放在 input 中。
只发送该工作流程支持的 input 字段。不支持的 input 字段会在扣除积分前被拒绝。输入 URL 必须使用 HTTP(S)、包含主机名,且不含内嵌凭据。
提示词
prompt:必填。描述场景和期望的动作。长度:1-5,000 个字符。- 值必须是字符串,且去除首尾空白后不能为空。非字符串值会被拒绝。
首帧图像 URL
start_image_url:必填。提供首帧 URL。使用公开可访问的 HTTP(S) URL,不含凭据或空白字符。空 URL 和 null 会被拒绝。
负面提示词
negative_prompt:可选。描述需要避免的内容。
计费因素
按视频计费,取决于所选模型档位(Standard 或 Pro)和视频时长(duration)。
提交时扣除积分,任务失败时退还。授权
使用 VIDGO_API_KEY。
请求体
application/json