Skip to main content
POST
/
v1
/
videos
veo3逆向异步
curl --request POST \
  --url https://api.deerapi.com/v1/videos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'prompt=A whimsical flying elephant soaring over a vibrant candy-colored cityscape at sunset, with rainbow trails behind its wings, playful monkeys riding on its back throwing confetti, in a whimsical animated style like a Pixar movie, camera panning smoothly from ground level to aerial view,' \
  --form input_reference='@example-file'
{
  "id": "<string>",
  "object": "<string>",
  "created_at": 123,
  "status": "<string>",
  "completed_at": null,
  "error": null,
  "expires_at": null,
  "model": "<string>",
  "progress": 123,
  "remixed_from_video_id": null,
  "seconds": "<string>",
  "size": "<string>"
}

第一次接 DeerAPI,默认更推荐这个格式

如果你是第一次把 Veo 接入 DeerAPI,优先用当前页。原因很直接:
  • 创建接口 POST /v1/videos 会立即返回 video_id
  • 后续状态统一通过 veo3 逆向查回 轮询。
  • 这套模型更适合后端任务队列、前后端分离、重试逻辑和超时控制。
相比之下,veo3-chat 格式 更适合已经有 OpenAI Chat Completions 客户端的人,而不是第一次设计视频任务流的人。

veo3-asyncveo3-chat 的区别

维度veo3-asyncveo3-chat
创建入口POST /v1/videosPOST /v1/chat/completions
查询方式GET /v1/videos/\{video_id\} 轮询流输出或最终 assistant 消息
入参结构multipart/form-dataOpenAI Chat Completions 兼容 JSON
默认推荐对象新接入、服务端任务流已有 OpenAI SDK/chat 客户端
与官方差异兼容异步任务流,不是 Google 原生 operation兼容聊天流,不是 Google 原生 operation

这和 Google 官方 Veo 有什么不同

Google 官方最新文档当前以 generate_videos 和长时运行 operation 对象为核心,重点参数包括 aspect_ratioresolutionreference_imageslast_frame,并通过 operations.get 轮询结果。 当前页不是那套原生协议,而是 DeerAPI 的统一异步任务格式,主要差异是:
  • DeerAPI 使用统一模型名,不直接暴露 Google 官方模型代码。
  • DeerAPI 当前页把图片输入收敛成 input_reference,并以重复上传的方式兼容首帧、尾帧等场景。
  • DeerAPI 的查询对象是 video_id,不是 Google 官方的 operation.name
如果你追求的是 Google 官方参数名的一一对应,请直接接 Google 原生 Veo API;如果你追求的是更统一的聚合接入体验,用当前页更合适。

图片上传方式

通过 multipart/form-data 传递图片,统一使用 input_reference
  • 传一次:单张参考图或首帧引导。
  • 按顺序传两次:通常表示首帧、尾帧控制。
  • 可以上传本地文件,也可以传可公开访问的图片 URL。
如果你需要严格复现 Google 官方 reference_images 的对象语义,请先在小流量下验证。当前页文档明确保证的是“单参考图”和“首尾帧”这两类最常见兼容路径。

查询方式

  1. 先调用当前页创建任务,保存返回的 video_id
  2. 再调用 veo3 逆向查回 轮询状态。
  3. 当状态进入终态后,再读取最终结果或下载信息。
推荐轮询间隔是 10 到 20 秒。比这更快通常没有额外收益,只会增加无效请求。

常见限制

  • 当前接口通过兼容层实现,不建议直接按 Google 官方 SDK 的稳定性预期理解它。
  • 当前文档范围内,视频时长按兼容入口固定为 8 秒;这与 Google 官方 Veo 文档里可见的更多时长、分辨率组合不是一一对应关系。
  • size 在当前页主要承担横屏、竖屏方向选择的作用,不应把它理解为 Google 官方的精确分辨率契约。
  • 如果你更需要“单次长连接直接看到生成日志”,而不是“创建后轮询”,请切换回 veo3-chat 格式

Authorizations

Authorization
string
header
required

Bearer token authentication. Use your DeerAPI key.

Body

multipart/form-data
prompt
string
required

用于生成视频的文本提示,描述直接传参横屏、竖屏

Example:

"A whimsical flying elephant soaring over a vibrant candy-colored cityscape at sunset, with rainbow trails behind its wings, playful monkeys riding on its back throwing confetti, in a whimsical animated style like a Pixar movie, camera panning smoothly from ground level to aerial view,"

model
enum<string>

要使用的视频生成模型, 默认为veo3.1

Available options:
veo3,
veo3-fast,
veo3-pro,
veo3.1,
veo3.1-pro
Example:

"veo3.1"

size
string

宽x高,会忽略具体数据 宽>高 为横屏,宽<高为竖屏

Example:

"16x9"

input_reference
file

参考图文件

Response

200 - application/json

Successful Response

id
string
required
object
string
required
created_at
integer
required
status
string
required
completed_at
null
required
error
null
required
expires_at
null
required
model
string
required
progress
integer
required
remixed_from_video_id
null
required
seconds
string
required
size
string
required