视频模型 · Alibaba
Alibaba Wan 3.0 API:价格与接入
wan-3.0用一个 BoostRail Key 生成 Alibaba Wan 3.0 视频:提交任务、轮询、下载 MP4。按视频秒数以美元计费,失败的任务不收费。
厂商Alibaba
起价$0.0475 / 秒
单段时长5 或 10 秒
画幅固定横屏
声音随视频一起生成
每秒价格
每个规格一个价,按你请求的秒数计费。价格随目录实时更新。
| 规格 | 每秒价格 |
|---|---|
| 文生 480p | $0.0475 / 秒 |
| 文生 720p | $0.095 / 秒 |
| 文生 1080p | $0.19 / 秒 |
接口接受什么
- 输入:文字提示词(文生视频)
- 参考图:不接受(带 input_reference 的请求在开始前就被拒绝)
- 单段时长:5 或 10 秒
- 这款模型不接受 aspect_ratio 参数,输出横屏视频。
提交、轮询、下载
视频接口是异步的。提交后拿到任务 id,轮询到状态为 succeeded,再从 data[0].url 的签名链接下载 MP4,链接 10 分钟内有效。
# 1. Submit the task
curl https://api.boostrail.com/v1/videos \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"wan-3.0","prompt":"A woman in a red coat stops in the rain, turns to the camera and smiles","seconds":5,"size":"480p"}'
# 2. Poll every 10 seconds until status is succeeded, failed, cancelled or expired
curl https://api.boostrail.com/v1/videos/TASK_ID \
-H "Authorization: Bearer YOUR_API_KEY"
# 3. Download from data[0].url (a signed link, valid for 10 minutes)
curl -L -o clip.mp4 "SIGNED_URL"import time, requests
API = "https://api.boostrail.com/v1"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}
task = requests.post(f"{API}/videos", headers=HEADERS, json={
"model": "wan-3.0",
"prompt": "A woman in a red coat stops in the rain, turns to the camera and smiles",
"seconds": 5,
"size": "480p",
}).json()
while True:
status = requests.get(f"{API}/videos/{task['id']}", headers=HEADERS).json()
if status["status"] in ("succeeded", "failed", "cancelled", "expired"):
break
time.sleep(10)
if status["status"] == "succeeded":
video = requests.get(status["data"][0]["url"]) # signed link, valid for 10 minutes
with open("clip.mp4", "wb") as f:
f.write(video.content)
else:
print(status["error"]) # failed tasks are not charged使用须知
- 失败、取消和过期的任务都不收费。
关于 Alibaba Wan 3.0 的常见问题
Alibaba Wan 3.0 在 BoostRail 怎么收费?
wan-3.0 按视频秒数计费:文生 480p $0.0475,文生 720p $0.095,文生 1080p $0.19。失败的任务不收费。
Alibaba Wan 3.0 单段视频能多长?
每次请求 5 或 10 秒。更长的场景在剪辑时把几段拼起来。
Alibaba Wan 3.0 能生成 9:16 竖屏视频吗?
目前通过 BoostRail 不行:wan-3.0 不接受 aspect_ratio 参数,输出横屏视频。要做竖屏,请在视频模型页选一款接受 aspect_ratio 的模型。
Alibaba Wan 3.0 接受参考图吗?
通过 BoostRail 不接受:带 input_reference 的请求在开始前就被拒绝,不会扣费。请把画面写进文字提示词。
Alibaba Wan 3.0 会生成声音吗?
会。MP4 带一条随视频生成的音轨。音乐和字幕放到剪辑时再加,更好控制。
Alibaba Wan 3.0 任务失败了怎么算?
失败、取消和过期的任务都不收费,提交时冻结的金额会退回余额。
Alibaba Wan 3.0 出片后多久内能下载?
data[0].url 的签名链接 10 分钟内有效,过期了再轮询一次任务就有新链接。任务返回里的 content_expires_at 写明文件能保留到什么时候。