VibeAPIVibeAPI 开发者文档

MiniMax H3

MiniMax H3:按秒计费、固定 768P,图 / 视频 / 音频三类参考素材同时给,以及会被当场拒绝的写法

POST /v1/videosmodelMiniMax-H3。按秒计费,见视频生成。本页结论来自对本网关的真实调用,最后验证:2026-09-05。

基本调用

# 1. 提交
curl https://www.vibeapi.cn/v1/videos \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-H3",
    "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": "MiniMax-H3",,
    "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: "MiniMax-H3",,
    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()));
}

按秒计费,固定 768P,整数 1–15 秒。特点是参考素材的种类最全:图、视频、音频三类 可以同时给,提示词里用 <Picture 1> <Video 1> <Audio 1> 按顺序引用。

参数

字段类型必填说明
modelstring固定 MiniMax-H3
promptstring最长 7000 字符
secondsstring建议输出时长,整数 1–15;也接受数字型 duration。不传按 5 秒
aspect_ratiostring21:9 16:9(默认)4:3 1:1 3:4 9:16,另见下方 adaptive
image_urlsstring[]参考图,最多 9 张,顺序即 <Picture N> 编号
video_urlsstring[]参考视频,最多 3 条
audio_urlsstring[]参考音频,最多 3 个

分辨率不用传,固定 768P,传了也不生效。

adaptive 比例只在带了参考图或参考视频时可用——它的意思是跟着视觉输入定画布, 纯文生和纯音频请求没有可跟的对象,会直接报错。

三类参考素材合计不超过 12 个,且每一类各有上限。

多参考素材

curl https://www.vibeapi.cn/v1/videos \
  -H "Authorization: Bearer $API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "MiniMax-H3",
    "prompt": "<Picture 1> 中的人物,按 <Video 1> 的运镜节奏,配合 <Audio 1> 的节拍",
    "seconds": "8",
    "aspect_ratio": "adaptive",
    "image_urls": ["https://your-cdn.example.com/person.jpg"],
    "video_urls": ["https://your-cdn.example.com/motion.mp4"],
    "audio_urls": ["https://your-cdn.example.com/beat.mp3"]
  }'

素材必须是公网可直接下载的 HTTPS 地址。

素材限制

素材数量单文件时长
图片最多 9 张30 MB不适用
视频最多 3 条50 MB单条最短 2 秒;超过 15 秒只取片头 15 秒
音频最多 3 个15 MB单个最短 2 秒;超过 15 秒只取片头 15 秒

图片还需满足:单边 256–5760 像素,宽高比 0.4–2.5,不能是动图。

参考视频与参考音频裁切后各自累计不得超过 15 秒,超了任务会失败。 被裁切不影响输出时长,你请求几秒就出几秒。

会被当场拒绝的写法

这些在提交时就返回 400,不会创建任务、不产生费用:

写法报错
时长写 0、负数或超过 15duration must be an integer between 1 and 15 seconds
比例不在六档之内unsupported ratio ...
纯文生或纯音频用 adaptiveratio adaptive requires at least one image or video input
参考图超过 9 张at most 9 images are accepted
参考视频或音频超过 3 个at most 3 reference videos/audios are accepted
三类合计超过 12 个at most 12 media items are accepted in total

素材本身的问题(下载不到、格式不对、时长不够)要等异步阶段才知道, 表现为任务进入 failed,此时全额退款。