MiniMax H3 Video Generation
MiniMax-H3 supports text-to-video, first/last frames, and image/video/audio references. Output is fixed at 768P, with an integer nominal duration of 1–15 seconds.
Endpoints and authentication
| Method | Path | Purpose |
|---|---|---|
| POST | /v1/videos | Create a video task |
| GET | /v1/videos/{task_id} | Retrieve status and media links |
| GET / HEAD | /v1/videos/{task_id}/content | Download the video |
| POST | /v1/media/uploads | Upload reference media and obtain a URL |
Use your Nbility API key and the API root as the base URL, without /v1.
export BASE_URL='https://api.nbility.ai'
export NBILITY_API_KEY='replace-with-your-nbility-api-key'
Create and query requests require Authorization: Bearer ${NBILITY_API_KEY}.
Quickstart
curl --fail-with-body -sS -X POST "${BASE_URL}/v1/videos" \
-H "Authorization: Bearer ${NBILITY_API_KEY}" \
-H 'Content-Type: application/json' \
--data-binary @- <<'JSON'
{
"model": "MiniMax-H3",
"content": [{"type": "text", "text": "A cinematic view of ocean waves at sunset"}],
"resolution": "768P",
"duration": 5,
"ratio": "16:9"
}
JSON
The response contains a Nbility task ID:
{"id":"task_example","model":"MiniMax-H3","status":"queued"}
Acceptance does not mean media preparation, moderation, or generation has finished. Do not blindly resubmit after a timeout: Nbility does not promise to deduplicate independent create requests using a client-supplied Idempotency-Key.
Request fields
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Case-sensitive MiniMax-H3 |
content | array | With references | Exactly one text item and 0–12 media items; use prompt instead for text-only requests |
prompt | string | Without content | Text-only prompt |
resolution | string | No | Exactly 768P; defaults to 768P |
duration | integer | No | Nominal output duration, 1–15 seconds; defaults to 5; seconds is an alias (both must agree if provided) |
ratio | string | No | Defaults to 16:9; 21:9, 16:9, 4:3, 1:1, 3:4, 9:16; adaptive requires visual input |
Text must be nonempty and at most 7000 Unicode characters. Text items accept only type and text. There is no 2K output, quality tier, prompt enhancement, video regeneration, or custom width/height.
ratio | Output canvas |
|---|---|
21:9 | 1536×672 |
16:9 | 1344×768 |
4:3 | 1024×768 |
1:1 | 768×768 |
3:4 | 768×1024 |
9:16 | 768×1344 |
Frames and reference media
Every media item needs a public HTTPS URL downloadable by the processing service. Base64, data URIs, private networks, and loopback addresses are unsupported.
| Input | type | role | Limit |
|---|---|---|---|
| First or last frame | image_url | first_frame / last_frame | One each; cannot mix with any reference_* role |
| Reference image | image_url | reference_image | Up to 9 |
| Reference video | video_url | reference_video | Up to 3 |
| Reference audio | audio_url | reference_audio | Up to 3 |
Images support static JPG/JPEG, PNG, WebP, HEIC, and HEIF, up to 30,000,000 bytes each. Videos support MP4/MOV with H.264/H.265, up to 50,000,000 bytes. Audio supports WAV/PCM, MP3, M4A/AAC, and raw ADTS AAC, up to 15,000,000 bytes.
There may be at most 12 reference files in total. Each reference video/audio must be at least 2 seconds; files longer than 15 seconds use only their first 15 seconds. After trimming, combined video duration and combined independent audio duration must each stay within 15 seconds. Audio-only references require a fixed ratio, not adaptive. Images must be 256–5760 pixels per side, at most 33,177,600 pixels, with an aspect ratio of 0.4–2.5. First/last frame aspect ratios may differ by at most 2%. Actual media constraints are checked during processing; invalid media fails the task.
Replace the quickstart's content with this first/last frame example:
[
{"type":"text","text":"The scene changes smoothly from day to night"},
{"type":"image_url","image_url":{"url":"https://example.com/first.png"},"role":"first_frame"},
{"type":"image_url","image_url":{"url":"https://example.com/last.png"},"role":"last_frame"}
]
Mixed references:
[
{"type":"text","text":"<Picture 1> follows the movement in <Video 1> to the rhythm of <Audio 1>"},
{"type":"image_url","image_url":{"url":"https://example.com/person.jpg"},"role":"reference_image"},
{"type":"video_url","video_url":{"url":"https://example.com/motion.mp4"},"role":"reference_video"},
{"type":"audio_url","audio_url":{"url":"https://example.com/music.mp3"},"role":"reference_audio"}
]
References are numbered independently within each media type, in appearance order. Refer to them using <Picture 1>, <Video 1>, and <Audio 1> in the prompt.
Retrieve and download
export TASK_ID='replace-with-id-from-the-create-response'
curl --fail-with-body -sS \
-H "Authorization: Bearer ${NBILITY_API_KEY}" \
"${BASE_URL}/v1/videos/${TASK_ID}"
Successful response:
{"id":"task_example","model":"MiniMax-H3","status":"completed","progress":100,"seconds":5,"resolution":"768P","ratio":"16:9","url":"https://media.example.com/result.mp4"}
| Status | Meaning |
|---|---|
queued | Waiting |
in_progress | Generating |
completed | Complete; read url |
failed | Failed; reservation refunded; details may appear in error.message |
Poll every 5–10 seconds. The returned url can be played or downloaded directly without sending an API key. Use it unchanged and share it only with intended recipients; anyone with the complete link may read it. Save your own copy promptly.
export RESULT_URL='replace-with-the-url-from-the-query-response'
curl --fail-with-body -sS -L "${RESULT_URL}" -o minimax-h3.mp4
URLs and local uploads
Playground displays parameters for the selected model. Supply HTTPS reference URLs or select local files; local media is uploaded to media storage before its URL is submitted.
API upload example:
curl --fail-with-body -sS "${BASE_URL}/v1/media/uploads" \
-H "Authorization: Bearer ${NBILITY_API_KEY}" \
-F 'file=@first.png'
The response contains url and expires_at. Put url in the corresponding image_url.url, video_url.url, or audio_url.url. Upload URLs expire after one hour; create the task promptly. Local uploads support PNG/JPG/JPEG/WebP images (30MB), MP4/MOV video (50MB), and MP3/WAV/M4A/AAC audio (15MB). For other supported reference formats, provide your own HTTPS URL. SVG, HTML, and executable files are not accepted.
For text-only generation, omit content and use prompt plus seconds instead:
{"model":"MiniMax-H3","prompt":"Ocean waves at sunset","seconds":5,"resolution":"768P","ratio":"16:9"}
Pricing and errors
The base rate is $0.08 per nominal output second, multiplied by the API key's group rate. Check model pricing for current rates. At multiplier 1, a 5-second task costs $0.40.
Only nominal output seconds are billed. Reference media counts and durations do not add charges. Container duration may be slightly longer: a nominal 5-second output may last 5.167 seconds but is still billed as 5 seconds. This differs from Auto-HD upscaling, which bills actual output duration.
Invalid request fields return 400; authentication failures return 401. Media downloads, decoding, size limits, moderation, or service capacity may fail after acceptance. A successful create is not a successful generation. See error handling for other errors.