Minimax-Hailuo-02 API Usage Guide
Overview
Minimax-Hailuo-02 is a video generation model that creates high-quality short videos from text prompts, optionally enhanced by a first-frame image. It supports camera movement instructions and offers flexible control over duration, resolution, and prompt optimization.Authentication
All API requests require authentication using an API key. Include it in theAuthorization header:
Submit Video Generation Request
Base URL
Endpoint
Request Format
Request Parameters
| Parameter | Type | Required | Description | Default | Constraints |
|---|---|---|---|---|---|
prompt | string | Yes | Text description of the video to generate (max 2000 characters). Supports camera movement instructions like [Tilt Left], [Pan Right]. | "" | Required |
duration | enum | No | Video duration in seconds. 1080P is not available for 10s videos. | 6 | Options: 6, 10 |
resolution | enum | No | Output resolution. For 6s: 512P, 768P, 1080P For 10s: 512P, 768P | ”768P” | Options depend on duration |
first_frame_image | image | Cond. | First frame image. Required for 512P, optional for 768P or 1080P. | "" | Max 1 image |
prompt_optimizer | boolean | No | Automatically optimize prompt for better generation quality | true | true / false |
fast_pretreatment | boolean | No | Reduce processing time during prompt optimization | false | true / false |
Response
Check Request Status
Endpoint
Example
Response
Request Status Values
| Status | Description |
|---|---|
queued | Request is waiting to be processed |
processing | Video generation is in progress |
success | Video generation completed successfully |
failed | Video generation failed |
cancelled | Request was cancelled |
List Your Requests
Endpoint
Example
Get Model Information
Endpoint
Example
List Available Models
Endpoint
Example
Response
Tips for Better Results
- Clear, Descriptive Prompts: Use detailed descriptions and camera movement tags like [Tilt Left], [Pan Right].
- First Frame Image: Required for 512P videos, optional for 768P/1080P.
- Prompt Optimizer: Keep prompt_optimizer enabled for better quality.
- Fast Pretreatment: Use fast_pretreatment=true to reduce preprocessing time.
- Resolution Choice: For 10s videos, only 512P and 768P are available.