MiniMax H3
MiniMax H3 is MiniMax's video model. It generates 2K mp4 clips from a text prompt, a starting image, a pair of first and last frames, or reference images, video, and audio.
View API reference- Price
- $0.04, Per secondLowest available configuration
import { experimental_generateVideo as generateVideo } from 'ai';
const result = await generateVideo({ model: 'minimax/minimax-h3', prompt: 'A serene mountain lake at sunrise.'});Copy link to headingPlayground
Try out MiniMax H3 by MiniMax. Usage is billed to your team at API rates. Free users (those who haven't made a payment) get $5 of credits every 30 days.
Your generated video will appear here.
Copy link to headingProviders
Route requests across multiple providers. Copy a provider slug to set your preference. Visit the docs for more info. Using a provider means you agree to their terms, listed under Legal.
| Provider |
|---|
Getting started
Generate videos with MiniMax H3 using the experimental_generateVideo function from AI SDK 6 or later. AI Gateway handles routing and polls until the video is ready.
Install the AI SDK (pnpm add ai dotenv), create an API key from the API Keys page, and set it as AI_GATEWAY_API_KEY in your environment. Full setup is covered in the video generation quickstart.
import { experimental_generateVideo as generateVideo } from 'ai';import fs from 'node:fs';import 'dotenv/config';
async function main() { const result = await generateVideo({ model: 'minimax/minimax-h3', prompt: 'A white kitten chases a butterfly across a sunlit garden.', });
// Save the generated video fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');}
main().catch(console.error);Top-level parameters
Load the supported top-level parameters: prompt, duration, aspectRatio, and resolution. 2K is the only resolution H3 renders, and the named tier is accepted in place of the {width}x{height} form.
import { experimental_generateVideo as generateVideo } from 'ai';import fs from 'node:fs';import 'dotenv/config';
async function main() { const result = await generateVideo({ model: 'minimax/minimax-h3', prompt: 'A white kitten chases a butterfly across a sunlit garden.', duration: 5, aspectRatio: '16:9', resolution: '2048x2048', });
// Save the generated video fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');}
main().catch(console.error);| Parameter | Type | Required | Description |
|---|---|---|---|
prompt | string | No | Text description of the video to generate. |
duration | number | No | Video length in seconds. 4-15 seconds. |
resolution | string | No | Resolution ('2048x2048'). |
aspectRatio | string | No | Aspect ratio ('21:9', '16:9', '4:3', '1:1', '3:4', '9:16'). |
prompt.image | string | No | URL of an image to animate as the first frame. Equivalent to a single frameImages entry with frameType: "first_frame". |
frameImages | Array<{ image: string; frameType: 'first_frame' | 'last_frame' }> | No | First and last frames of the clip. A last_frame without a first_frame is dropped with a warning, and only images are accepted. |
inputReferences | Array<string | { data: string; mediaType: string }> | No | Reference images and videos to keep a subject or follow motion. Up to 9 images and 3 videos. Pass videos as { data, mediaType: "video/mp4" } — a URL without a media type is treated as an image. |
Input limits
| Input | Formats | Sources | Max count | Max size | Limits |
|---|---|---|---|---|---|
| Image | jpg, jpeg, png, webp, heic, heif | url | 9 | 30 MB | ≥256px · ≤5760px · aspect 2:5–5:2 |
| Video | h264, h265, mp4 | url | 3 | 50 MB | 2-15s · ≥256px · ≤5760px |
| Audio | wav, mp3 | url | — | 15 MB | 2-15s |
Provider options
Pass MiniMax options under providerOptions.minimax. ratio overrides the top-level aspectRatio and is the only way to request adaptive.
Learn more in the AI SDK MiniMax video docs.
import { experimental_generateVideo as generateVideo } from 'ai';import fs from 'node:fs';import 'dotenv/config';
async function main() { const result = await generateVideo({ model: 'minimax/minimax-h3', prompt: 'A white kitten chases a butterfly across a sunlit garden.', duration: 5, providerOptions: { minimax: { ratio: '16:9', resolution: '2K', aigcWatermark: false, pollIntervalMs: 10000, pollTimeoutMs: 600000, }, }, });
// Save the generated video fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');}
main().catch(console.error);Pass MiniMax-specific options under providerOptions.minimax in your generateVideo call.
| Parameter | Type | Required | Description |
|---|---|---|---|
ratio | 'adaptive' | '21:9' | '16:9' | '4:3' | '1:1' | '3:4' | '9:16' | No | Aspect ratio of the generated video. Overrides the top-level aspectRatio, and unlike it can be set to adaptive. |
resolution | '2K' | No | Output resolution. H3 currently only supports 2K, which is also the default. |
referenceAudioUrls | string[] | No | Up to 3 reference audio URLs for reference-to-video. Must be paired with at least one reference image or video, or the audio is dropped with a warning. The only input that accepts mm_file:// handles — pass images and videos as public URLs, data URIs, or binary data. |
aigcWatermark | boolean | No | Whether to embed an AIGC watermark in the output. Defaults to false. |
pollIntervalMs | number | No | How often to check task status. Defaults to 10000. |
pollTimeoutMs | number | No | Maximum wait time. Defaults to 600000 (10 minutes). |
First and last frame
Control the transition by opening on one image and closing on another. The aspect ratio follows the input images, so an explicit aspectRatio is ignored.
import { experimental_generateVideo as generateVideo } from 'ai';import fs from 'node:fs';import 'dotenv/config';
async function main() { const result = await generateVideo({ model: 'minimax/minimax-h3', prompt: 'The kitten crosses the garden and settles under the bench.', duration: 5, frameImages: [ { image: 'https://example.com/start.jpg', frameType: 'first_frame' }, { image: 'https://example.com/end.jpg', frameType: 'last_frame' }, ], });
// Save the generated video fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');}
main().catch(console.error);Reference to video
Keep a subject or follow motion from reference media, and optionally drive it with reference audio. Videos need an explicit media type; audio goes in providerOptions.minimax.referenceAudioUrls and has to accompany at least one image or video.
import { experimental_generateVideo as generateVideo } from 'ai';import fs from 'node:fs';import 'dotenv/config';
async function main() { const result = await generateVideo({ model: 'minimax/minimax-h3', prompt: 'The same kitten, now padding along a rainy city street at night.', duration: 5, inputReferences: [ 'https://example.com/kitten.jpg', { data: 'https://example.com/motion.mp4', mediaType: 'video/mp4' }, ], providerOptions: { minimax: { ratio: 'adaptive', referenceAudioUrls: ['https://example.com/voice.wav'], }, }, });
// Save the generated video fs.writeFileSync('output.mp4', result.videos[0].uint8Array);
console.log('Video saved to output.mp4');}
main().catch(console.error);Copy link to headingAbout MiniMax H3
MiniMax H3, released July 30, 2026, is MiniMax's video generation model. It takes a text prompt, a starting image, a pair of first and last frames, or reference material, and returns mp4 at 2K resolution.
Four generation modes cover most production needs. Text-to-video builds a clip from a description alone. First-frame image-to-video animates a still and follows that image's aspect ratio. First-to-last keyframe transitions define both endpoints and let MiniMax H3 generate the motion between them. Multimodal reference-to-video conditions a generation on reference images, video, or audio in a single request. Reference and keyframe modes are mutually exclusive, so choose one per request.
Reference mode uses ordering to hold a subject steady. Pass source material through inputReferences and refer to each item by its position in the prompt, such as Image 1. That gives you a way to carry a character or product across several clips.
Clips run from five to 15 seconds at 2K resolution in mp4. Aspect ratios include 21:9, 16:9, 4:3, 1:1, 3:4, and 9:16, or the output adapts to a supplied image. Pick the ratio at request time instead of cropping afterward.
Call MiniMax H3 with generateVideo from the AI SDK, imported as experimental_generateVideo. Set the model to minimax/minimax-h3, pass your prompt plus optional aspectRatio and duration, and add inputReferences when you condition on source material. Generation runs longer than a text completion, so raise pollTimeoutMs for longer clips.
AI Gateway routes MiniMax H3 across MiniMax, tracks usage and cost per request, and handles retries and failover. The listed video rate is N/A, and the pricing panel on this page shows the current rate and unit. AI Gateway reflects provider pricing with no markup and charges no platform fee on inference.
Copy link to headingWhat To Consider When Choosing a Provider
- Configuration: Reference mode and keyframe mode can't be combined in one request, so decide which control you need before you build the call. Clip length caps at 15 seconds, so longer sequences take several generations stitched together downstream. Generation runs long enough that default timeouts cut it short, so raise
pollTimeoutMsand extend fetch timeouts in Node.js. When you pass a starting image, the output follows that image's aspect ratio, so crop the source to the ratio you want to deliver. - Zero Data Retention: Zero Data Retention is offered on a per-provider and model basis. See the documentation for details.
- Authentication: AI Gateway authenticates requests using an API key or OIDC token. You do not need to manage provider credentials directly.
Copy link to headingWhen to Use MiniMax H3
Best for
- Text-to-Video Generation: Clips built entirely from a written scene description
- Still Image Animation: Product or character stills animated from a single starting frame
- Defined Frame Transitions: Motion generated between first and last frames you supply
- Consistent Multi-Clip Subjects: Reference images, video, or audio that carry a subject across shots
- Multi-Ratio Delivery: Vertical, square, and widescreen 2K output from one model
Consider alternatives when
- Clips Beyond 15 Seconds: Longer sequences take several generations stitched together downstream
- Reference Plus Keyframes: The two modes are mutually exclusive, so split them across separate requests
- Resolution Above 2K: Output caps at 2K, so plan an upscaling step for larger delivery formats
- Text and Code Workloads: MiniMax M3 covers reasoning and engineering tasks instead of video
Copy link to headingConclusion
MiniMax H3 covers text-to-video, image animation, keyframe transitions, and reference conditioning in one model, with 2K mp4 output from five to 15 seconds. Call it with generateVideo from the AI SDK using minimax/minimax-h3.
Copy link to headingFrequently Asked Questions
What can MiniMax H3 generate video from?
A text prompt, a starting image, a pair of first and last frames, or reference material. Reference mode accepts images, video, or audio in a single request.
What resolution and duration does MiniMax H3 output?
Output is mp4 at 2K resolution, from five to 15 seconds. Supported aspect ratios include 21:9, 16:9, 4:3, 1:1, 3:4, and 9:16, and the output adapts to the aspect ratio of a supplied image.
Can I combine reference material with first and last keyframes?
No. Reference and keyframe modes are mutually exclusive, so use one per request. Split the work across separate generations when you need both kinds of control.
How do I hold a subject consistent across clips?
Pass source material through
inputReferencesand refer to each item by its order in the prompt, such asImage 1. MiniMax H3 conditions the generation on that reference, which keeps a character or product steady across shots.How do I call MiniMax H3 from the AI SDK?
Use
generateVideo, imported asexperimental_generateVideo, with the model set tominimax/minimax-h3. Pass your prompt plus optionalaspectRatioandduration, and addinputReferencesfor reference-conditioned generations.Why do my requests time out before the video finishes?
Video generation takes longer than a text completion. Raise
pollTimeoutMsin the provider options and extend fetch timeouts in Node.js so the request survives until the clip is ready.What does MiniMax H3 cost?
The listed video rate is N/A. Check the pricing panel on this page for the current rate and unit. AI Gateway reflects provider pricing with no markup and charges no platform fee on inference.
Can I try MiniMax H3 before integrating it?
Yes. Use the playground on this page to generate clips and compare prompts, durations, and aspect ratios.
Does MiniMax H3 support zero data retention?
Zero Data Retention is not currently available for this model. Zero Data Retention is offered on a per-provider basis. See https://vercel.com/docs/ai-gateway/capabilities/zdr for details.