Xenodia Docs
API 参考

Seedance 2.0 Video API

通过 Xenodia 创建异步 Bytedance Seedance 2.0 video task,并用标准 task API 轮询。

使用 POST /v1/videos/generations 在 Xenodia 上进行 public Seedance 2.0 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": "seedance-2-fast",
  "prompt": "A cinematic beach at sunset, gentle waves, palm trees, and orange sky.",
  "resolution": "720p",
  "aspect_ratio": "16:9",
  "duration": 5,
  "generate_audio": false
}

First and last frame request

{
  "model": "seedance-2",
  "prompt": "Animate a product reveal from the first frame into the final packaging frame.",
  "first_frame_url": "https://example.com/first.png",
  "last_frame_url": "https://example.com/last.png",
  "resolution": "1080p",
  "aspect_ratio": "16:9",
  "duration": 8
}

Multimodal reference request

{
  "model": "seedance-2-fast",
  "prompt": "Use the references to create a fast, polished launch video.",
  "reference_image_urls": ["https://example.com/style.png"],
  "reference_video_urls": ["https://example.com/motion.mp4"],
  "reference_audio_urls": ["https://example.com/music.mp3"],
  "resolution": "720p",
  "aspect_ratio": "9:16",
  "duration": 10,
  "web_search": false,
  "nsfw_checker": false
}

Supported public models

ModelResolutions
seedance-2480p720p1080p
seedance-2-fast480p720p

Input modes

ModeFields
Text-to-video只传 prompt
First frame image-to-videofirst_frame_url
First and last frame image-to-videofirst_frame_urllast_frame_url
Multimodal reference-to-video任意 reference_image_urlsreference_video_urlsreference_audio_urls

first_frame_url / last_frame_url 不能和 multimodal reference arrays 混用。Media reference 使用 public URL 或 Xenodia asset://... ID。

Parameters

FieldNotes
modelseedance-2seedance-2-fast
prompt必填 prompt,3 到 20000 字符。
first_frame_url可选 first frame image URL 或 asset://... ID。
last_frame_url可选 last frame image URL 或 asset://... ID,需要 first_frame_url
reference_image_urls可选 image URL / asset://... array,最多 9 个。
reference_video_urls可选 video URL / asset://... array,最多 3 个;存在时选择 with_video pricing tier。
reference_audio_urls可选 audio URL / asset://... array,最多 3 个。
return_last_frame可选 boolean。Deprecated compatibility parameter。
resolutionseedance-2 支持 480p720p1080pseedance-2-fast 只支持 480p720p。默认 720p
aspect_ratio1:14:33:416:99:1621:9adaptive
duration4 到 15 秒。默认 5,会乘以 per-second price tier。
generate_audio, web_search, nsfw_checker可选 switches。
callBackUrl可选 completion callback URL;Xenodia task polling 仍可用。

Pricing

Seedance 2.0 不是 token pricing。Xenodia 按生成秒数计费:

actual cost = per-second tier price * duration * channel margin

Tier 由 resolution 和是否传 reference_video_urls 决定。seedance-2-fast 没有 1080p tier。价格敏感 UI 上线前查询 /v1/models

Response

返回 Xenodia media task envelope:

{
  "task_id": "task_123",
  "object": "task",
  "model": "seedance-2-fast",
  "type": "video",
  "state": "waiting",
  "created_at": 1760000000,
  "poll_url": "/v1/tasks/task_123",
  "recommended_poll_interval_ms": 5000
}

轮询成功后,result.data[].url 包含 generated video URL。常见错误:400401402502

本页内容