📘 长视频(无限时长)生成说明 →

🎬 MiniMax-H3 视频生成 API

智能调度 · Go 版 · 3 个模型
队列状态读取中…

📋 基本信息

Base URLhttp://47.111.83.139:19180
认证方式所有接口(除 /health、/v1/models、本页面、视频下载外)需 Authorization: Bearer <key>
可用模型minimax_h3_t2v 文生视频 · minimax_h3_i2v 图生视频 · minimax_h3_r2v 参考图生视频
输出格式MP4(H.264 视频 + AAC 音频)
调度策略并行调度,空闲优先分配,超出排队等待
队列上限排队最多 10 个任务;排满后新请求直接拒绝(HTTP 429,error: "queue_full"),提示稍等再试。实时排队数见本页顶部指示器或 GET /health 的 queue.pending

📖 API 端点

POST /v1/videos/generations — 创建视频生成任务(提交后返回 job_id)
GET /v1/videos/generations/{id} — 查询任务状态(轮询直到 completed)
GET /v1/models — 查看可用模型列表
GET /health — 健康检查(含实时队列长度)
GET /stats.json — 统计信息
POST /v1/files/upload — 上传参考文件(图片/视频/音频)
GET /v1/files/{filename} — 查看/下载上传的文件(无需 Key)
GET /videos/{file} — 视频下载(无需 Key)
POST /v1/audio/speech — 创建语音合成(TTS)任务
GET /v1/audio/speech/{id} — 查询语音合成任务状态
GET /audio/{file} — 音频下载(无需 Key)

📤 上传文件说明

I2V 需要传图片作为首帧、R2V 需要传参考图/视频/音频时,推荐先上传文件再引用 URL,而不是直接传外部链接。

上传文件

POST /v1/files/upload(需 Key,multipart/form-data,字段名 file)

curl -X POST http://47.111.83.139:19180/v1/files/upload \
  -H "Authorization: Bearer <key>" \
  -F "file=@/本地路径/图片.jpg"

返回结果

{
  "filename": "18cdf16b00cd0974.png",
  "original_name": "图片.jpg",
  "file_type": ".png",
  "size": 1659985,
  "url": "http://47.111.83.139:19180/v1/files/18cdf16b00cd0974.png",
  "category": "images"
}

支持的文件类型

类型扩展名
图片.jpg .jpeg .png .gif .webp .bmp
视频.mp4 .webm .mov .avi .mkv
音频.mp3 .wav .ogg .flac .aac .m4a

在生成视频时引用上传的文件

上传返回的 url 可直接用于 image、ref_images、ref_videos、ref_audios 等参数,不需要再下载。

示例:上传图片后用于 I2V:

# 第一步:上传图片
curl -X POST http://47.111.83.139:19180/v1/files/upload \
  -H "Authorization: Bearer <key>" \
  -F "file=@cat.jpg"
# 返回: {"url": "http://47.111.83.139:19180/v1/files/xxx.jpg"}

# 第二步:用返回的 URL 生成视频
curl -X POST http://47.111.83.139:19180/v1/videos/generations \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax_h3_i2v","prompt":"猫在草地奔跑","image":"http://47.111.83.139:19180/v1/files/xxx.jpg"}'

示例:上传参考图用于 R2V:

# 上传多张参考图
curl -X POST http://47.111.83.139:19180/v1/files/upload \
  -H "Authorization: Bearer <key>" \
  -F "file=@face.jpg"
# 返回: {"url": "http://47.111.83.139:19180/v1/files/face_xxx.jpg"}

curl -X POST http://47.111.83.139:19180/v1/files/upload \
  -H "Authorization: Bearer <key>" \
  -F "file=@dress.jpg"
# 返回: {"url": "http://47.111.83.139:19180/v1/files/dress_xxx.jpg"}

# 用上传的 URL 做 R2V
curl -X POST http://47.111.83.139:19180/v1/videos/generations \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax_h3_r2v","prompt":"<Picture 1>穿着<Picture 2>的衣服跳舞","ref_images":["http://47.111.83.139:19180/v1/files/face_xxx.jpg","http://47.111.83.139:19180/v1/files/dress_xxx.jpg"]}'

查看上传的文件

上传后返回的 url 可以直接在浏览器打开查看图片,或下载视频/音频。无需 Key。

📋 通用参数(三个模型都支持)

以下参数在 T2V / I2V / R2V 三个模型中用法完全一致,类型、默认值、范围完全相同。

参数名类型必填默认值说明
modelstring是-minimax_h3_t2v / minimax_h3_i2v / minimax_h3_r2v
promptstring是-视频内容描述,不能为空
steps———不接受本参数。采样步数由模型配方固定为 3 步(TaoMate 3步蒸馏 LoRA),传了会直接报错,详见下方「参数校验与错误说明」。
duration_secondsint/float否5视频时长(秒),范围 1~15。实际会 snap 到 17 帧的整数倍
aspect_ratiostring否1:1 (Square)画幅比例,8 种枚举(见下方列表)
megapixelsfloat否0.40.1~2.0。16:9 下: 0.2→608×352 / 0.5→960×544 / 1.0→1376×768 / 2.0→1920×1088
seedint否随机随机种子,≥0。相同 seed + 相同参数 = 相同结果
fpsint否24帧率,范围 1~120
denoisefloat否1.0降噪强度,范围 0~1。1.0=完全重绘,<1.0=保留原图结构
sampler_namestring否euler采样器,23 种枚举(见下方列表)

megapixels 分辨率参考表

1 MP = 1024×1024 像素(基数 1024²,不是 1000²)。总像素 = megapixels × 1024 × 1024,再按 aspect_ratio 分配宽高并 rounding 到 32 的倍数。

megapixels16:9 输出说明
0.2608 x 352低分辨率,适合快速测试
0.3736 x 416
0.4(默认)864 x 480默认值,快速出图
0.5960 x 544中等分辨率,推荐日常使用
0.61056 x 608
0.71152 x 640
0.81216 x 672
0.91280 x 736
0.981344 x 768
1.0(默认)1376 x 768高清,默认值
1.21504 x 832
1.51664 x 928
1.81824 x 1024
2.01920 x 10882K 分辨率,H3 模型上限

🎥 文生视频 — minimax_h3_t2v

只需一段文字描述,直接生成视频+音频。最简单的用法。

额外参数:无。T2V 只支持通用参数。

curl -X POST http://47.111.83.139:19180/v1/videos/generations \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax_h3_t2v","prompt":"一只白鹤在湖面低飞,水波荡漾,夕阳余晖"}'

🖼️ 图生视频 — minimax_h3_i2v

提供一张图片作为首帧(可选尾帧),生成以该图为起点的视频。支持通用参数 + 以下额外参数:

参数名类型必填默认值说明
imagestring是-首帧图的 URL(http/https 或 data:image base64)
last_imagestring否-尾帧图 URL。传了则生成首帧→尾帧的过渡动画

单图(首帧)生视频:

curl -X POST http://47.111.83.139:19180/v1/videos/generations \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax_h3_i2v","prompt":"猫在草地奔跑,阳光明媚","image":"https://.../cat.jpg"}'

首尾帧过渡:

curl -X POST http://47.111.83.139:19180/v1/videos/generations \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax_h3_i2v","prompt":"从白天过渡到夜晚","image":"https://.../day.jpg","last_image":"https://.../night.jpg"}'

🎨 参考图生视频 — minimax_h3_r2v

用参考图/视频/音频控制生成视频的人物特征、场景风格、动作、声音。支持通用参数 + 以下额外参数:

参数名类型必填默认值说明
ref_imagesarray否-参考图 URL 数组,最多 9 张。控制人物、物体、场景风格。用 <Picture i> 标签引用
ref_videosarray否-参考视频 URL 数组,最多 3 个(2~15 秒)。控制动作/镜头运动。用 <Video k> 标签引用
ref_video_audiosarray否-视频配乐 URL 数组,和 ref_videos 一一对应,最多 3 个。控制对应视频的配乐
ref_audiosarray否-参考音频 URL 数组,最多 3 个。控制音色/背景音乐。用 <Audio j> 标签引用
ref_image_sizestring否matchmatch(等比缩放到生成尺寸,快)或 max(保留 2048px 短边,保真度更高但慢数倍)

标签引用规则

在 prompt 中用 <Picture i>、<Video k>、<Audio j> 引用具体素材。编号从 1 开始,三种类型独立编号。

标签引用对象最多
<Picture 1> ~ <Picture 9>第 1~9 张参考图9 张
<Video 1> ~ <Video 3>第 1~3 个参考视频3 个
<Audio 1> ~ <Audio 3>第 1~3 个音频引用(含视频配乐 + 独立音频)3 个

编号顺序:三种类型独立编号,<Audio> 编号包含 ref_video_audios(视频配乐)+ ref_audios(独立音频)。

使用示例

① 单张参考图 — 人物服装/特征:

curl -X POST http://47.111.83.139:19180/v1/videos/generations \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax_h3_r2v","prompt":"一个女孩穿着<Picture 1>中的衣服在花园里跳舞","ref_images":["https://.../dress.jpg"]}'

② 两张参考图 — 人物 + 场景:

curl -X POST http://47.111.83.139:19180/v1/videos/generations \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax_h3_r2v","prompt":"<Picture 1>在<Picture 2>风格的花园中散步","ref_images":["https://.../face.jpg","https://.../garden.jpg"]}'

③ 参考视频 + 参考图 — 动作 + 风格:

curl -X POST http://47.111.83.139:19180/v1/videos/generations \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax_h3_r2v","prompt":"<Video 1>中的动作,在<Picture 1>风格的场景中","ref_images":["https://.../scene.jpg"],"ref_videos":["https://.../dance.mp4"]}'

④ 综合参考 — 图 + 视频 + 音频:

curl -X POST http://47.111.83.139:19180/v1/videos/generations \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax_h3_r2v","prompt":"<Video 1>中的动作,<Picture 1>穿着<Picture 2>的衣服,背景音乐参考<Audio 1>","ref_images":["https://.../face.jpg","https://.../clothes.jpg"],"ref_videos":["https://.../dance.mp4"],"ref_audios":["https://.../music.mp3"]}'

⑤ 多图 + 多视频 + 多音频:

curl -X POST http://47.111.83.139:19180/v1/videos/generations \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax_h3_r2v","prompt":"<Picture 1>穿着<Picture 2>的衣服,在<Picture 3>风格的场景中,做<Video 1>的动作,背景音乐参考<Audio 1>,音效参考<Audio 2>","ref_images":["https://.../face.jpg","https://.../dress.jpg","https://.../room.jpg"],"ref_videos":["https://.../dance.mp4"],"ref_audios":["https://.../bgm.mp3","https://.../sfx.wav"]}'

⑥ 上传参考图并用 R2V 生成(推荐流程):

# 先上传参考图
curl -X POST http://47.111.83.139:19180/v1/files/upload \
  -H "Authorization: Bearer <key>" \
  -F "file=@参考图.jpg"
# 返回: {"url": "http://47.111.83.139:19180/v1/files/xxx.jpg"}

# 用上传的 URL 做 R2V(参考图自动从 NAS 复制,不走外网下载)
curl -X POST http://47.111.83.139:19180/v1/videos/generations \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax_h3_r2v","prompt":"<Picture 1>在跳舞","ref_images":["http://47.111.83.139:19180/v1/files/xxx.jpg"]}'

⑦ 上传视频并用 R2V 生成(推荐流程):

# 先上传参考视频
curl -X POST http://47.111.83.139:19180/v1/files/upload \
  -H "Authorization: Bearer <key>" \
  -F "file=@参考视频.mp4"
# 返回: {"url": "http://47.111.83.139:19180/v1/files/xxx.mp4"}

# 用上传的 URL 做 R2V,prompt 中用 <Video 1> 标签引用
curl -X POST http://47.111.83.139:19180/v1/videos/generations \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax_h3_r2v","prompt":"<Video 1>在玩耍,保持动作和风格","ref_videos":["http://47.111.83.139:19180/v1/files/xxx.mp4"]}'

⑧ 上传音频并用 R2V 生成:

# 先上传参考音频
curl -X POST http://47.111.83.139:19180/v1/files/upload \
  -H "Authorization: Bearer <key>" \
  -F "file=@背景音乐.mp3"
# 返回: {"url": "http://47.111.83.139:19180/v1/files/xxx.mp3"}

# 用上传的 URL 做 R2V,prompt 中用 <Audio 1> 标签引用
curl -X POST http://47.111.83.139:19180/v1/videos/generations \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax_h3_r2v","prompt":"<Audio 1>作为背景音乐,人物在跳舞","ref_audios":["http://47.111.83.139:19180/v1/files/xxx.mp3"]}'

⑨ 上传视频+音频,综合参考:

# 上传参考视频
curl -X POST http://47.111.83.139:19180/v1/files/upload -F "file=@舞蹈.mp4"
# 返回: {"url": "http://.../xxx.mp4"}

# 上传参考音频
curl -X POST http://47.111.83.139:19180/v1/files/upload -F "file=@音乐.mp3"
# 返回: {"url": "http://.../xxx.mp3"}

# 用上传的 URL 做 R2V
curl -X POST http://47.111.83.139:19180/v1/videos/generations \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"model":"minimax_h3_r2v","prompt":"<Video 1>中的动作,背景音乐参考<Audio 1>","ref_videos":["http://.../xxx.mp4"],"ref_audios":["http://.../xxx.mp3"]}'

注意事项

⚙️ 枚举值一览

画幅比例 (aspect_ratio)

1:1 (Square)2:3 (Portrait Photo)3:2 (Photo)3:4 (Portrait Standard)4:3 (Standard)9:16 (Portrait Widescreen)16:9 (Widescreen)21:9 (Ultrawide)

采样器 (sampler_name)

eulereuler_ancestralheundpmpp_2mdpmpp_2m_sdedpmpp_sdeddimlcmuni_pcddpm

⚠️ 参数校验与错误说明

参数不合法时,API 返回 HTTP 400,body 包含:

字段说明
error错误描述,如 本服务不接受 steps 参数:采样步数由模型配方固定为 3 步…
field出错的具体参数名,如 steps
detail你传的值,如 收到 999
compliance合规信息对象,包含该模型支持的参数列表、各枚举值、各范围限制

请求过于频繁返回 429(限流 30 秒窗口内最多 600 次)。

常见错误示例

错误场景返回 error
传了 steps本服务不接受 steps 参数:采样步数由模型配方固定为 3 步… + field: "steps" + detail: "收到 6"
不支持的 aspect_ratioinvalid 'aspect_ratio': 不支持的画幅比例 + detail 含合法值列表
T2V 传了 imageinvalid 'image': 该参数不适用于模型 'minimax_h3_t2v'
未知参数名invalid 'xxx': 无法识别的参数 + detail 含该模型支持的参数列表
megapixels 超出范围invalid 'megapixels': megapixels 必须在 0.1-2.0 之间

🗣️ 语音合成 TTS — IndexTTS 2.5

高质量语音合成:声音克隆、多语言、情感控制、语速/时长控制。与视频 API 完全独立。

端点

POST /v1/audio/speech — 创建语音合成任务
GET /v1/audio/speech/{id} — 查询任务状态
GET /audio/{file} — 音频下载(无需 Key)

核心参数

参数类型必填默认说明
modelstring否indextts-2.5TTS 模型(当前仅 indextts-2.5)
input / textstring是-要合成的语音文本
languagestring否ZH语言: ZH/EN/JA/ES/AR
speedfloat否1.0语速倍率 0.5~2.0
seedint否随机随机种子
voice_urlstring否-声音克隆参考音频 URL(3~10秒清晰人声)
voicestring否默认音色ComfyUI input 里已有的音频文件名

基本用法(默认音色)

curl -X POST http://47.111.83.139:19180/v1/audio/speech \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"input":"你好,欢迎使用语音合成服务。","language":"ZH","speed":1.0}'

声音克隆(上传真实音频)

# 第一步:上传参考音频(3~10 秒清晰人声)
curl -X POST http://47.111.83.139:19180/v1/files/upload \
  -H "Authorization: Bearer <key>" \
  -F "file=@参考音频.mp3"
# 返回: {"url": "http://.../v1/files/xxx.mp3"}

# 第二步:用返回的 URL 做声音克隆
curl -X POST http://47.111.83.139:19180/v1/audio/speech \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"input":"这是用真实声音克隆的语音。","language":"ZH","voice_url":"http://47.111.83.139:19180/v1/files/xxx.mp3"}'

情感控制(三种模式)

参数类型默认说明
emotion_modestringoffoff(跟随音色)/ reference_audio / vector / text
emotion_strengthfloat1.0情感强度 0.0~1.0
emotion_vectorobject-8维情感向量(vector 模式用)
emotion_textstring-情感描述(text 模式用)
emotion_audio_urlstring-情感参考音频 URL(reference_audio 模式用)
use_random_emotionboolfalse随机情感原型(vector 模式)

8 维情感向量维度:happy开心 / angry愤怒 / sad悲伤 / afraid恐惧 / disgusted厌恶 / melancholic忧郁 / surprised惊讶 / calm平静

① 8维情感向量:

curl -X POST http://47.111.83.139:19180/v1/audio/speech \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"input":"太好了,终于成功了!","language":"ZH","emotion_mode":"vector","emotion_vector":{"happy":0.7,"calm":0.3},"emotion_strength":1.0}'

② 文本描述情感(需 Qwen 模型):

curl -X POST http://47.111.83.139:19180/v1/audio/speech \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"input":"等了这么久,终于可以出发了。","emotion_mode":"text","emotion_text":"克制但难掩喜悦,声音温柔","emotion_strength":0.85}'

③ 参考音频情感(上传情感音频):

curl -X POST http://47.111.83.139:19180/v1/files/upload -F "file=@情感音频.mp3"
# 返回 {"url": "http://.../v1/files/emo.mp3"}

curl -X POST http://47.111.83.139:19180/v1/audio/speech \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"input":"虽然经历了很多困难,我们依然看到了希望。","emotion_mode":"reference_audio","emotion_audio_url":"http://.../v1/files/emo.mp3","emotion_strength":0.8}'

目标时长控制

参数类型默认说明
target_durationstringoffoff 原始时长 / native 一次推理适配 / natural 自适应 / pad 补静音 / exact 精确裁剪
target_duration_secondsfloat0目标时长(秒)
curl -X POST http://47.111.83.139:19180/v1/audio/speech \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"input":"这段语音会适配到五秒。","language":"ZH","target_duration":"native","target_duration_seconds":5.0}'

后处理

参数类型默认说明
postprocessstringoffoff / voice_clarity人声清晰 / clear_narration清晰旁白 / deharsh去刺耳 / warm温暖 / normalize归一化
postprocess_strengthfloat1.0处理强度
curl -X POST http://47.111.83.139:19180/v1/audio/speech \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"input":"这是清晰旁白后处理示例。","postprocess":"clear_narration","postprocess_strength":1.0}'

采样参数(CFM 高级)

参数类型默认说明
diffusion_stepsint25扩散步数,40~50 更稳但更慢
cfg_ratefloat0.7引导强度
cfm_temperaturefloat1.0CFM 温度,0.8 减少抖动
temperaturefloat0.8GPT 采样温度
top_pfloat0.8top-p
top_kint30top-k
beamsint3beam 数
sampleboolfalse随机采样
repetition_penaltyfloat10.0重复惩罚
max_mel_tokensint1500最大 mel token
curl -X POST http://47.111.83.139:19180/v1/audio/speech \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"input":"高清稳定旁白示例。","diffusion_steps":40,"cfg_rate":0.85,"cfm_temperature":0.8}'

分段与停顿

参数类型默认说明
segmentationstringautoauto 自动 / custom 手动
max_text_tokensint120每段最大 token
pause_presetstringoffoff / natural / narration旁白 / dialogue对话 / custom
segment_silence_msint200段间静音毫秒

文本中可用 <pause=0.8> 显式停顿(0.8秒),或 <pause=500ms>。

curl -X POST http://47.111.83.139:19180/v1/audio/speech \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"input":"第一句结束。<pause=0.8>这里停八百毫秒。","pause_preset":"narration"}'

发音控制(多音字/专有词)

参数类型说明
pronunciationstring带发音标注的文本,用 <文字|拼音> 格式
pronunciation_dictionarystring发音词典(多行,每行 词|拼音|语言)
pronunciation_strictbool严格校验(默认 true)
curl -X POST http://47.111.83.139:19180/v1/audio/speech \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"input":"小明这个题的答案是多少。","pronunciation":"小明<要求|YAO4 QIU2>这个题的答案是多少。","pronunciation_dictionary":"银行|YIN2 HANG2|ZH\n行长|HANG2 ZHANG3|ZH"}'

质量校验(ASR 自动校对重试)

参数类型默认说明
quality_retry_countint0ASR 不达标时换 seed 重试次数
quality_asr_backendstringautoauto / openai_whisper / faster_whisper
quality_asr_modelstringbasetiny / base / small / medium / turbo
quality_thresholdfloat0.82相似度阈值
curl -X POST http://47.111.83.139:19180/v1/audio/speech \
  -H "Authorization: Bearer <key>" \
  -H "Content-Type: application/json" \
  -d '{"input":"带质量校验的生成。","quality_retry_count":2,"quality_asr_backend":"auto","quality_threshold":0.82}'

📋 典型调用流程

  1. 提交任务 — POST /v1/videos/generations → 得到 job_id
  2. 轮询结果 — 每 2~5 秒请求 GET /v1/videos/generations/{id} 直至 status=completed
  3. 下载视频 — 从 data[0].url 获取下载链接(无需 Key)
此API仅供内部、工作学习及研究使用,禁止第三方使用,严禁用于违法生产和转发