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

# MiniMax-H3

> MiniMax-H3 and MiniMax-H3-Max: video with native sound from text, first/last frames or reference media.

MiniMax's Hailuo H3 video models generate sound together with the picture — there is no audio switch.

| Model ID | Length | Resolution | Inputs |
| - | - | - | - |
| `MiniMax-H3` | 4–15 s | `768P` (default), `2K` | Text, first/last frame, reference images, videos and audio |
| `MiniMax-H3-Max` | 5–15 s | `480P` (default), `768P` | Text, first/last frame |

* Endpoint: `POST https://refillapi.com/v1/videos` (async task)
* Prices: [MiniMax-H3](https://refillapi.com/pricing/MiniMax-H3) · [MiniMax-H3-Max](https://refillapi.com/pricing/MiniMax-H3-Max)

## Request

Top-level fields are `model`, `prompt` and `seconds`. Resolution, ratio and input media go in `metadata`.

**Authorization** `string` *required*

`Bearer YOUR_API_KEY`

**model** `string` *required*

`MiniMax-H3` or `MiniMax-H3-Max`

**prompt** `string` *required*

Picture, motion and sound. Required even when you send reference media.

**seconds** `integer` (default: 5)

Length in whole seconds — see the table above.

**metadata.resolution** `string`

See the table above.

**metadata.ratio** `string`

`16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`, or `adaptive` (follow the input image or video; needs one). Defaults to `adaptive` with image or video input and `16:9` for text only. On `MiniMax-H3-Max`, image-to-video always follows the image.

**metadata.content** `object[]`

Input media. Each item looks like `{"type": "image_url", "image_url": {"url": "https://..."}, "role": "first_frame"}`; for video and audio use `video_url` / `audio_url`.

`role` is `first_frame`, `last_frame` or `reference_image` for images, `reference_video` for videos and `reference_audio` for audio. `MiniMax-H3` accepts up to 9 images and up to 3 videos and 3 audio clips; frames and reference media cannot be mixed. `MiniMax-H3-Max` accepts only `first_frame` and `last_frame`.

> [!WARNING]
>
> Use public `http(s)` URLs for all media. Do not use `callback_url` — poll the task instead.

## Text to video

```bash theme={null}
curl https://refillapi.com/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-H3",
    "prompt": "A corgi running along the beach at sunrise, the camera slowly tracking it, waves crashing",
    "seconds": 5,
    "metadata": { "resolution": "768P", "ratio": "16:9" }
  }'
```

## First and last frame

```bash theme={null}
curl https://refillapi.com/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-H3-Max",
    "prompt": "The flower goes from bud to full bloom",
    "seconds": 5,
    "metadata": {
      "resolution": "768P",
      "content": [
        {"type": "image_url", "image_url": {"url": "https://example.com/first.jpg"}, "role": "first_frame"},
        {"type": "image_url", "image_url": {"url": "https://example.com/last.jpg"}, "role": "last_frame"}
      ]
    }
  }'
```

Send only `first_frame` for first-frame video.

## Reference media (MiniMax-H3)

```bash theme={null}
curl https://refillapi.com/v1/videos \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-H3",
    "prompt": "The person in the reference image dances on a city street, following the moves in the reference video",
    "seconds": 8,
    "metadata": {
      "resolution": "2K",
      "ratio": "9:16",
      "content": [
        {"type": "image_url", "image_url": {"url": "https://example.com/person.png"}, "role": "reference_image"},
        {"type": "video_url", "video_url": {"url": "https://example.com/dance.mp4"}, "role": "reference_video"}
      ]
    }
  }'
```

Polling and download work as in [Video generation](https://docs.refillapi.com/api/videos/overview.md#2-poll).

## Billing

Per second of output, with one price per resolution.

* `MiniMax-H3`: reference videos are billed by their length at the same per-second price; the first 5 images per task are free and extra images are billed per image; reference audio is free.
* `MiniMax-H3-Max`: output length only.

The requested length is held when you submit (for MiniMax-H3 reference videos, up to 15 s is held) and settled when the task finishes; failed tasks are refunded in full.

## Errors

| Error | Cause |
| - | - |
| `MiniMax-H3 duration must be an integer between 4 and 15 seconds` | Length out of range |
| `MiniMax-H3 resolution must be 768P or 2K` | Unsupported resolution |
| `MiniMax-H3 ratio adaptive requires an image or video input` | `adaptive` with a text-only request |
| `MiniMax-H3 cannot mix frame images with reference media` | Frames and references in one request |
| `MiniMax-H3 accepts at most 9 input images` | Too many inputs |


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