curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3-Regeneration",
"source_task_id": "task_01J9HA7J*************"
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "MiniMax-H3-Regeneration",
"source_task_id": "task_01J9HA7J*************",
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";
const payload = {
model: "MiniMax-H3-Regeneration",
source_task_id: "task_01J9HA7J*************",
};
const headers = {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ"
}
]
}
{
"error": {
"code": 400,
"message": "请求参数无效",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "身份验证失败,请检查您的API密钥",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "账户余额不足,请充值后再试",
"type": "payment_required"
}
}
MiniMax-H3
MiniMax-H3 Regeneration 再生成
- 将 MiniMax-H3 产出的 768P 视频再生成升为 2K
- 推荐只传 source_task_id,平台自动回填 prompt、素材与源视频
- 不是通用超分:源视频必须是本模型 768P 成片
- 按秒计费($0.045/秒 输出 + 同价输入参考视频)
POST
/
v1
/
videos
/
generations
curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3-Regeneration",
"source_task_id": "task_01J9HA7J*************"
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "MiniMax-H3-Regeneration",
"source_task_id": "task_01J9HA7J*************",
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";
const payload = {
model: "MiniMax-H3-Regeneration",
source_task_id: "task_01J9HA7J*************",
};
const headers = {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ"
}
]
}
{
"error": {
"code": 400,
"message": "请求参数无效",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "身份验证失败,请检查您的API密钥",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "账户余额不足,请充值后再试",
"type": "payment_required"
}
}
Full 2K Workflow(可选):① Context-IR 增强 prompt → ② MiniMax-H3
resolution: "768P" 预览 → ③ 本接口升 2K。768P 单价 + 再生成单价 = 直出 2K 单价,试错更便宜。不是通用超分。 源视频必须是 MiniMax-H3 生成的 768P 成片。外部视频(手机拍摄、其他模型生成等)会被拒绝。
推荐用法:只传 source_task_id
只需传入上一条成功的 MiniMax-H3 · 768P 任务 task_id,服务端会自动回填所需数据。
{
"model": "MiniMax-H3-Regeneration",
"source_task_id": "task_01J9HA7J*************"
}
source_task_id 须同时满足,否则同步 400(不建任务、不扣费):
| 条件 | 说明 |
|---|---|
| 归属当前账号 | 只能升级自己的任务 |
模型为 MiniMax-H3 | 非其它模型任务 |
| 状态为成功 | 任务已 completed |
分辨率为 768P | 必须是 768P 预览成片 |
curl --request POST \
--url https://api.apimart.ai/v1/videos/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"model": "MiniMax-H3-Regeneration",
"source_task_id": "task_01J9HA7J*************"
}'
import requests
url = "https://api.apimart.ai/v1/videos/generations"
payload = {
"model": "MiniMax-H3-Regeneration",
"source_task_id": "task_01J9HA7J*************",
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json",
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
const url = "https://api.apimart.ai/v1/videos/generations";
const payload = {
model: "MiniMax-H3-Regeneration",
source_task_id: "task_01J9HA7J*************",
};
const headers = {
Authorization: "Bearer <token>",
"Content-Type": "application/json",
};
fetch(url, {
method: "POST",
headers: headers,
body: JSON.stringify(payload),
})
.then((response) => response.json())
.then((data) => console.log(data))
.catch((error) => console.error("Error:", error));
{
"code": 200,
"data": [
{
"status": "submitted",
"task_id": "task_01J9HA7JPQ9A0Z6JZ3V8M9W6PZ"
}
]
}
{
"error": {
"code": 400,
"message": "请求参数无效",
"type": "invalid_request_error"
}
}
{
"error": {
"code": 401,
"message": "身份验证失败,请检查您的API密钥",
"type": "authentication_error"
}
}
{
"error": {
"code": 402,
"message": "账户余额不足,请充值后再试",
"type": "payment_required"
}
}
认证
string
必填
Bearer Token 认证。访问 API Key 管理页面 获取密钥。
Authorization: Bearer YOUR_API_KEY
请求参数
string
必填
固定值:
MiniMax-H3-Regenerationboolean
默认值:"false"
是否在提交视频任务前执行内容审核。
true:使用omni-moderation-latest审核提示词和输入图片false或不传:不发起审核请求,不增加审核成本与延迟(默认)
string
必填
本平台上一条 成功的 MiniMax-H3 · 768P 任务 ID。传入后无需再传
prompt、源视频与参考素材;服务端自动回填。源视频规格
源视频须符合 MiniMax-H3 的 768P 输出规格:| 项目 | 要求 |
|---|---|
| 音轨 | 必须有,不支持无音轨视频 |
| 帧率 | 24 fps |
| 宽 / 高 | 均能被 32 整除 |
| 面积 | ≤ 768 × 1344(1,032,192 像素) |
| 总帧数 | 107 |
计费
按秒计费(结构与 H3 生成同构,单价不同):| 项目 | 单价 |
|---|---|
| 输出(768P → 2K) | $0.045 / 秒 |
| 输入参考视频 | $0.045 / 秒 |
| 输入图片 | 5 张以内免费,超出 $0.0225 / 张 |
| 输入音频 | 免费 |
总费用 = 0.045 × (源视频时长 + 参考视频总时长) + 0.0225 × max(0, 图片张数 - 5)
原 768P 任务用过的素材在再生成时会重新计费,不只收输出秒数。算例
| 场景 | 费用 |
|---|---|
| 5 秒源视频,无额外素材 | $0.225 |
| 10 秒源视频 + 2 张图 | $0.45(图 ≤5 免费) |
| 6 秒源视频 + 8 秒参考视频 + 7 张图 | $0.675 |
source_task_id 时按原任务真实输出秒数精确预扣。
请求示例
source_task_id
{
"model": "MiniMax-H3-Regeneration",
"source_task_id": "task_01J9HA7J*************"
}
常见错误
提交阶段参数错误为同步 400,不建任务、不扣费:| 场景 | 说明 |
|---|---|
source_task_id 无效 | 非本账号 / 非 MiniMax-H3 / 未成功 / 非 768P |
Response
integer
响应状态码,成功时为 200
array
使用 获取任务状态 轮询。成功后取
result.videos[0].url。