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/generationsPOST /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
| Model | Resolutions |
|---|---|
seedance-2 | 480p、720p、1080p |
seedance-2-fast | 480p、720p |
Input modes
| Mode | Fields |
|---|---|
| Text-to-video | 只传 prompt。 |
| First frame image-to-video | first_frame_url。 |
| First and last frame image-to-video | first_frame_url 和 last_frame_url。 |
| Multimodal reference-to-video | 任意 reference_image_urls、reference_video_urls 或 reference_audio_urls。 |
first_frame_url / last_frame_url 不能和 multimodal reference arrays 混用。Media reference 使用 public URL 或 Xenodia asset://... ID。
Parameters
| Field | Notes |
|---|---|
model | seedance-2 或 seedance-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。 |
resolution | seedance-2 支持 480p、720p、1080p;seedance-2-fast 只支持 480p、720p。默认 720p。 |
aspect_ratio | 1:1、4:3、3:4、16:9、9:16、21:9 或 adaptive。 |
duration | 4 到 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 marginTier 由 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。常见错误:400、401、402、502。