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 轮询。

Xenodia selects the serving route automatically. Choose a public model ID and check its capabilities and price.

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"
}

Veo3.1 的 imageUrls 只接受 public http 或 https image URL。不要传本地文件路径,也不要为 Veo reference image 传 asset://... ID。如果源图片在本地,请先上传到你自己的 public hosting,然后传 public URL。

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 http 或 https image URL;不接受本地路径或 asset://... ID。最多 3 个。
modelveo3.1、veo3.1_fast 或 veo3.1_lite。
generationType可选模式;不传时由 imageUrls 推断。
aspect_ratio16:9、9:16 或 Auto。默认 16:9。
resolution720p、1080p 或 4k。默认 720p。
seeds可选 integer,10000 到 99999。
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"
}

Common errors: 400 for invalid parameter combinations, 401 for invalid keys, 402 for billing boundaries, 424 when media generation is temporarily unavailable, and 502 for task creation failures.

本页内容