API 指南 / Trellis 视频生成(Wan2.2-I2V-A14B)

API 指南 · Trellis 视频生成(Wan2.2-I2V-A14B)

高质量图生视频(异步),需首帧 image,按秒分档计费。

调用方式
异步(仅支持):POST 提交返回 {id, status};轮询 GET /v1/jobs/{id}(间隔 3–5s)。

mode=i2v14:使用 Wan2.2-I2V-A14B 高质量图生视频(快速通道仍用 trellis-wan-ti2v 的 i2v)。

需传 image(首帧,可下载 URL 或 data-uri)。

num_frames 须为 4n+1;按 usage.seconds 分档计费(480p ¥0.25 / 720p ¥0.5 / 1080p ¥1.0 每秒)。

调用示例:

cURL
ID=$(curl -s https://api.trellis.hk/v1/videos \
  -H "Authorization: Bearer sk-xxxxxxxx" \
  -H "Content-Type: application/json" \
  -d '{"model":"trellis-wan-i2v14","prompt":"人物缓缓回头","image":"<data-uri/url>",
       "height":480,"width":832,"num_frames":49}' | jq -r .id)

curl -s https://api.trellis.hk/v1/jobs/$ID -H "Authorization: Bearer sk-xxxxxxxx"
所有模型共用同一 API Key 与同一端点:https://api.trellis.hk/v1