跳到主要内容
AI
MarkdownLLMs.txt

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

请求参数

参数类型必填说明
modelstringVeo 3.1 公共模型 ID。
promptstring强烈建议主提示词。Schema 不强制,但生产请求应传。
imagestring条件必填图生视频的单张源图 URL。
imagesstring[]条件必填多图参考生视频,23 张图。
last_imagestring条件必填目标尾帧图 URL,与 image 配合使用。
videostring条件必填视频续写的源视频 URL。
sizestring建议分辨率提示,应与所选模型档位一致。
aspect_ratiostring文生视频允许 16:99:16;图生和续写不一定生效。
durationinteger条件必填输出秒数,允许值为 468;视频续写不使用。
extra_body.generate_audioboolean是否生成声音,上游通常默认 true
extra_body.negative_promptstring不希望出现的内容。
extra_body.seedinteger随机种子。

文生视频示例

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 不在 468 允许值中。
  • size 与所选模型档位不一致。
  • 期望图生视频或续写一定遵循 aspect_ratio
  • 参考图超过 3 张。
  • 传入 video 但没有通过提示词或扩展字段说明续写意图。

相关页面