Veo 3.1 视频生成
Veo 3.1 支持文生视频、图生视频、首尾帧、多图参考和视频续写。公共模型名同时表达分辨率和速度档位。
支持模型
| 模型 | 档位 |
|---|---|
veo3.1-video-720p | 标准 720p。 |
veo3.1-video-1080p | 标准 1080p。 |
veo3.1-video-4k | 标准 4K。 |
veo3.1-fast-video-720p | 快速 720p。 |
veo3.1-fast-video-1080p | 快速 1080p。 |
veo3.1-fast-video-4k | 快速 4K。 |
Endpoint
POST /v1/video/generations
GET /v1/videos/{task_id}
Authentication
Authorization: Bearer sk-***
Content-Type: application/json
请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | Veo 3.1 公共模型 ID。 |
prompt | string | 强烈建议 | 主提示词。Schema 不强制,但生产请求应传。 |
image | string | 条件必填 | 图生视频的单张源图 URL。 |
images | string[] | 条件必填 | 多图参考生视频,2 到 3 张图。 |
last_image | string | 条件必填 | 目标尾帧图 URL,与 image 配合使用。 |
video | string | 条件必填 | 视频续写的源视频 URL。 |
size | string | 建议 | 分辨率提示,应与所选模型档位一致。 |
aspect_ratio | string | 否 | 文生视频允许 16:9 或 9:16;图生和续写不一定生效。 |
duration | integer | 条件必填 | 输出秒数,允许值为 4、6、8;视频续写不使用。 |
extra_body.generate_audio | boolean | 否 | 是否生成声音,上游通常默认 true。 |
extra_body.negative_prompt | string | 否 | 不希望出现的内容。 |
extra_body.seed | integer | 否 | 随机种子。 |
文生视频示例
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "veo3.1-video-1080p",
"prompt": "A golden-hour street interview shot, slight handheld movement, natural city ambience, realistic human speech.",
"size": "1080p",
"aspect_ratio": "16:9",
"duration": 8,
"extra_body": {
"generate_audio": true,
"negative_prompt": "watermark, blur",
"seed": 7
}
}'
图生视频示例
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "veo3.1-video-720p",
"prompt": "A product slowly rotates on a clean studio desk with soft reflected light.",
"image": "https://example.com/keyframe.png",
"size": "720p",
"aspect_ratio": "16:9",
"duration": 6,
"extra_body": {
"generate_audio": false,
"negative_prompt": "artifacts, camera shake"
}
}'
首尾帧示例
curl -X POST "{BASE_URL}/v1/video/generations" \
-H "Authorization: Bearer sk-***" \
-H "Content-Type: application/json" \
-d '{
"model": "veo3.1-fast-video-1080p",
"prompt": "Transition naturally from the first frame to the last frame, preserving subject identity and camera continuity.",
"image": "https://example.com/start-frame.png",
"last_image": "https://example.com/end-frame.png",
"size": "1080p",
"aspect_ratio": "16:9",
"duration": 6
}'
查询任务状态
curl "{BASE_URL}/v1/videos/task_xxx" \
-H "Authorization: Bearer sk-***"
{
"id": "task_xxx",
"task_id": "task_xxx",
"object": "video.generation.job",
"model": "veo3.1-video-1080p",
"status": "completed",
"progress": 100,
"video_url": "https://example.com/output.mp4"
}
计费说明
Veo 计费与模型档位、速度档、分辨率、输出时长和是否生成音频有关。最终以任务结算记录和当前产品价格为准。
常见错误
duration不在4、6、8允许值中。size与所选模型档位不一致。- 期望图生视频或续写一定遵循
aspect_ratio。 - 参考图超过
3张。 - 传入
video但没有通过提示词或扩展字段说明续写意图。