MiniMax H3
Generate video from text, images, first and last frames, or mixed references, billed by output seconds and reference media.
The public model ID is MiniMax-H3, shown in the console as MiniMax H3. It supports 480p and 768p; omitting input.resolution defaults to 768p. Duration is an integer from 2 to 15 seconds; omitting input.duration defaults to 5. The API neither accepts nor returns the internal upstream model ID.
MiniMax H3 uses only the official API relay channel. Authorize the model on an API key in the console, then call the asynchronous media task API.
Generation modes
| Mode | task | Input |
|---|---|---|
| Text to video | Txt2Video | input.prompt is non-empty, and the image, video, and audio arrays are empty |
| Image to video | Img2Video | input.images contains exactly one URL |
| First and last | Img2Video | input.images contains exactly two URLs, first frame then last frame |
| Reference | OmniVideo | At least one of input.images, input.videos, or input.audios is non-empty |
Reference mode accepts at most 9 images, 3 videos, and 3 audio clips. Each asset must be a non-empty string URL. Upload local files or Base64 through file uploads first.
When input.videos is non-empty, input.video_durations is required. It must be the same length as input.videos, and each entry is that clip's duration in positive seconds. The platform does not probe file duration. A missing or non-positive duration is rejected and is never billed as 0 seconds.
Request fields
| Field | Required | Description |
|---|---|---|
task | Yes | Txt2Video, Img2Video, or OmniVideo |
model | Yes | Fixed to MiniMax-H3 on this page |
input.prompt | Text mode | Non-empty description for text-to-video |
input.images | By mode | One image, two frames, or up to 9 reference images |
input.videos | No | Up to 3 reference videos. A non-empty array selects reference-video pricing |
input.video_durations | With videos | Positive seconds, one per input.videos item. Each billed duration is capped at the output duration |
input.audios | No | Up to 3 reference audio clips. Audio is not billed |
input.resolution | No | 480p or 768p, case-insensitive; default 768p |
input.duration | No | Integer seconds from 2 to 15; default 5 |
callback_url | No | Optional public HTTPS webhook. See media task callbacks. |
callback_url is not forwarded upstream. Poll with the platform task ID. Fields not listed above are forwarded as-is; the platform does not guarantee them.
Examples
Each JSON body is sent to POST /v1/router/task/create. Use Authorization: Bearer sk-your-key or x-api-key: sk-your-key.
Text to video
Omitting resolution and duration uses 768p and 5 seconds.
{
"task": "Txt2Video",
"model": "MiniMax-H3",
"input": { "prompt": "A cinematic sunrise over a mountain ridge, clouds drifting slowly" }
}Image to video
input.images contains exactly one URL. This mode does not add the reference-image surcharge.
{
"task": "Img2Video",
"model": "MiniMax-H3",
"input": {
"prompt": "Let the clouds drift slowly while the camera moves steadily forward",
"images": ["https://assets.example.com/input.png"],
"duration": 5,
"resolution": "768p"
}
}First and last frame
The first URL is the first frame and the second is the last frame. This mode does not add the reference-image surcharge.
{
"task": "Img2Video",
"model": "MiniMax-H3",
"input": {
"prompt": "The shot moves naturally from morning to dusk",
"images": ["https://assets.example.com/first.png", "https://assets.example.com/last.png"],
"duration": 10,
"resolution": "480p"
}
}Reference
A non-empty input.videos uses reference-video pricing. Images without videos use reference-image pricing. Audio alone uses the text-to-video rate, and audio itself is not billed. The clip below is 20 seconds; with a 15-second output it is billed as 15 seconds.
{
"task": "OmniVideo",
"model": "MiniMax-H3",
"input": {
"prompt": "Keep the character from the reference image and follow the camera motion",
"images": ["https://assets.example.com/character.png"],
"videos": ["https://assets.example.com/camera-motion.mp4"],
"video_durations": [20],
"duration": 15,
"resolution": "768p"
}
}Query and response
A successful create call returns a platform tsk_* task ID immediately.
{ "code": 200, "message": "success", "task_id": "tsk_0f3c9a72b1e04d5f" }Poll GET /v1/router/tasks/{task_id} every 3–5 seconds. An API key can only read tasks created by the same buyer.
GET https://hopsapi.com/v1/router/tasks/tsk_0f3c9a72b1e04d5f
Authorization: Bearer sk-your-key| Status | Meaning |
|---|---|
0 | Queued |
1 | Processing |
2 | Succeeded; billing is complete and the video is ready |
3 | Failed; no charge |
4 | Cancelled; no charge |
{
"task_id": "tsk_0f3c9a72b1e04d5f",
"status": 2,
"result": {
"content": { "video_url": "https://static.example.com/video.mp4" },
"resolution": "768p"
},
"cost": 12.34
}A failed terminal query still returns HTTP 200. The body uses code=424 and a traceable request ID. Provider diagnostics are not returned.
{
"code": 424,
"message": "Provider error (request id: aitk-...)",
"task_id": "tsk_0f3c9a72b1e04d5f",
"status": 3,
"fail_reason": "Provider error (request id: aitk-...)"
}Per-second pricing
The official price is locked when the task is created. It is the output fee plus the reference-image surcharge plus the reference-video surcharge. cost in the query response is that official price multiplied by the account price coefficient, in credits. Failed and cancelled tasks are not charged.
The table below is the provider price in CNY. Text-to-video and first-and-last-frame use the image-to-video rate.
| Pricing mode | Request | 480p | 768p |
|---|---|---|---|
| Text to video | Txt2Video | ¥0.06/sec | ¥0.09/sec |
| Image to video | Img2Video, 1 image | ¥0.06/sec | ¥0.09/sec |
| First and last | Img2Video, 2 images | ¥0.06/sec | ¥0.09/sec |
| Reference images | OmniVideo, images only | ¥0.07/sec | ¥0.10/sec |
| Reference video | OmniVideo, non-empty videos | ¥0.40/sec | ¥0.60/sec |
Output fee = the rate above × input.duration.
The reference-image surcharge applies only to reference-image and reference-video modes, and only input.images are counted. The first 5 images are free. Each extra image costs:
480p: ¥0.01 × output seconds768p: ¥0.02 × output seconds
Image-to-video and first-and-last-frame do not pay this surcharge.
The reference-video surcharge applies only to reference-video mode. Each clip is billed for min(input seconds, output seconds):
480p: ¥0.40 per input second768p: ¥1.00 per input second
Multiple clips are capped individually, then added. Audio is free.
Example: reference-video mode, 768p, 15 output seconds, 6 reference images, and two reference videos of 8 and 20 seconds. Output fee ¥9.00, image surcharge ¥0.30, video surcharge ¥23.00, official price ¥32.30.
Parameter errors
These requests return HTTP 400. No upstream task is created and nothing is charged.
{
"code": 400,
"message": "Unsupported resolution '720p' for MiniMax-H3. Supported values: 480p, 768p"
}{ "code": 400, "message": "'input.duration' must be an integer between 2 and 15" }- An empty text-to-video prompt, or an image-to-video request that does not contain exactly 1 or 2 images, is rejected.
- Reference mode is rejected when every asset array is empty. More than 9 images, 3 videos, or 3 audio clips is rejected with the limit in the error.
- An empty string or a non-string asset URL is rejected.
- Reference videos without a matching array of positive
input.video_durationsare rejected. - An unauthorized model, a model that is not published, or an insufficient balance is rejected the same way as other video models, before any upstream task is created.