veo-3.1-fast
veo-3.1-fast
视频GoogleVeo 3.1veo-3.1-fast

Veo 3.1 是一种用于生成 8 秒视频(720p、1080p 或 4k)的模型,可原生生成音频。

鉴权

Base URL
https://api.dreamtoai.com
Authorization
Authorization: Bearer YOUR_API_KEY
Content-Type
application/json
模型名 (model)
veo-3.1-fast

接入协议

为什么选这个协议

适合需要提交任务并轮询状态的图像、视频、音频生成工作流。

接口地址
POST/v1/jobs
Authorization: Bearer YOUR_API_KEYContent-Type: application/json

请求 / 响应 JSON

请求
{
  "model": "veo-3.1-fast",
  "input": {
    "prompt": "一段自然纪录片风格的雪山航拍镜头",
    "image": "https://example.com/image.png",
    "lastframe": [
      "https://example.com/ref.png"
    ],
    "referenceImages": [
      "https://example.com/ref.png"
    ],
    "video": [
      "https://example.com/ref.mp4"
    ],
    "aspectratio": "16:9,9:16",
    "resolution": "720p,1080p,4k",
    "generate_audio": false,
    "negative_prompt": "低清晰度、闪烁、变形",
    "durationseconds": "4,6,8"
  }
}
响应
{
  "id": "job_example",
  "object": "job",
  "status": "processing",
  "model": "veo-3.1-fast",
  "created": 1710000000,
  "request_id": "req_example"
}

请求字段 / 响应字段

请求字段
字段类型必填
promptstringY
imageimageN
lastframeimageN
referenceImagesstringN
videovideoN
aspectratiostringY
resolutionstringY
generate_audiobooleanN
negative_promptstringN
durationsecondsstringY
响应字段
字段类型必填
task_idstringN
statusenumN

代码示例

cURLrequest.sh
curl -X POST "https://api.dreamtoai.com/v1/jobs" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "model": "veo-3.1-fast",
  "input": {
    "prompt": "一段自然纪录片风格的雪山航拍镜头",
    "image": "https://example.com/image.png",
    "lastframe": [
      "https://example.com/ref.png"
    ],
    "referenceImages": [
      "https://example.com/ref.png"
    ],
    "video": [
      "https://example.com/ref.mp4"
    ],
    "aspectratio": "16:9,9:16",
    "resolution": "720p,1080p,4k",
    "generate_audio": false,
    "negative_prompt": "低清晰度、闪烁、变形",
    "durationseconds": "4,6,8"
  }
}'

# 查询任务状态 cURL
# 将 job_example 替换为提交任务返回的 task_id
curl -X GET "https://api.dreamtoai.com/v1/jobs/job_example" \
  -H "Authorization: Bearer YOUR_API_KEY"