跳转到主要内容
POST
/
kyyAiPower
/
v1
/
veo
/
videos
curl --request POST \
  --url https://zcbservice.aizfw.cn/kyyAiPower/v1/veo/videos \
  --header 'Authorization: Bearer {{key}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "veo3.1-fast",
    "prompt": "A cat dancing in the rain, cinematic style",
    "aspect_ratio": "16:9",
    "seconds": 8,
    "input_reference": [
      "https://example.com/reference1.jpg",
      "https://example.com/reference2.jpg"
    ]
  }'
{
  "id": "vgen_abc123def456",
  "object": "video.generation",
  "created": 1761635478,
  "model": "veo3.1-fast",
  "status": "queued"
}

VEO 创建视频任务

使用 VEO 的先进 AI 模型创建高质量视频生成任务,支持两种图片引导模式。

认证

所有请求都需要在请求头中包含 Bearer token:
Authorization: Bearer {{key}}

请求参数

model
string
模型名称,默认为 veo3.1-fast可选值:
  • veo3.1-fast - 快速生成模型
prompt
string
必填
视频生成提示词,描述所需的视频内容示例:"A cat dancing in the rain, cinematic style"
size
string
视频尺寸,默认为 1280x720可选值:
  • 1280x720 - 横屏
  • 720x1280 - 竖屏
aspect_ratio 二选一使用
aspect_ratio
string
视频宽高比可选值:
  • 16:9 - 横屏
  • 9:16 - 竖屏
size 二选一使用
duration
integer
视频时长(秒),支持 8,默认为 8
seconds 二选一使用
seconds
integer
视频时长(秒),支持 8,默认为 8
duration 二选一使用

参考图片模式

input_reference
array
参考图片数组,用于指导视频生成,最多支持 3 张图片
与首尾帧模式互斥,与 image_urls 二选一
image_urls
array
参考图片URL数组,用于指导视频生成,最多支持 3 张图片
与首尾帧模式互斥,与 input_reference 二选一

首尾帧模式

first_image
string
首帧图片 URL,用于指定视频的开始帧
与参考图片模式互斥
last_image
string
尾帧图片 URL,用于指定视频的结束帧
需要同时提供 first_image,与参考图片模式互斥

响应参数

id
string
视频生成任务的唯一标识符,用于后续查询任务状态
object
string
对象类型,固定为 video.generation
created
integer
任务创建时间戳
model
string
使用的模型名称
status
string
任务状态:
  • queued - 排队中
  • processing - 处理中
error
string
错误信息,当 status 为 failed 时返回

图片引导模式

VEO 支持两种互斥的图片引导模式:

参考图片模式

使用 input_referenceimage_urls 提供最多 3 张参考图片,指导整体风格和内容

首尾帧模式

使用 first_image 和可选的 last_image 指定视频的精确开始和结束帧
重要: 两种模式不能同时使用,只能选择其中一种

参数选择规则

参数互斥规则:
  • 尺寸参数sizeaspect_ratio 二选一
  • 时长参数durationseconds 二选一
  • 参考图片input_referenceimage_urls 二选一
  • 引导模式:参考图片模式 OR 首尾帧模式,不能同时使用

VEO 特性

固定时长

VEO 模型固定生成 8 秒视频

双引导模式

支持参考图片和首尾帧两种引导方式

高质量输出

veo3.1-fast 模型提供高质量视频生成

灵活控制

首尾帧模式提供精确的开始和结束控制
最佳实践:
  1. 视频生成为异步处理,需要通过返回的 id 查询任务状态和结果
  2. 在提示词中明确描述所需的视觉效果和风格
  3. 选择合适的引导模式:
    • 参考图片模式:适合风格引导
    • 首尾帧模式:适合精确控制开始和结束
  4. 如果使用首尾帧模式,确保首帧图片始终提供
引导模式选择建议:
  • 参考图片模式:当你想要整体风格一致但允许创意变化时使用
  • 首尾帧模式:当你需要精确控制视频的开始和结束画面时使用
curl --request POST \
  --url https://zcbservice.aizfw.cn/kyyAiPower/v1/veo/videos \
  --header 'Authorization: Bearer {{key}}' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "veo3.1-fast",
    "prompt": "A cat dancing in the rain, cinematic style",
    "aspect_ratio": "16:9",
    "seconds": 8,
    "input_reference": [
      "https://example.com/reference1.jpg",
      "https://example.com/reference2.jpg"
    ]
  }'
{
  "id": "vgen_abc123def456",
  "object": "video.generation",
  "created": 1761635478,
  "model": "veo3.1-fast",
  "status": "queued"
}