APIMPAPIMP
User GuideAI APIImage APIVideo APIPublic API

veo-3

Submit an async Google Veo 3 video generation task (covers the 4 concrete model IDs: 3.0 / 3.0-fast / 3.1-preview / 3.1-fast-preview). Returns a task_id to poll via the status endpoint.

POST
/api/generate/submit

Authorization

BearerAuth

AuthorizationBearer <token>

使用 Bearer Token 认证。 格式: Authorization: Bearer sk-xxxxxx

In: header

Request Body

application/json

model*string

Veo 3 系列具体 model ID

Value in"veo-3.0-generate-001" | "veo-3.0-fast-generate-001" | "veo-3.1-generate-preview" | "veo-3.1-fast-generate-preview"
input*object
prompt*string

视频描述(必填,非空)

size?string

WxH 像素,自动映射为 aspectRatio + resolution。- 短边 < 1920 → 720p- 短边 ∈ [1920, 3840) → 1080p- 短边 ≥ 3840 → 4k- H > W → 9:16,否则 16:9

duration?integer

视频时长(秒)。会映射为上游 durationSeconds

image?string

首帧参考图 URL(image-to-video)

images?array<string>

首帧参考图列表(目前仅取第一张)

Itemsitems <= 1
metadata?object

Veo 专属参数。下列字段直接对应上游 VeoParameters,全部可选。

durationSeconds?integer

时长(秒)。与 input.duration 等价,存在时优先

aspectRatio?string

视频比例。未指定时由 size 推断

Value in"16:9" | "9:16"
resolution?string

分辨率。未指定时由 size 推断;4k 仅 veo-3.1 支持

Value in"720p" | "1080p" | "4k"
negativePrompt?string

负向描述(不希望出现的元素)

personGeneration?string

人物生成策略,例如 allow_adult / dont_allow 等(按上游枚举)

storageUri?string

GCS 存储 URI(仅 Vertex 渠道)

compressionQuality?string

视频压缩质量

resizeMode?string

尺寸适配模式

seed?integer

随机种子,固定后输出可复现

generateAudio?boolean

是否生成音轨

[key: string]?any
[key: string]?never

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://loading/api/generate/submit" \  -H "Content-Type: application/json" \  -d '{    "model": "veo-3.1-generate-preview",    "input": {      "prompt": "A drone flyover of a misty bamboo forest at dawn"    }  }'
{
  "code": 200,
  "data": {
    "task_id": "task_9YfRdLsMxC8mNzG6sJxK4tQpAr2BvCWh",
    "status": "not_started",
    "created_time": "2026-06-18T09:21:26",
    "error_message": null
  }
}

{
  "code": 400,
  "error": {
    "message": "input.prompt is required",
    "type": "invalid_request_error"
  }
}

{
  "code": 400,
  "error": {
    "message": "string",
    "type": "invalid_request_error"
  }
}
{
  "code": 400,
  "error": {
    "message": "string",
    "type": "invalid_request_error"
  }
}
{
  "code": 400,
  "error": {
    "message": "string",
    "type": "invalid_request_error"
  }
}
{
  "code": 400,
  "error": {
    "message": "string",
    "type": "invalid_request_error"
  }
}

How is this guide?

Last updated on