VibeAPIVibeAPI 开发者文档

万相 3.0

阿里万相 3.0 的文生视频与图生视频:分辨率写在模型名里、按秒计费、首尾帧与参考视频

POST /v1/videosmodelwan3.0-video-{480p,720p,1080p}(文生 / 图生)或 wan3.0-image-*(图生视频专用);prime 版为高速档。 分辨率写在模型名里,请求体里的 size / resolution 会被模型名覆盖。按秒计费,见视频生成。本页结论来自对本网关的真实调用,最后验证:2026-09-05。

基本调用

# 1. 提交
curl https://www.vibeapi.cn/v1/videos \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan3.0-video-1080p",
    "prompt": "潘多拉魔盒开启的瞬间。昏暗石室中一只古老匣子微微开启,金色与暗色的光雾自缝隙翻涌而出,尘埃在光柱中悬浮,镜头极缓慢推近,电影级布光",
    "seconds": "5",
    "aspect_ratio": "16:9"
}'

# 2. 轮询(每 10~15 秒一次)
curl "https://www.vibeapi.cn/v1/videos/$TASK_ID" -H "Authorization: Bearer $API_KEY"

# 3. 取片
curl -L "https://www.vibeapi.cn/v1/videos/$TASK_ID/content" \
  -H "Authorization: Bearer $API_KEY" -o output.mp4
import time, requests

BASE = "https://www.vibeapi.cn/v1"
H = {"Authorization": "Bearer YOUR_API_KEY"}

task = requests.post(f"{BASE}/videos", headers=H, json={
    "model": "wan3.0-video-1080p",,
    "prompt": "潘多拉魔盒开启的瞬间。昏暗石室中一只古老匣子微微开启,金色与暗色的光雾自缝隙翻涌而出,尘埃在光柱中悬浮,镜头极缓慢推近,电影级布光",,
    "seconds": "5",,
    "aspect_ratio": "16:9",
}).json()

while True:
    s = requests.get(f"{BASE}/videos/{task['id']}", headers=H).json()
    if s["status"] in ("completed", "failed"):
        break
    time.sleep(12)

if s["status"] == "completed":
    url = s.get("metadata", {}).get("url") or f"{BASE}/videos/{task['id']}/content"
    open("output.mp4", "wb").write(requests.get(url, headers=H).content)
import fs from "fs";

const BASE = "https://www.vibeapi.cn/v1";
const H = { Authorization: "Bearer YOUR_API_KEY", "Content-Type": "application/json" };
const sleep = (ms) => new Promise((r) => setTimeout(r, ms));

const task = await (await fetch(`${BASE}/videos`, {
  method: "POST",
  headers: H,
  body: JSON.stringify({
    model: "wan3.0-video-1080p",,
    prompt: "潘多拉魔盒开启的瞬间。昏暗石室中一只古老匣子微微开启,金色与暗色的光雾自缝隙翻涌而出,尘埃在光柱中悬浮,镜头极缓慢推近,电影级布光",,
    seconds: "5",,
    aspect_ratio: "16:9",
  }),
})).json();

let s;
while (true) {
  s = await (await fetch(`${BASE}/videos/${task.id}`, { headers: H })).json();
  if (s.status === "completed" || s.status === "failed") break;
  await sleep(12_000);
}

if (s.status === "completed") {
  const url = s.metadata?.url ?? `${BASE}/videos/${task.id}/content`;
  fs.writeFileSync("output.mp4", Buffer.from(await (await fetch(url, { headers: H })).arrayBuffer()));
}
潘多拉魔盒 · wan3.0-video-1080p · 5 秒

参数

字段类型必填说明
modelstring带分辨率后缀的模型名
promptstring画面描述,可用「图1」「视频1」「音频1」引用素材顺序
secondsstring建议输出时长,如 "10";也接受 duration 别名
sizestring480P / 720P / 1080P,会被模型名后缀覆盖
aspect_ratiostring16:9(默认)/ 9:16 / 1:1 / adaptive
reference_imagesobject[]最多 10 张,用 role 指定用途
reference_videosobject[]video 系列收;时长计入计费
reference_audiosobject[]参与生成,不计入秒数

seconds 请传字符串。wan3.0-video-* 按「输出时长 + 所有参考视频时长之和」计费, 相同 URL 只计一次;wan3.0-image-* 只按输出时长计费。

图生视频

role 三个取值:reference_image(默认)、first_framelast_frame。 素材必须是公网可直接下载的 HTTPS 地址。

curl https://www.vibeapi.cn/v1/videos \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan3.0-image-1080p",
    "prompt": "以参考图为首帧。火炬的火焰剧烈燃烧,火星向上飘散,背景云层缓慢翻涌,镜头极缓慢推进",
    "seconds": "5",
    "aspect_ratio": "16:9",
    "reference_images": [
      { "url": "https://your-cdn.example.com/prometheus.png", "role": "first_frame" }
    ]
  }'
普罗米修斯 · wan3.0-image-1080p · 参考图作首帧