Xenodia Docs
API 参考

Veo3.1 Video API

通过 Xenodia 创建异步 Veo3.1 video task,并用标准 task API 轮询。

使用 POST /v1/videos/generations 在 Xenodia 上进行 public Veo3.1 video generation。

Video generation 只支持 task mode。提交 request,保存 task ID,然后通过 Task Retrieval 轮询。

Endpoint

POST https://api.xenodia.xyz/v1/videos/generations

POST /v1/video/generations 也注册为 compatibility alias。新接入优先使用 plural /v1/videos/generations

Text-to-video request

{
  "model": "veo3.1_fast",
  "prompt": "A cinematic close-up of a developer dashboard showing model routing and API latency.",
  "generationType": "TEXT_2_VIDEO",
  "aspect_ratio": "16:9",
  "resolution": "720p"
}

Reference-to-video request

{
  "model": "veo3.1_fast",
  "prompt": "Animate the reference into a polished product walkthrough.",
  "generationType": "REFERENCE_2_VIDEO",
  "imageUrls": [
    "https://example.com/reference-1.png",
    "https://example.com/reference-2.png"
  ],
  "aspect_ratio": "16:9",
  "resolution": "1080p"
}

Supported public models

ModelNotes
veo3.1Quality model。
veo3.1_fastFast model 和默认值;REFERENCE_2_VIDEO 必须使用它。
veo3.1_liteLite model。

Generation types

TypeReference rule
TEXT_2_VIDEO不传 imageUrls
FIRST_AND_LAST_FRAMES_2_VIDEO需要 1-2 个 imageUrls
REFERENCE_2_VIDEO需要 1-3 个 imageUrls,且只支持 veo3.1_fast

Parameters

FieldNotes
prompt必填文本 prompt。
imageUrls可选 public image URL,最多 3 个。
modelveo3.1veo3.1_fastveo3.1_lite
generationType可选模式;不传时由 imageUrls 推断。
aspect_ratio16:99:16Auto。默认 16:9
resolution720p1080p4k。默认 720p
seeds可选 integer,1000099999
enableFallback可选 deprecated compatibility switch。
enableTranslation可选 boolean,默认启用。
watermark可选 watermark text。
callBackUrl可选 completion callback URL;Xenodia task polling 仍可用。

Pricing

Veo3.1 不是 token pricing。Xenodia 按 accepted video task 固定计费,tier 由 resolution 选择。

ResolutionBilling unit
720pPer generated video
1080pPer generated video
4kPer generated video

价格敏感 UI 上线前先查询 /v1/models。Capability payload 会暴露 capabilities.pricing.mode = "resolution" 和 resolution tiers。

Response

返回 Xenodia media task envelope:

{
  "task_id": "task_123",
  "object": "task",
  "model": "veo3.1_fast",
  "type": "video",
  "state": "waiting",
  "created_at": 1760000000,
  "poll_url": "/v1/tasks/task_123",
  "recommended_poll_interval_ms": 5000
}

轮询成功后,result 包含 generated video URL:

{
  "task_id": "task_123",
  "state": "success",
  "result": {
    "created": 1760000100,
    "data": [
      {
        "url": "https://cdn.example.com/video.mp4"
      }
    ],
    "resolution": "720p"
  },
  "progress": 100,
  "poll_url": "/v1/tasks/task_123"
}

常见错误:400 参数组合无效,401 key 无效,402 billing boundary,502 task creation failure。

本页内容