MiniMax-H3 查询视频生成任务
根据任务 ID 查询视频生成、H3-Context-IR 或视频再生成任务的状态与结果(7 天内可查询)。
接口地址
http
GET /minimax/v2/query/video_generation/{task_id}请求头
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
Authorization | string | 是 | 鉴权信息,格式为 Bearer <API_KEY> |
路径参数
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
task_id | string | 是 | 要查询的任务 ID(创建任务时返回) |
请求示例
bash
curl --request GET \
--url https://neolink.com/api/minimax/v2/query/video_generation/{task_id} \
--header 'Authorization: Bearer <API_KEY>'成功响应(HTTP 200)
json
{
"task": {
"id": "424010985738629",
"model": "MiniMax-H3",
"status": "succeeded",
"created_at": 1785125529,
"updated_at": 1785125946,
"content": {
"url": "https://cdn.hailuoai.com/prod/hailuo_demo/testsets/h3_promo_eval_ref2va/gallery/sr_v2p26_trio_seed42_20260724/inputs/89f8c0bbee5b_denoise_ids_0_final.mp4"
},
"resolution": "2K",
"duration": 5,
"usage": {
"total_seconds": 5,
"input_seconds": 0,
"output_seconds": 5,
"input_image_count": 1,
"input_audio_seconds": 6,
"total_tokens": 273890,
"prompt_tokens": 13500,
"completion_tokens": 260390
},
"ratio": "16:9",
"task_type": "generation",
"modality": "video"
}
}| 字段 | 类型 | 说明 |
|---|---|---|
task.id | string | 任务 ID |
task.model | string | 使用的模型 |
task.status | string | 任务状态:queued、running、succeeded、failed、cancelled |
task.created_at | integer | 创建时间,Unix 时间戳(秒) |
task.updated_at | integer | 最后更新时间,Unix 时间戳(秒) |
task.content.url | string | 生成的视频下载链接 |
task.content.prompt | string | H3-Context-IR 任务返回的增强提示词 |
task.resolution | string | 视频分辨率 |
task.duration | integer | 视频时长(秒) |
task.ratio | string | 视频宽高比 |
task.task_type | string | 任务类型:generation、regeneration、h3_context_ir |
task.modality | string | 输出模态:video、text |
task.usage | object | 用量统计 |
usage 对象
| 字段 | 类型 | 说明 |
|---|---|---|
total_seconds | integer | 总秒数 |
input_seconds | integer | 输入视频秒数 |
output_seconds | integer | 输出视频秒数 |
input_image_count | integer | 输入图片数量 |
input_audio_seconds | integer | 输入音频秒数 |
total_tokens | integer | 总 Token 消耗 |
prompt_tokens | integer | Prompt Token 数 |
completion_tokens | integer | 生成 Token 数 |
Python 示例
python
import requests
url = "https://neolink.com/api/minimax/v2/query/video_generation/{task_id}"
headers = {"Authorization": "Bearer <API_KEY>"}
response = requests.get(url, headers=headers)
print(response.text)错误响应
| HTTP 状态码 | 错误类型 | 错误码 | 说明 |
|---|---|---|---|
| 400 | bad_request_error | 2013 | 参数无效,content 必须包含非空 text 项 |
| 401 | authorized_error | 1004 | 认证失败 |
| 402 | insufficient_balance_error | 1008 | 余额不足 |
| 422 | unprocessable_entity_error | 1026 | 视频描述包含敏感内容 |
| 429 | rate_limit_error | 1002 | 速率限制,请稍后重试 |
| 500 | server_error | 1000 | 内部错误 |
