API 参考视频MiniMax H3
查询任务
MiniMax H3 V2 查询视频生成任务状态与结果接口。
按任务 ID 查询视频生成任务。任务 ID 必须是创建接口返回的 AIZNT 公开 task_id;网关会在内部映射到上游 MiniMax 任务。
请求
| 项目 | 值 |
|---|---|
| 请求方法 | GET |
| 请求地址 | https://token.aiznt.com/v2/query/video_generation/{task_id} |
| 路径参数 | task_id:创建接口返回的任务 ID |
| 认证方式 | Authorization: Bearer sk-你的密钥 |
curl "https://token.aiznt.com/v2/query/video_generation/task_01JZ3Q7M7Y7X5Y6R8K9P" \
-H "Authorization: Bearer sk-你的密钥"任务记录仅保留最近 7 天(按 UTC 时间计算)。视频产物 URL 具有时效性,成功后请及时下载或转存。
响应
生成中
{
"task": {
"id": "task_01JZ3Q7M7Y7X5Y6R8K9P",
"model": "MiniMax-H3",
"status": "running",
"created_at": 1785125529,
"updated_at": 1785125600,
"resolution": "2K",
"duration": 5,
"ratio": "16:9",
"task_type": "generation",
"modality": "video"
}
}生成成功
{
"task": {
"id": "task_01JZ3Q7M7Y7X5Y6R8K9P",
"model": "MiniMax-H3",
"status": "succeeded",
"created_at": 1785125529,
"updated_at": 1785125946,
"content": {
"url": "https://cdn.example.com/h3-generated.mp4"
},
"resolution": "2K",
"duration": 5,
"usage": {
"total_seconds": 5,
"input_seconds": 0,
"output_seconds": 5,
"input_image_count": 0,
"total_tokens": 273890,
"prompt_tokens": 13500,
"completion_tokens": 260390
},
"ratio": "16:9",
"task_type": "generation",
"modality": "video"
}
}失败或取消
{
"task": {
"id": "task_01JZ3Q7M7Y7X5Y6R8K9P",
"model": "MiniMax-H3",
"status": "failed",
"error": {
"code": "1026",
"message": "video description contains sensitive content"
},
"task_type": "generation",
"modality": "video"
}
}task 字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | AIZNT 对外公开任务 ID。 |
model | string | 实际使用的模型,如 MiniMax-H3。 |
status | string | queued(排队)、running(运行中)、succeeded(成功)、failed(失败)、cancelled(取消)。 |
created_at / updated_at | integer | Unix 时间戳,单位为秒。 |
content.url | string | 视频产物的限时下载地址,仅成功的视频任务返回。 |
resolution | string | 产物分辨率。 |
duration | integer | 产物时长,单位为秒。 |
ratio | string | 产物宽高比;输入自适应时以此字段为准。 |
task_type | string | 当前创建接口为 generation;官方还可能返回 regeneration 或 h3_context_ir。 |
modality | string | 视频任务为 video。 |
error | object | 失败/取消时的错误信息,包含 code 和 message。 |
usage 字段
| 字段 | 说明 |
|---|---|
total_seconds | 计量总秒数,通常为输入秒数与输出秒数之和。 |
input_seconds | 参考视频输入秒数。 |
output_seconds | 输出视频秒数。 |
input_image_count | 输入图片数量(首帧、尾帧和参考图合计)。 |
input_audio_seconds | 参考音频输入秒数;无参考音频时可能不返回。 |
total_tokens | 总 Token 数。 |
prompt_tokens | 输入 Token 数。 |
completion_tokens | 输出 Token 数。 |
轮询建议
建议每 3–10 秒查询一次。收到 queued 或 running 时继续轮询;收到 succeeded 后下载 content.url;收到 failed 或 cancelled 时停止并读取 error.message。
常见错误
| HTTP 状态 | 含义 |
|---|---|
400 | task_id 缺失、格式错误、任务不存在或已超出 7 天查询窗口。 |
401 | Authorization 缺失或密钥无效。 |
429 | 查询请求触发限流。 |
500 | 上游或网关内部错误。 |