> ## Documentation Index
> Fetch the complete documentation index at: https://docs.floodgate.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# MiniMax H3 video API

> Generate MiniMax H3 videos with text and optional frames. Read Floodgate's native task envelope, download results, and check limits and output-second billing.

Generate MiniMax H3 videos with text and optional frame images. Its native status URL returns Floodgate task data.

## Operations and limits

| Method | Path | Purpose |
| - | - | - |
| POST | `/minimax/v2/video_generation` | Submit |
| GET | `/minimax/v2/query/video_generation/{task_id}` | Native polling |
| GET | `/v1/videos/{task_id}` | Compatible polling, when available |
| GET | `/v1/videos/{task_id}/content` | Download |

The reviewed offering is `MiniMax-H3` in `Hailuo-2`. Check current operation availability in [Model Square](https://floodgate.dev/models).

| Field | Required | Limits |
| - | - | - |
| `model` | Yes | `MiniMax-H3` |
| `content` | Yes | 1 to 3 parts: one text part and up to two HTTPS image parts |
| `content[].text` | Yes | 1 to 7,000 characters |
| `content[].image_url.url` | No | HTTPS frame URL |
| `content[].role` | For frame selection | `first_frame` or `last_frame` |
| `duration` | Yes | Integer, 4 to 15 seconds |
| `resolution` | Yes | `768P` |
| `generate_audio`, `watermark` | No | Boolean |

Image parts use `type: "image_url"`. Text uses `type: "text"`. Reference-video and audio inputs are not reviewed; ratio and seed constraints are undocumented.

## Submit

```bash theme={null}
curl --fail-with-body https://api.floodgate.dev/minimax/v2/video_generation \
  -H "Authorization: Bearer $FLOODGATE_API_KEY" -H 'Content-Type: application/json' \
  -d '{"model":"MiniMax-H3","content":[{"type":"text","text":"A quiet forest beside a lake"}],"duration":4,"resolution":"768P"}'
```

```json theme={null}
{"id":"task_example","task_id":"task_example","object":"video","model":"MiniMax-H3","status":"queued","progress":0,"created_at":1700000000}
```

## Poll and download

Set `TASK_ID` to the returned `id`:

```bash theme={null}
curl --fail-with-body "https://api.floodgate.dev/minimax/v2/query/video_generation/$TASK_ID" \
  -H "Authorization: Bearer $FLOODGATE_API_KEY"
```

Check `code: "success"`, then `data.status`. Pending states are `NOT_START`, `SUBMITTING`, `SUBMITTED`, `QUEUED`, `IN_PROGRESS` and `UNKNOWN`. `SUCCESS` completes the task; `FAILURE` ends it without a download.

```json theme={null}
{"code":"success","message":"","data":{"task_id":"task_example","platform":"task","status":"SUCCESS","progress":"100%","result_url":"/v1/videos/task_example/content","data":null}}
```

```json theme={null}
{"code":"success","message":"","data":{"task_id":"task_example","platform":"task","status":"FAILURE","fail_reason":"Video generation failed","data":null}}
```

Read `data.result_url`, not the upstream `task.content.url`. After success:

```bash theme={null}
curl --fail-with-body "https://api.floodgate.dev/v1/videos/$TASK_ID/content" \
  -H "Authorization: Bearer $FLOODGATE_API_KEY" --output video.mp4
```

## Errors and billing

Billing uses verified output seconds. Follow-ups retain the original group and pricing. Confirmed failures release reservations; settlement can remain pending without final usage.

Check `code` and `data.fail_reason` even after HTTP 200. Check content, duration and resolution on `400`; unfinished downloads return `400`, expired results `410`. Keep the original task after a timeout or `submission_uncertain`. See [shared video errors](https://docs.floodgate.dev/videos.md#errors-and-retries).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.