Minimax Hailou 2
Generate breathtaking 1080P cinematic videos from text or images with ultra-realistic motion and physics.
API
If you're looking for an API, you can choose from your desired programming language.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import requests
import base64
# Use this function to convert an image file from the filesystem to base64
def image_file_to_base64(image_path):
with open(image_path, 'rb') as f:
image_data = f.read()
return base64.b64encode(image_data).decode('utf-8')
# Use this function to fetch an image from a URL and convert it to base64
def image_url_to_base64(image_url):
response = requests.get(image_url)
image_data = response.content
return base64.b64encode(image_data).decode('utf-8')
# Use this function to convert a list of image URLs to base64
def image_urls_to_base64(image_urls):
return [image_url_to_base64(url) for url in image_urls]
api_key = "YOUR_API_KEY"
url = "https://api.segmind.com/v1/minimax-hailuo-2"
# Request payload
data = {
"prompt": "Man wandered into a desert canyon with a lion at his side.",
"prompt_optimizer": True,
"image_url": "https://segmind-resources.s3.amazonaws.com/input/db787c04-b073-4e08-ba52-6cee341c7310-7f1198b9-2961-4dc1-ad67-e9c60013b44a.jpeg",
"mode": "standard"
}
headers = {'x-api-key': api_key}
response = requests.post(url, json=data, headers=headers)
print(response.content) # The response is the generated image
Attributes
Define video content details for clarity or abstractness. Use nautical themes for oceanic scenes or fictional for creative vibes.
Enhance prompt for video quality. Set to true for optimized storytelling or false to keep original tone.
Provide image URL for relighting. Use high-resolution images to enhance detail or standard for faster processing.
Select video generation mode. Choose 'standard' for efficiency or 'pro' for advanced features when available.
Allowed values:
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Resources to get you started
Everything you need to know to get the most out of Minimax Hailou 2
# Hailuo 02 Usage Guide
Hailuo 02 is a cutting-edge text-to-video and image-to-video model that generates up to 10-second, 1080P cinematic clips at 24â30 FPS. Below is a concise guide on how to configure prompts and parameters for different scenarios.
## 1. General Best Practices
1. **Be Descriptive**
Use vivid adjectives (âhigh-contrast lighting,â âsoft focus,â âbioluminescent glowâ) and specify camera actions (âslow pan,â âdolly zoomâ) to guide composition.
2. **Frame Rate**
Default is 24 FPS. Append â30 FPSâ in your prompt or set in metadata if you need ultra-smooth motion.
3. **Resolution**
Outputs at 1080P by default. If you need custom sizing, adjust in your API call.
4. **Prompt Optimizer**
Toggle `prompt_optimizer: true` to enhance narrative cohesion and detail. Leave it `false` if you prefer a more literal translation of your text.
## 2. Parameter Definitions
```json
\{
"prompt": "Your scene description hereâŚ",
"prompt_optimizer": true,
"image_url": "https://example.com/scene.png",
"mode": "standard"
\}
- â˘prompt (required): Main text or scene description.
- â˘prompt_optimizer (optional, advanced):
true
for enriched storytelling. - â˘image_url (optional): High-res image for relighting or camera panning.
- â˘mode (required):
"standard"
for fast renders,"pro"
for maximum physics and detail.
3. Use-Case Parameter Recommendations
Film & Advertising
- â˘Mode:
pro
- â˘Prompt Optimizer:
true
- â˘Image URL: Optional HQ product or actor still
- â˘Example Prompt:
âA sleek electric car speeds along a mountain road at golden hour, dust kicking up, camera tracking from rear 30 FPS cinematic.â
Social Media Shorts
- â˘Mode:
standard
- â˘Prompt Optimizer:
false
(keeps tone punchy) - â˘Image URL: Omit or use quick branding card
- â˘Example Prompt:
âFast-paced montage of street food stalls at night, colorful neon signs, jump cuts, 30 FPS.â
E-Learning & Education
- â˘Mode:
pro
(for accurate simulations) - â˘Prompt Optimizer:
true
- â˘Image URL: Diagram or textbook figure
- â˘Example Prompt:
âDemonstrate how a volcano erupts, cross-section view, lava flow fluid dynamics, 24 FPS.â
Concept Art & Pitch Decks
- â˘Mode:
standard
- â˘Prompt Optimizer:
true
- â˘Image URL: Use architectural blueprint or sketch
- â˘Example Prompt:
âBirdâs-eye fly-through of a futuristic city at dawn, sleek towers, reflective glass, gentle drone pan.â
4. Pro Tips
- â˘Iterate Quickly: Start with
standard
mode, refine your prompt, then switch topro
. - â˘Keep Prompts Under 100 Words: Concise prompts converge faster and maintain focus.
- â˘Combine Inputs: For complex scenes, supply both text and a reference image.
- â˘Review & Refine: Use the prompt optimizer toggle to compare raw vs. enhanced outputs.
By following these guidelines and fine-tuning parameters for your specific domain, youâll unlock Hailuo 02âs full potential for stunning, ultra-realistic short videos.
Other Popular Models
Discover other models you might be interested in.
sdxl-controlnet
SDXL ControlNet gives unprecedented control over text-to-image generation. SDXL ControlNet models Introduces the concept of conditioning inputs, which provide additional information to guide the image generation process

faceswap-v2
Take a picture/gif and replace the face in it with a face of your choice. You only need one image of the desired face. No dataset, no training

sdxl-inpaint
This model is capable of generating photo-realistic images given any text input, with the extra capability of inpainting the pictures by using a mask

sd2.1-faceswapper
Take a picture/gif and replace the face in it with a face of your choice. You only need one image of the desired face. No dataset, no training
