# MiniMax-H3 视频生成任务状态

> 视频生成

查询异步任务状态。任务成功后，`output.urls` 中会包含生成的视频 URL，`usage` 中会包含视频时长、输入媒体和比例等用量信息。

## 请求地址

`GET https://api.modelverse.cn/v1/tasks/status`

## 请求参数

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| task_id | query | string | Yes | 由 `/v1/tasks/submit` 返回的异步任务标识符，包括 `h3-` 前缀。 |

## 响应

- **200** — 任务状态响应。
- **400** — 任务标识或请求参数无效。
- **default** — 错误响应。

## OpenAPI 定义

```json
{
  "openapi": "3.1.0",
  "x-language": "zh-CN",
  "info": {
    "title": "MiniMax-H3 多模态生成视频接口文档",
    "version": "1.0.0",
    "description": "这是 ModelVerse 上 `MiniMax-H3` 的多模态视频生成接口文档，说明如何提交文生视频、图生视频（首帧、尾帧或首尾帧）和多模态参考生视频任务，以及如何查询任务状态和读取视频结果。\n接口路径包括 `POST /v1/tasks/submit`、`GET /v1/tasks/status`。\n"
  },
  "servers": [
    {
      "url": "https://api.modelverse.cn",
      "description": "该模型文档中使用的 ModelVerse API 端点。"
    }
  ],
  "tags": [
    {
      "name": "MiniMax-H3",
      "description": "MiniMax-H3 多模态异步视频生成任务。"
    }
  ],
  "paths": {
    "/v1/tasks/submit": {
      "post": {
        "tags": [
          "MiniMax-H3"
        ],
        "operationId": "submitMiniMaxH3Task",
        "summary": "MiniMax-H3 多模态生成视频",
        "description": "提交异步视频生成任务。`input.content` 中必须且只能包含一个非空文本项；模型会根据其余媒体项及 `role` 自动选择生成模式。\n\n支持的输入组合：\n- 文生视频：仅包含一个 `text` 项。\n- 图生视频：`text` 加一张首帧或尾帧图片，或者加首帧和尾帧各一张。\n- 多模态参考生视频：`text` 加参考图片、参考视频和参考音频的组合；不能只提供参考音频，至少需要一张参考图片或一个参考视频。\n\n图生视频与多模态参考生视频互斥，不能在同一次请求中混用帧图片和参考媒体。请求体总大小不得超过 64 MB；所有媒体都必须通过公网 HTTP/HTTPS URL 提供，不支持 Base64。\n",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MiniMaxH3SubmitRequest"
              },
              "examples": {
                "textToVideo": {
                  "summary": "文生视频",
                  "value": {
                    "model": "MiniMax-H3",
                    "input": {
                      "content": [
                        {
                          "type": "text",
                          "text": "史诗级太空歌剧院线预告：女舰长独自站在巨大观景窗前，最后一支舰队正在集结并跃迁离去，强光爆闪、舰桥震动，她被留在原地。"
                        }
                      ]
                    },
                    "parameters": {
                      "resolution": "2K",
                      "duration": 5,
                      "ratio": "16:9",
                      "aigc_watermark": false
                    }
                  }
                },
                "firstFrame": {
                  "summary": "首帧图生视频",
                  "value": {
                    "model": "MiniMax-H3",
                    "input": {
                      "content": [
                        {
                          "type": "text",
                          "text": "Pull focus to the people in the background and add more steam to the ramen bowl."
                        },
                        {
                          "type": "image_url",
                          "image_url": {
                            "url": "https://cdn.hailuoai.com/prod/hailuo_demo/testsets/H3_AA_I2VA/gallery/sr_v17_variants_seed42_43_20260724/inputs/4a3a90bf9100_KDmcbkhzYo5sjjxr9FqcVmWVnzb.png"
                          },
                          "role": "first_frame"
                        }
                      ]
                    },
                    "parameters": {
                      "resolution": "768P",
                      "duration": 7,
                      "ratio": "adaptive",
                      "aigc_watermark": false
                    }
                  }
                },
                "firstAndLastFrame": {
                  "summary": "首尾帧图生视频",
                  "value": {
                    "model": "MiniMax-H3",
                    "input": {
                      "content": [
                        {
                          "type": "text",
                          "text": "帮我生成这个水墨画的渐变视频"
                        },
                        {
                          "type": "image_url",
                          "image_url": {
                            "url": "https://jiangtest.cn-bj.ufileos.com/c97801b16e654a31b73c6abc4de292a0.png"
                          },
                          "role": "first_frame"
                        },
                        {
                          "type": "image_url",
                          "image_url": {
                            "url": "https://jiangtest.cn-bj.ufileos.com/dd6986fe7d31443aa43551e8b222c94b.png"
                          },
                          "role": "last_frame"
                        }
                      ]
                    },
                    "parameters": {
                      "resolution": "2K",
                      "duration": 10,
                      "ratio": "adaptive",
                      "aigc_watermark": false
                    }
                  }
                },
                "referenceVideoAndAudio": {
                  "summary": "参考视频和音频生成视频",
                  "value": {
                    "model": "MiniMax-H3",
                    "input": {
                      "content": [
                        {
                          "type": "text",
                          "text": "角色说话：Follow the wind, live free. Leave worries behind, enjoy the moment，音色参考音频1"
                        },
                        {
                          "type": "video_url",
                          "video_url": {
                            "url": "https://cdn.hailuoai.com/prod/hailuo_demo/testsets/h3_promo_eval_ref2va/gallery/sr_v2p26_trio_seed42_20260724/inputs/297573323635_00_%E8%A7%86%E9%A2%911_YnyRbxEwio_video_20260525_163755_1927e9d3.mp4"
                          },
                          "role": "reference_video"
                        },
                        {
                          "type": "audio_url",
                          "audio_url": {
                            "url": "https://cdn.hailuoai.com/prod/hailuo_demo/testsets/h3_promo_eval_ref2va/gallery/sr_v2p26_trio_seed42_20260724/inputs/f463d523c5ce_01_%E9%9F%B3%E9%A2%911_RSLcbpzJPo_6%E6%9C%885%E6%97%A5(1).mp3"
                          },
                          "role": "reference_audio"
                        }
                      ]
                    },
                    "parameters": {
                      "resolution": "2K",
                      "duration": 10,
                      "ratio": "16:9",
                      "aigc_watermark": false
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "任务提交成功。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MiniMaxH3SubmitResponse"
                },
                "examples": {
                  "submitted": {
                    "summary": "已提交任务",
                    "value": {
                      "output": {
                        "task_id": "h3-424010985738629"
                      },
                      "request_id": "req_xxxxxxxxxxxxx"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "请求参数或输入组合无效。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MiniMaxH3ErrorResponse"
                },
                "examples": {
                  "paramError": {
                    "$ref": "#/components/examples/MiniMaxH3ParamError"
                  }
                }
              }
            }
          },
          "default": {
            "description": "错误响应。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MiniMaxH3ErrorResponse"
                },
                "examples": {
                  "error": {
                    "$ref": "#/components/examples/MiniMaxH3ParamError"
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/tasks/status": {
      "get": {
        "tags": [
          "MiniMax-H3"
        ],
        "operationId": "getMiniMaxH3TaskStatus",
        "summary": "MiniMax-H3 视频生成任务状态",
        "description": "查询异步任务状态。任务成功后，`output.urls` 中会包含生成的视频 URL，`usage` 中会包含视频时长、输入媒体和比例等用量信息。",
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "task_id",
            "in": "query",
            "required": true,
            "description": "由 `/v1/tasks/submit` 返回的异步任务标识符，包括 `h3-` 前缀。",
            "schema": {
              "type": "string"
            },
            "example": "h3-424010985738629"
          }
        ],
        "responses": {
          "200": {
            "description": "任务状态响应。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MiniMaxH3StatusResponse"
                },
                "examples": {
                  "success": {
                    "summary": "成功任务",
                    "value": {
                      "output": {
                        "task_id": "h3-424010985738629",
                        "task_status": "Success",
                        "urls": [
                          "https://your-cdn.example.com/h3-generated-2k-output.mp4"
                        ],
                        "submit_time": 1785125529,
                        "finish_time": 1785125946
                      },
                      "usage": {
                        "prompt_tokens": 0,
                        "completion_tokens": 0,
                        "total_tokens": 0,
                        "duration": 5,
                        "output_video_duration": 5,
                        "video_count": 1,
                        "ratio": "16:9"
                      },
                      "request_id": ""
                    }
                  },
                  "failure": {
                    "summary": "失败任务",
                    "value": {
                      "output": {
                        "task_id": "h3-424010985738629",
                        "task_status": "Failure",
                        "submit_time": 1785125529,
                        "finish_time": 1785125540,
                        "error_message": "task failed"
                      },
                      "usage": {
                        "prompt_tokens": 0,
                        "completion_tokens": 0,
                        "total_tokens": 0,
                        "duration": 5
                      },
                      "request_id": ""
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "任务标识或请求参数无效。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MiniMaxH3ErrorResponse"
                },
                "examples": {
                  "paramError": {
                    "$ref": "#/components/examples/MiniMaxH3ParamError"
                  }
                }
              }
            }
          },
          "default": {
            "description": "错误响应。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/MiniMaxH3ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key",
        "description": "请在请求头中携带 `Authorization: Bearer {your_api_key}`。"
      }
    },
    "schemas": {
      "MiniMaxH3SubmitRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "model",
          "input",
          "parameters"
        ],
        "properties": {
          "model": {
            "type": "string",
            "const": "MiniMax-H3",
            "description": "模型名称。此文档固定为 `MiniMax-H3`。"
          },
          "input": {
            "$ref": "#/components/schemas/MiniMaxH3Input"
          },
          "parameters": {
            "$ref": "#/components/schemas/MiniMaxH3Parameters"
          }
        }
      },
      "MiniMaxH3Input": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "content"
        ],
        "properties": {
          "content": {
            "type": "array",
            "minItems": 1,
            "maxItems": 16,
            "description": "多模态输入数组。必须且只能包含一个非空 `text` 项。\n\n图片角色：`first_frame`、`last_frame`、`reference_image`。单张没有 `role` 的图片按首帧处理。首帧和尾帧各最多 1 张，参考图最多 9 张。\n视频必须使用 `reference_video` 角色，最多 3 个；音频必须使用 `reference_audio` 角色，最多 3 个。只提供参考音频无效，至少还需一张参考图或一个参考视频。\n",
            "items": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/MiniMaxH3TextContent"
                },
                {
                  "$ref": "#/components/schemas/MiniMaxH3ImageContent"
                },
                {
                  "$ref": "#/components/schemas/MiniMaxH3VideoContent"
                },
                {
                  "$ref": "#/components/schemas/MiniMaxH3AudioContent"
                }
              ]
            }
          }
        }
      },
      "MiniMaxH3TextContent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "text"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "text"
          },
          "text": {
            "type": "string",
            "minLength": 1,
            "description": "用于指导视频生成的非空文本提示词。"
          }
        }
      },
      "MiniMaxH3ImageContent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "image_url"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "image_url"
          },
          "image_url": {
            "$ref": "#/components/schemas/MiniMaxH3URLObject"
          },
          "role": {
            "type": "string",
            "description": "不填写时按 `first_frame` 处理。",
            "enum": [
              "first_frame",
              "last_frame",
              "reference_image"
            ]
          }
        },
        "description": "图片仅支持公网 HTTP/HTTPS URL，不支持 Base64。支持 JPG、JPEG、PNG、WEBP、HEIC、HEIF；单文件不超过 30 MB；宽高均为 256～5760 px；宽高比（宽/高）为 0.4～2.5。\n"
      },
      "MiniMaxH3VideoContent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "video_url",
          "role"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "video_url"
          },
          "video_url": {
            "$ref": "#/components/schemas/MiniMaxH3URLObject"
          },
          "role": {
            "type": "string",
            "const": "reference_video"
          }
        },
        "description": "仅用于多模态参考生视频。支持公网 URL 指向的 MP4 或 MOV；视频编码支持 H.264/AVC、H.265/HEVC，音频编码支持 AAC、MP3。单文件不超过 50 MB；单段 2～15 秒、总时长不超过 15 秒；宽高均为 256～5760 px；宽高比为 0.4～2.5；帧率为 23.976～60 fps。\n"
      },
      "MiniMaxH3AudioContent": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type",
          "audio_url",
          "role"
        ],
        "properties": {
          "type": {
            "type": "string",
            "const": "audio_url"
          },
          "audio_url": {
            "$ref": "#/components/schemas/MiniMaxH3URLObject"
          },
          "role": {
            "type": "string",
            "const": "reference_audio"
          }
        },
        "description": "仅用于多模态参考生视频。支持公网 URL 指向的 WAV 或 MP3；单文件不超过 15 MB；单段 2～15 秒、总时长不超过 15 秒。参考音频不能单独使用。\n"
      },
      "MiniMaxH3URLObject": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "pattern": "^https?://",
            "description": "可由 MiniMax 服务访问的公网 HTTP/HTTPS URL；不支持 Base64 或 data URL。"
          }
        }
      },
      "MiniMaxH3Parameters": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "resolution",
          "duration"
        ],
        "properties": {
          "resolution": {
            "type": "string",
            "description": "输出视频分辨率。",
            "enum": [
              "768P",
              "2K"
            ]
          },
          "duration": {
            "type": "integer",
            "minimum": 4,
            "maximum": 15,
            "description": "输出视频时长，单位为秒；必须为 4～15 的整数。"
          },
          "ratio": {
            "type": "string",
            "default": "adaptive",
            "enum": [
              "adaptive",
              "21:9",
              "16:9",
              "4:3",
              "1:1",
              "3:4",
              "9:16"
            ],
            "description": "输出视频宽高比。\n- 文生视频：必填，且不能使用 `adaptive`。\n- 图生视频：由输入图片决定，实际按 `adaptive` 处理；建议传 `adaptive`。\n- 多模态参考生视频：可选，默认 `adaptive`，也可指定具体比例。\n"
          },
          "aigc_watermark": {
            "type": "boolean",
            "default": false,
            "description": "是否在生成的视频中添加 AIGC 标识水印。默认不添加。"
          }
        }
      },
      "MiniMaxH3SubmitResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "output",
          "request_id"
        ],
        "properties": {
          "output": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "task_id"
            ],
            "properties": {
              "task_id": {
                "type": "string",
                "description": "异步任务唯一标识。MiniMax-H3 任务由 ModelVerse 添加 `h3-` 前缀。"
              }
            }
          },
          "request_id": {
            "type": "string",
            "description": "唯一请求标识。"
          }
        }
      },
      "MiniMaxH3StatusResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "output",
          "request_id"
        ],
        "properties": {
          "output": {
            "$ref": "#/components/schemas/MiniMaxH3StatusOutput"
          },
          "usage": {
            "$ref": "#/components/schemas/MiniMaxH3Usage"
          },
          "request_id": {
            "type": "string",
            "description": "唯一请求标识。"
          }
        }
      },
      "MiniMaxH3StatusOutput": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "task_id",
          "task_status"
        ],
        "properties": {
          "task_id": {
            "type": "string",
            "description": "异步任务唯一标识。"
          },
          "task_status": {
            "$ref": "#/components/schemas/MiniMaxH3TaskStatus"
          },
          "urls": {
            "type": "array",
            "description": "任务成功后返回的视频 URL 列表。",
            "items": {
              "type": "string",
              "format": "uri"
            }
          },
          "submit_time": {
            "type": "integer",
            "format": "int64",
            "description": "任务提交时间戳（Unix 时间戳，秒级）。"
          },
          "finish_time": {
            "type": "integer",
            "format": "int64",
            "description": "任务完成时间戳（Unix 时间戳，秒级）。"
          },
          "error_message": {
            "type": "string",
            "description": "任务失败时返回的错误信息。"
          }
        }
      },
      "MiniMaxH3TaskStatus": {
        "type": "string",
        "description": "异步任务状态。",
        "enum": [
          "Pending",
          "Running",
          "Success",
          "Failure"
        ]
      },
      "MiniMaxH3Usage": {
        "type": "object",
        "additionalProperties": true,
        "properties": {
          "prompt_tokens": {
            "type": "integer"
          },
          "completion_tokens": {
            "type": "integer"
          },
          "total_tokens": {
            "type": "integer"
          },
          "duration": {
            "type": "integer",
            "description": "请求的输出视频时长，单位为秒。"
          },
          "input_video_duration": {
            "type": "number",
            "description": "参考视频输入时长，单位为秒。"
          },
          "output_video_duration": {
            "type": "number",
            "description": "输出视频时长，单位为秒。"
          },
          "video_count": {
            "type": "integer",
            "description": "输出视频数量。"
          },
          "ratio": {
            "type": "string",
            "description": "实际输出视频宽高比。"
          }
        }
      },
      "MiniMaxH3ErrorResponse": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/MiniMaxH3ErrorObject"
          }
        }
      },
      "MiniMaxH3ErrorObject": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "message",
          "type"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "错误信息。"
          },
          "type": {
            "type": "string",
            "description": "错误类型。"
          },
          "code": {
            "type": [
              "string",
              "null"
            ],
            "description": "错误码。"
          },
          "param": {
            "type": [
              "string",
              "null"
            ],
            "description": "相关请求参数，如有。"
          }
        }
      }
    },
    "examples": {
      "MiniMaxH3ParamError": {
        "summary": "参数错误",
        "value": {
          "error": {
            "message": "input.content 中必须且只能包含一个非空 text 项",
            "type": "invalid_request_error",
            "code": "param_error",
            "param": "input.content"
          }
        }
      }
    }
  }
}
```
