Create a MiniMax-H3/H3-Max v2 video task
curl --request POST \
--url https://xuwuai.com/minimaxi/v2/video_generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": [
{
"type": "text",
"text": "<string>"
}
],
"duration": 9,
"resolution": "768P",
"callback_url": "<string>"
}
'import requests
url = "https://xuwuai.com/minimaxi/v2/video_generation"
payload = {
"content": [
{
"type": "text",
"text": "<string>"
}
],
"duration": 9,
"resolution": "768P",
"callback_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: [{type: 'text', text: '<string>'}],
duration: 9,
resolution: '768P',
callback_url: '<string>'
})
};
fetch('https://xuwuai.com/minimaxi/v2/video_generation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://xuwuai.com/minimaxi/v2/video_generation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'content' => [
[
'type' => 'text',
'text' => '<string>'
]
],
'duration' => 9,
'resolution' => '768P',
'callback_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://xuwuai.com/minimaxi/v2/video_generation"
payload := strings.NewReader("{\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"<string>\"\n }\n ],\n \"duration\": 9,\n \"resolution\": \"768P\",\n \"callback_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://xuwuai.com/minimaxi/v2/video_generation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"<string>\"\n }\n ],\n \"duration\": 9,\n \"resolution\": \"768P\",\n \"callback_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://xuwuai.com/minimaxi/v2/video_generation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"<string>\"\n }\n ],\n \"duration\": 9,\n \"resolution\": \"768P\",\n \"callback_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>",
"platform_id": "<string>"
}视频生成
视频生成(H3 / H3-Max / v2)
MiniMax-H3 与 H3-Max v2 视频任务的 OneHub 代理接口
POST
/
minimaxi
/
v2
/
video_generation
Create a MiniMax-H3/H3-Max v2 video task
curl --request POST \
--url https://xuwuai.com/minimaxi/v2/video_generation \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content": [
{
"type": "text",
"text": "<string>"
}
],
"duration": 9,
"resolution": "768P",
"callback_url": "<string>"
}
'import requests
url = "https://xuwuai.com/minimaxi/v2/video_generation"
payload = {
"content": [
{
"type": "text",
"text": "<string>"
}
],
"duration": 9,
"resolution": "768P",
"callback_url": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
content: [{type: 'text', text: '<string>'}],
duration: 9,
resolution: '768P',
callback_url: '<string>'
})
};
fetch('https://xuwuai.com/minimaxi/v2/video_generation', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://xuwuai.com/minimaxi/v2/video_generation",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'content' => [
[
'type' => 'text',
'text' => '<string>'
]
],
'duration' => 9,
'resolution' => '768P',
'callback_url' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://xuwuai.com/minimaxi/v2/video_generation"
payload := strings.NewReader("{\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"<string>\"\n }\n ],\n \"duration\": 9,\n \"resolution\": \"768P\",\n \"callback_url\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://xuwuai.com/minimaxi/v2/video_generation")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"<string>\"\n }\n ],\n \"duration\": 9,\n \"resolution\": \"768P\",\n \"callback_url\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://xuwuai.com/minimaxi/v2/video_generation")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"content\": [\n {\n \"type\": \"text\",\n \"text\": \"<string>\"\n }\n ],\n \"duration\": 9,\n \"resolution\": \"768P\",\n \"callback_url\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"task_id": "<string>",
"platform_id": "<string>"
}接口范围
MiniMax 官方 H3/H3-Max v2 能力使用POST /v2/video_generation 创建任务,并使用
GET /v2/query/video_generation/{task_id} 查询任务。它支持 URL、mm_file 和
data URI 形式的媒体输入。H3 为 768P/2K、4–15 秒;H3-Max 为 480P/768P、5–15 秒。
OneHub 将该能力代理为以下鉴权接口;两者都必须带 Bearer Token:
| 操作 | OneHub 路径 |
|---|---|
| 创建 | POST /minimaxi/v2/video_generation |
| 查询 | GET /minimaxi/v2/query/video_generation/{task_id} |
Authorization: Bearer $TOKEN
model 可为 MiniMax-H3 或 MiniMax-H3-Max。H3-Max 只接受文本和首/尾帧图片,
不接受参考素材;minimax-h3-768p-second、
minimax-h3-2k-second 和 minimax-h3-extra-input-image 是 OneHub 内部计费组件
SKU;minimax-h3-max-480p-second 和 minimax-h3-max-768p-second 是 H3-Max 内部
计费组件 SKU。它们不能作为 model 值,也不是可配置的模型 allowlist 条目。
创建请求
{
"model": "MiniMax-H3-Max",
"content": [
{"type": "text", "text": "A cat walking on the beach at sunset"}
],
"duration": 5,
"resolution": "768P",
"ratio": "16:9"
}
duration必填;H3 为 4–15 秒,H3-Max 为 5–15 秒。resolution可省略(默认768P);H3 只能为768P/2K,H3-Max 只能为480P/768P。content必须恰好有一个非空text项,提示词最多 7000 个 Unicode 字符;text项不能设置role。- 媒体项总数最多 12:
image_url最多一个first_frame、一个last_frame、9 个reference_image;video_url最多 3 个reference_video;audio_url最多 3 个reference_audio。image_url未提供role时会按first_frame处理。 - 首/尾帧模式不能与任何参考素材混用;只有
reference_audio时,必须同时提供reference_image或reference_video。
比例与模式
- 文生视频:没有媒体项时,
ratio必填,且必须是具体比例,不能为adaptive。 - 首/尾帧:包含
first_frame或last_frame时,OneHub 使用adaptive。 - 参考素材:包含任一
reference_*项时,ratio可省略(会使用adaptive), 也可以传adaptive或具体比例。
adaptive、21:9、16:9、4:3、1:1、3:4、9:16;前述模式规则会
进一步限制其可用性。
媒体 locator 与大小限制
每个image_url.url、video_url.url 和 audio_url.url 只能使用下列 locator:
- 公网
https://URL。OneHub 会对 URL 做 DNS fail-closed 和私网/回环地址拦截; 不接受 HTTP、file:、ftp:、blob:、javascript:或协议相对 URL。 - 严格的
data:<mime>;base64,<payload>。metadata 必须恰为<mime>;base64,不能有 空白字符,payload 必须是非空严格 Base64。 - authority-only 的
mm_file://<positive-int64>。只允许正十进制 int64 authority, 不能包含用户信息、端口、路径、query 或 fragment。
| 输入类型 | 允许的 MIME | 解码后上限 |
|---|---|---|
image_url | image/jpeg、image/jpg、image/png、image/webp、image/heic、image/heif | 30 MiB |
video_url | video/mp4 | 50 MiB |
audio_url | audio/wav、audio/mp3 | 15 MiB |
mm_file 引用不会由 OneHub 拉取或在本地检查媒体内容,媒体格式等
官方约束由上游校验。完整 JSON 请求体最大为 64 MiB;data URI 的 Base64 膨胀和其他
字段也计入该限制,因此实际可用的解码后大小会低于单文件上限。
创建示例
curl -X POST "https://xuwuai.com/minimaxi/v2/video_generation" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMax-H3-Max",
"content": [{"type": "text", "text": "A cat walking on the beach at sunset"}],
"duration": 5,
"resolution": "768P",
"ratio": "16:9"
}'
{
"task_id": "upstream-task-id",
"platform_id": "video_01JSGXXXXXXXXXXXXXXXXXX"
}
查询任务
将创建响应的task_id(或 platform_id)放入路径参数:
curl "https://xuwuai.com/minimaxi/v2/query/video_generation/$TASK_ID" \
-H "Authorization: Bearer $TOKEN"
task 对象,并在顶层附加 platform_id;base_resp 也可能出现。
task 可包含 id、status、model、task_type、resolution、duration、
created_at、updated_at、content.url、usage 和 error。status 与时间字段以
上游实际返回为准。
{
"task": {
"id": "upstream-task-id",
"status": "succeeded",
"content": {"url": "https://..."},
"usage": {
"input_seconds": 0,
"output_seconds": 5,
"total_seconds": 5,
"input_image_count": 0
}
},
"platform_id": "video_01JSGXXXXXXXXXXXXXXXXXX",
"base_resp": {"status_code": 0, "status_msg": "success"}
}
task.content.url 是上游签名 URL。它会过期,具体有效期以该 URL 与上游
返回为准;请在收到后及时使用,不要把完整签名 URL 写入日志或长期存储。
本文档不对创建失败、任务失败或取消时的计费结果作额外承诺;计费与额度以 OneHub 账户
和实际任务结算记录为准。Authorizations
Authorization: Bearer
Body
application/json
Available options:
MiniMax-H3, MiniMax-H3-Max Exactly one text item and at most 12 media items.
Required array length:
1 - 13 elements- Option 1
- Option 2
- Option 3
- Option 4
Show child attributes
Show child attributes
Output duration in seconds (H3: 4-15; H3-Max: 5-15).
Required range:
4 <= x <= 15H3 supports 768P/2K; H3-Max supports 480P/768P.
Available options:
480P, 768P, 2K Required and concrete for text-only generation; adaptive is used for first/last-frame mode and is the default for reference mode.
Available options:
adaptive, 21:9, 16:9, 4:3, 1:1, 3:4, 9:16