概述
MiniMax H3 是稀宇科技(MiniMax)推出的开放权重通用全模态视频生成模型,核心为 33B 参数的 dense 单流 Transformer。它在同一上下文中统一理解文本、图片、视频和音频,一次生成带原生双声道音频的视频,覆盖文生视频、首尾帧生视频,以及以图片、视频、音频为参考的全能参考生成。官方称其在指令遵循、文字与品牌信息呈现、视频动作迁移方面表现出色,适用于广告、品牌、电商、产品设计、游戏等商业场景。TokenFab 提供 768P 输出,时长 4–15 秒。
多模态上下文理解
一条请求可组合文本、参考图片、参考视频和参考音频,用自然语言描述它们与目标画面的关系,模型自行理解各素材的作用。
音画一体生成
对白、环境音、音效和配乐随视频一次生成,原生双声道输出,口型与画面动作一致,无需单独配音或后期合成。
首尾帧精准控制
可以只给首帧、只给尾帧,或同时给首尾两帧,精确控制视频的起止画面。
全能参考生成
最多组合 9 张参考图、3 段参考视频、3 段参考音频,保持角色、风格、动作、运镜或音色一致。
功能
文生视频只提供文本描述;须指定 ratio,且不能为 adaptive。✓
图生视频提供首帧图片;只传一张不带 role 的图片时默认按首帧处理,产物画面比例跟随首帧。支持 JPG/JPEG、PNG、WEBP,单张不超过 30 MB,宽高均在 256–5760 像素、长宽比 0.4–2.5;暂不支持 HEIC/HEIF。✓
参考图生视频参考图 ≤ 9 张、参考视频 ≤ 3 段、参考音频 ≤ 3 段,素材总数 ≤ 15;不能与首尾帧混用。参考视频支持 MP4、MOV(H.264/H.265),单段 2–15 秒、不超过 50 MB;参考音频支持 WAV、MP3,单段 2–15 秒、不超过 15 MB。✓
首尾帧生视频同时提供 first_frame 和 last_frame 两张图,两张都要写 role;也可只给首帧或只给尾帧。✓
特效模版✕
定价
| 分辨率 | 输出视频 | 输入视频 | 输入图片前 5 张免费,超出部分计费 |
|---|---|---|---|
| 768P | ¥0.5/秒 | ¥0.5/秒 | ¥0.2/张 |
输出视频和输入视频分别按时长计费。输出视频支持文生视频、图生视频、首尾帧生视频与全能参考生视频,时长 4~15 秒(整数秒)。每次请求前 5 张输入图片免费,超出部分按张计费。输入音频免费。
规格参数
RPM(请求 / 分钟)30
分辨率768P
时长4~15s
参考图张数9
API 参考
| 方法 | 路径 | 用途 |
|---|---|---|
| POST | https://api.tokenfab.cn/v1/files/upload | 上传素材(图片、视频、音频) |
| POST | https://api.tokenfab.cn/minimax/v2/video_generation | 创建视频生成任务 |
| GET | https://api.tokenfab.cn/minimax/v2/query/video_generation/{task_id} | 查询任务状态与结果 |
请求示例
文生视频
# 1. Create the task and get a task_id
curl https://api.tokenfab.cn/minimax/v2/video_generation \
-H "Authorization: Bearer $TOKENFAB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-H3",
"content": [
{"type": "text", "text": "A puppy flies through the sky as white clouds drift past, tracking shot, cinematic look"}
],
"resolution": "768P",
"duration": 5,
"ratio": "16:9"
}'
# 2. Poll the task (every 5 s is recommended) until status is succeeded or failed
curl https://api.tokenfab.cn/minimax/v2/query/video_generation/5708273498515694596 \
-H "Authorization: Bearer $TOKENFAB_API_KEY"import os
import time
import requests
BASE_URL = "https://api.tokenfab.cn"
headers = {"Authorization": f"Bearer {os.environ['TOKENFAB_API_KEY']}"}
resp = requests.post(
f"{BASE_URL}/minimax/v2/video_generation",
headers=headers,
json={
"model": "MiniMax-H3",
"content": [{"type": "text", "text": "A puppy flies through the sky as white clouds drift past, tracking shot, cinematic look"}],
"resolution": "768P",
"duration": 5,
"ratio": "16:9",
},
)
resp.raise_for_status()
task_id = resp.json()["task_id"]
while True:
task = requests.get(f"{BASE_URL}/minimax/v2/query/video_generation/{task_id}", headers=headers).json()["task"]
if task["status"] in ("succeeded", "failed"):
break
time.sleep(5)
if task["status"] == "succeeded":
with open(f"{task_id}.mp4", "wb") as f:
f.write(requests.get(task["content"]["url"]).content)
else:
print(task["error"])图生视频
# 1. Upload the first-frame image to get a file_id
curl https://api.tokenfab.cn/v1/files/upload \
-H "Authorization: Bearer $TOKENFAB_API_KEY" \
-F purpose=video_generation_input \
-F file=@first.png
# 2. Reference the first frame with mm_file://<file_id>
curl https://api.tokenfab.cn/minimax/v2/video_generation \
-H "Authorization: Bearer $TOKENFAB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-H3",
"content": [
{"type": "text", "text": "The person in the frame slowly turns to look at the camera as a breeze lifts their hair"},
{"type": "image_url", "image_url": {"url": "mm_file://371903373357265086"}, "role": "first_frame"}
],
"resolution": "768P",
"duration": 5
}'首尾帧生视频
curl https://api.tokenfab.cn/minimax/v2/video_generation \
-H "Authorization: Bearer $TOKENFAB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-H3",
"content": [
{"type": "text", "text": "The subject transitions naturally from the first frame to the last, with smooth, continuous camera movement"},
{"type": "image_url", "image_url": {"url": "mm_file://<first_frame_file_id>"}, "role": "first_frame"},
{"type": "image_url", "image_url": {"url": "mm_file://<last_frame_file_id>"}, "role": "last_frame"}
],
"resolution": "768P",
"duration": 5
}'参考图生视频
curl https://api.tokenfab.cn/minimax/v2/video_generation \
-H "Authorization: Bearer $TOKENFAB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-H3",
"content": [
{"type": "text", "text": "The person in image 1 dances hip-hop following the moves in video 1, with background music referencing audio 1"},
{"type": "image_url", "image_url": {"url": "mm_file://<image_file_id>"}, "role": "reference_image"},
{"type": "video_url", "video_url": {"url": "mm_file://<video_file_id>"}, "role": "reference_video"},
{"type": "audio_url", "audio_url": {"url": "mm_file://<audio_file_id>"}, "role": "reference_audio"}
],
"resolution": "768P",
"duration": 5,
"ratio": "16:9"
}'响应示例
{
"task": {
"id": "5708273498515694596",
"model": "MiniMax-H3",
"status": "succeeded",
"created_at": 1792736400,
"updated_at": 1792736475,
"content": { "url": "https://.../video-media/out/...(signed query omitted)" },
"resolution": "768P",
"duration": 5,
"ratio": "16:9",
"usage": {
"total_seconds": 5, "input_seconds": 0, "output_seconds": 5,
"input_image_count": 0,
"total_tokens": 0, "prompt_tokens": 0, "completion_tokens": 0
},
"task_type": "generation"
}
}请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | ✓ | 固定为"MiniMax-H3"。 |
content | array | ✓ | 内容列表,最多 32 个元素。必须有且只有一个 text 元素(不超过 7000 字符),其余为素材元素(image_url / video_url / audio_url)。素材地址用 mm_file://<file_id>(推荐,先调用 /v1/files/upload 上传)或公网可访问的 https:// 地址,不支持 http:// 和 data: URI。请求体不超过 1 MB,素材请上传后引用,不要内嵌在请求体中。 |
content[].role | string | — | 素材角色。image_url 取 first_frame / last_frame / reference_image;video_url 只能是 reference_video、audio_url 只能是 reference_audio,均可省略。同时提供多个素材时每张图都要写 role;首尾帧与 reference_* 素材不能混用;首帧、尾帧各最多 1 张,参考图 ≤ 9、参考视频 ≤ 3、参考音频 ≤ 3,素材总数 ≤ 15。 |
resolution | string | ✓ | 输出分辨率,固定为"768P"。 |
duration | integer | ✓ | 视频时长(秒),4–15 的整数;示例使用 5。 |
ratio | string | — | 画面比例:21:9 / 16:9 / 4:3 / 1:1 / 3:4 / 9:16 / adaptive。文生视频必填且不能为 adaptive;有首帧/尾帧时可省略,产物跟随首帧比例。 |
callback_url | string | — | 暂不支持,只能省略或传空字符串;请轮询查询接口获取结果。 |
aigc_watermark | bool | — | 暂不支持,只能省略或传 false。 |