veo-3.1-generate-preview、veo-3.1-fast-generate-preview、veo-3.0-generate-preview、veo-3.0-fast-generate-001。| 项目 | 内容 |
|---|---|
| Base URL | https://llm.ai-nebula.com |
| 接口路径 | POST /v1/video/generations |
| 认证方式 | Authorization: Bearer <API Key> |
| Content-Type | application/json |
| 任务模式 | 异步:提交任务 → 轮询状态 → 获取结果 |
| 字段 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | 是 | 模型名称:veo-3.1-generate-preview、veo-3.1-fast-generate-preview、veo-3.0-generate-preview、veo-3.0-fast-generate-001。 |
prompt | string | 是 | 文本提示词,描述需要生成的视频内容。 |
durationSeconds | int | 否 | 视频时长(秒),支持 4 / 6 / 8 ,默认 4。 |
aspectRatio | string | 否 | 宽高比,仅支持 16:9 或 9:16,默认 16:9。 |
resolution | string | 否 | 分辨率选项,720p 或 1080p,默认 1080p。 |
fps | int | 否 | 帧率,默认 24,可按需覆盖。 |
sampleCount | int | 否 | 每次生成的视频数量,范围 1-4,默认 1。 |
generateAudio | bool | 否 | 是否生成同步音频,默认 false;fast模型会忽略该参数并始终输出含音频视频。 |
personGeneration | string | 否 | 人像生成策略:allow_all(所有年龄)/ allow_adult(成年人)/ dont_allow(禁止),默认 allow_all。 |
addWatermark | bool | 否 | 是否添加水印,默认 false。 |
seed | int | 否 | 随机种子,固定后可获得可重复结果。 |
image | string | 否 | 首帧参考图,支持 HTTP(S) URL 或 Base64 Data URI。 |
lastFrame | string | 否 | 尾帧参考图,支持 HTTP(S) URL 或 Base64 Data URI。 |
提示 若传入 image,Veo 会将首帧作为起始画面进行过渡;同时提供lastFrame可实现首尾帧约束。
GET /v1/video/generations/{task_id}sampleCount = 4):{
"task_id": "cHJvamVjdHMv...",
"status": "succeeded",
"format": "mp4",
"url": [
"https://nebula-ads.oss-cn-guangzhou.aliyuncs.com/2025/11/18/abc123/veo-demo-1.mp4",
"https://nebula-ads.oss-cn-guangzhou.aliyuncs.com/2025/11/18/abc123/veo-demo-2.mp4",
"https://nebula-ads.oss-cn-guangzhou.aliyuncs.com/2025/11/18/abc123/veo-demo-3.mp4",
"https://nebula-ads.oss-cn-guangzhou.aliyuncs.com/2025/11/18/abc123/veo-demo-4.mp4"
],
"metadata": {
"durationSeconds": 12,
"aspectRatio": "9:16",
"resolution": "1080p",
"fps": 24,
"generateAudio": true,
"response": {
"videos": [
{
"mimeType": "video/mp4",
"encoding": "mp4",
"url": "https://nebula-ads.oss-cn-guangzhou.aliyuncs.com/2025/11/18/abc123/veo-demo-1.mp4"
},
{
"mimeType": "video/mp4",
"encoding": "mp4",
"url": "https://nebula-ads.oss-cn-guangzhou.aliyuncs.com/2025/11/18/abc123/veo-demo-2.mp4"
},
{
"mimeType": "video/mp4",
"encoding": "mp4",
"url": "https://nebula-ads.oss-cn-guangzhou.aliyuncs.com/2025/11/18/abc123/veo-demo-3.mp4"
},
{
"mimeType": "video/mp4",
"encoding": "mp4",
"url": "https://nebula-ads.oss-cn-guangzhou.aliyuncs.com/2025/11/18/abc123/veo-demo-4.mp4"
}
]
}
}
}url 字段:当只生成 1 个视频时为字符串,多视频时返回字符串数组。sampleCount = 1:"url": "https://.../veo-demo-1.mp4"sampleCount > 1:"url": ["https://.../veo-demo-1.mp4", "https://.../veo-demo-2.mp4", ...]metadata.response.videos 数组中追加了 url 字段,可直接获取每段视频的最终地址。durationSeconds、aspectRatio、generateAudio 等)会回显调用时的参数,便于追踪。| 场景 | 必需字段 | 可选字段 |
|---|---|---|
| 纯文本生成 | model, prompt | durationSeconds, aspectRatio, resolution, generateAudio |
| 首帧参考 | model, prompt, image | 其他字段同上 |
| 首尾帧约束 | model, prompt, image, lastFrame | 同上 |
| 高分辨率生成 | model, prompt, resolution, aspectRatio | fps, generateAudio |
| 状态 | 说明 |
|---|---|
submitted / queued | 任务已排队,等待开始。 |
in_progress | 任务正在处理,可重复查询。 |
succeeded | 生成成功,url 为最终视频地址(字符串或字符串数组)。 |
failed | 任务失败,error 字段提供错误码与信息。 |
url 为字符串数组,请根据需求逐个下载;单个字符串可直接用于 <video> 播放或落盘保存。generateAudio 置为 true,系统会自动选择含音频的计费档位。fps 参数覆盖。failed 且 message 提示策略问题,可尝试修改提示词或降低时长/分辨率后重试。veo-3.0-fast-generate-001、veo-3.1-fast-generate-preview)默认自带音频并忽略 generateAudio 参数,可直接按含音频场景调用。