跳转到主要内容
POST
/
v1
/
videos
/
generations
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "gemini_omni_flash",
    "prompt": "一只猫在霓虹雨夜中奔跑,电影感镜头",
    "aspect_ratio": "16:9",
    "duration": 6,
    "resolution": "720P"
  }'
{
  "id": "video_01JZEXAMPLE",
  "object": "generation.task",
  "model": "gemini_omni_flash",
  "status": "queued",
  "created_at": 1779247407
}

Documentation Index

Fetch the complete documentation index at: https://docs.toapis.com/llms.txt

Use this file to discover all available pages before exploring further.

  • 对外模型名称固定为 gemini_omni_flash
  • 异步任务模式,返回任务 ID 后使用视频任务查询接口获取结果
  • aspect_ratio 对外支持 16:99:16
  • duration 支持 6 秒和 10
  • resolution 当前固定为 720P

Authorizations

Authorization
string
必填
所有接口均需要使用 Bearer Token 进行认证。
Authorization: Bearer YOUR_API_KEY

Body

model
string
默认值:"gemini_omni_flash"
必填
视频生成模型名称,固定为 gemini_omni_flash
prompt
string
必填
视频生成的文本描述。
aspect_ratio
string
默认值:"16:9"
视频画幅比例。可选项:
  • 16:9 - 横屏
  • 9:16 - 竖屏
duration
integer
默认值:6
视频时长,单位秒。可选项:610
resolution
string
默认值:"720P"
视频分辨率。当前仅支持 720P

Response

id
string
任务唯一标识符,用于查询任务状态。
object
string
对象类型,固定为 generation.task
model
string
使用的模型名称。
status
string
任务状态:queuedin_progresscompletedfailed
created_at
integer
任务创建时间戳。
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header "Authorization: Bearer YOUR_API_KEY" \
  --header "Content-Type: application/json" \
  --data '{
    "model": "gemini_omni_flash",
    "prompt": "一只猫在霓虹雨夜中奔跑,电影感镜头",
    "aspect_ratio": "16:9",
    "duration": 6,
    "resolution": "720P"
  }'
{
  "id": "video_01JZEXAMPLE",
  "object": "generation.task",
  "model": "gemini_omni_flash",
  "status": "queued",
  "created_at": 1779247407
}

查询任务

提交接口会返回任务 ID。使用通用视频任务查询接口获取状态和结果:
curl --request GET \
  --url https://toapis.com/v1/videos/generations/{task_id} \
  --header "Authorization: Bearer YOUR_API_KEY"