---
title: MiniMax H3 API
description: "Tokenlio MiniMax H3 video API: 4–15 seconds, native 2K or 768p, first and last frames, image, video and audio references, with full parameters and examples."
outline: [2, 3]
---

# MiniMax H3

**4–15 seconds · native 2K or 768p · audio track included · first and last frames · image, video and audio references**

MiniMax H3 generates short video clips from a text prompt, a start and end frame pair, or a set of reference materials. Output is always an MP4 file that already contains an audio track, so there is no separate audio switch to configure.

Three endpoints cover the whole flow:

- **Create** — `POST https://api.tokenlio.ai/v1/videos/generations`, returns **202** with a task ID.
- **Query** — `GET https://api.tokenlio.ai/v1/tasks/{id}`, returns status, assets and error details.
- **Download** — `GET https://api.tokenlio.ai/v1/tasks/{id}/content`, returns a **307** redirect to the video file.

Authentication, task states, polling, private download links, billing and shared error codes are described in the [video tasks guide](/api/videos). This page documents the parameters and behavior specific to MiniMax H3.

::: tip Before you start
1. Sign in to the Tokenlio console and create a Workspace **model-routing API Key**.
2. Copy the published MiniMax H3 API model ID from the [model catalog](https://api.tokenlio.ai/marketplace) and replace `example/minimax-h3` in the examples.
3. Video generation is asynchronous: the create call returns a task ID immediately, and the result appears when you query that task.
:::

## Limit the scope of a first test

A first request should be cheap and easy to verify. Use a short `duration`, the lower `768p` resolution and a single sentence prompt; check the task status, then download the file. Only after that shape works, add frames or reference materials, which are the parts most likely to fail on unsuitable input material.

## Quick request

```bash
curl https://api.tokenlio.ai/v1/videos/generations \
  -H "Authorization: Bearer $TOKENLIO_API_KEY" \
  -H 'Content-Type: application/json' \
  --data '{"model":"example/minimax-h3","prompt":"A slow aerial shot of a quiet coastline at sunrise","duration":5,"resolution":"768p","size":"16:9"}'
```

```json [Request body]
{
  "model": "example/minimax-h3",
  "prompt": "A slow aerial shot of a quiet coastline at sunrise",
  "duration": 5,
  "resolution": "768p",
  "size": "16:9"
}
```

A **202** response with an `id` means the task was accepted:

```json
{
  "id": "dfc68868-d388-4d83-a173-d44e47a8bec7",
  "model": "example/minimax-h3",
  "status": "queued",
  "assets": []
}
```

Save the `id` and poll `GET /v1/tasks/{id}`; when `status=succeeded`, download from `assets[].url`.

## Request parameters

| Parameter | Type | Required / default | Meaning |
| --- | --- | --- | --- |
| `model` | string | Required | Exact API model ID copied from the catalog; a display name is rejected |
| `prompt` | string | Required | Up to 7,000 characters; required even when reference materials are supplied |
| `duration` | integer | **Required, no default** | 4–15 integer seconds |
| `resolution` | string | `2k` | `2k` or `768p` |
| `size` | string | `16:9` for text-only, `adaptive` with inputs | `16:9`, `9:16`, `1:1`, `4:3`, `3:4`, `21:9`, `adaptive`; frames always use `adaptive` |
| `watermark` | boolean | Omit | Request a visible AI-generated watermark |
| `image_urls` | string[] | Optional | Up to 9 reference images |
| `image_with_roles` | object[] | Optional | Objects with `url` and `role`; cannot be combined with `image_urls` |
| `video_urls` | string[] | Optional | Up to 3 reference videos |
| `audio_urls` | string[] | Optional | Up to 3 reference audio clips; an image or video must also be supplied |
| `expected_pricing_revision` | string | Optional known price version; not a prerequisite for first creation |

### What the fields do

`duration` and `resolution` decide both the generated clip and its cost, so choose values within the supported limits when creating a task. `2k` is the native output size of this model; `768p` is cheaper and faster, and is a good choice while integrating.

`size` sets the aspect ratio. For text-only requests it defaults to `16:9`, and `adaptive` also falls back to `16:9`. When you send input materials, the default becomes `adaptive` so the output follows the material geometry; a frame pair forces `adaptive`.

`watermark` is optional and only affects the visible watermark. Omit it if you do not need one.

### Fields this model does not take

Output format is fixed to MP4 with an audio track, so `generate_audio`, `return_last_frame`, `seed`, `output_format` and `omni_reference_task_type` do not apply to this model and should not be sent. Use real JSON integers and booleans — never strings such as `"5"` and never `null`.

## Text to video

```json
{
  "model": "example/minimax-h3",
  "prompt": "Rain falling on a neon-lit street at night, the camera slowly pushing forward while puddles reflect the light",
  "duration": 10,
  "resolution": "2k",
  "size": "9:16"
}
```

Describe subject, motion, camera movement and lighting in the prompt; the platform forwards the text unchanged. Vertical output simply uses `size: "9:16"`; there is no separate orientation option.

## First and last frames

Use the `image_with_roles` array with roles `first_frame` and `last_frame`; at most one of each. Frame inputs cannot be mixed with reference images, videos or audio, and `size` is always `adaptive`.

```json
{
  "model": "example/minimax-h3",
  "prompt": "Move smoothly from the opening landscape to the final sunset, keeping the horizon steady",
  "duration": 6,
  "size": "adaptive",
  "image_with_roles": [
    {"url": "https://YOUR_PUBLIC_CDN/first.png", "role": "first_frame"},
    {"url": "https://YOUR_PUBLIC_CDN/last.png", "role": "last_frame"}
  ]
}
```

A single first frame is a normal image-to-video request: send only that object and omit `last_frame`. Both frames should describe compatible scenes; wildly different subjects usually produce an unstable transition.

## Multimodal references

Reference materials guide the subject, camera work and sound without pinning the exact scenes. Combine at most 9 images, 3 videos and 3 audio clips in one request; the same URL cannot be reused.

```json
{
  "model": "example/minimax-h3",
  "prompt": "Use the portrait in the first image as the main character, follow the camera movement of the reference video, and use the audio as background music",
  "duration": 8,
  "size": "16:9",
  "image_urls": ["https://YOUR_PUBLIC_CDN/character.jpg"],
  "video_urls": ["https://YOUR_PUBLIC_CDN/camera.mp4"],
  "audio_urls": ["https://YOUR_PUBLIC_CDN/music.mp3"]
}
```

Audio must be paired with at least one image or video, so a musical prompt should also send a still image. Reference videos affect both the result and the measured input duration.

## Input requirements

| Input | Requirement |
| --- | --- |
| Images | Up to 9; JPEG, PNG or WebP; stable public HTTPS URL |
| Videos | Up to 3, each 2–15 s and 15 s combined; MP4 or MOV with H.264/H.265; ≤50 MB each; sides 256–5,760 px; aspect ratio 0.4–2.5; 23.976–60 FPS |
| Audio | Up to 3; WAV or MP3 |

Reference videos are measured when the task is created: a clip outside these limits fails the request instead of being silently trimmed, so check duration and resolution before submitting. Input URLs must be directly reachable over HTTPS — no redirects, credentials, private addresses or fragments.

## Billing and reference rates

Reference rates are shown in the console; they are not a pre-charge or a spending cap. Final actual charges appear as `charged_amount` in task/call records after successful delivery and settlement. Failed, timed-out (`TASK_TIMEOUT`) or undelivered tasks are not charged, and polling/downloads are not new generation calls.

`max_charge_amount` is not accepted for actual-cost models. `expected_pricing_revision` is optional: send it only when you already hold a valid pricing version. Review current catalog terms rather than blindly resending a changed-price request.


## Errors specific to this model

Shared status codes are listed in the [video tasks guide](/api/videos#errors). Within `400 VIDEO_REQUEST_INVALID` and `400 VIDEO_ASSET_INVALID`, the usual causes are:

| Symptom | Cause |
| --- | --- |
| `unsupported model resolution` | `resolution` is not `2k` or `768p`, or the value belongs to another model |
| `a prompt and a duration within this model's range are required` | `prompt` is empty, or `duration` is outside 4–15 or not an integer |
| `unsupported input counts or mixed generation modes` | More than 9 images, 3 videos or 3 audio clips, or frames mixed with reference materials, or audio without image/video |
| `unique bounded asset identifiers are required` | The same input URL appears twice, or a URL contains whitespace |
| `unsupported video size` | `size` is outside the documented list |
| `VIDEO_ASSET_INVALID` | An input URL is unreachable, or a reference video falls outside the measured limits |

A `409 VIDEO_PRICE_CHANGED` means the pricing version changed: check the current catalog terms and decide again. Do not retry creation blindly, and do not recreate a task that already returned an ID — query it instead.

## Next steps

- [Video tasks: creation, polling, downloads and errors](/api/videos)
- [Choose a model and compare durations](/api/videos#choose-a-model)
- [MiniMax H3 Max: 5–15 seconds, 480p to 1080p](/api/videos/minimax-h3-max)
