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.

POST
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
RESPONSE
video/mp4
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


promptstr *

Define video content details for clarity or abstractness. Use nautical themes for oceanic scenes or fictional for creative vibes.


prompt_optimizerboolean ( default: true )

Enhance prompt for video quality. Set to true for optimized storytelling or false to keep original tone.


image_urlstr ( default: https://segmind-resources.s3.amazonaws.com/input/db787c04-b073-4e08-ba52-6cee341c7310-7f1198b9-2961-4dc1-ad67-e9c60013b44a.jpeg )

Provide image URL for relighting. Use high-resolution images to enhance detail or standard for faster processing.


modeenum:str *

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 to pro.
  • •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.

Cookie settings

We use cookies to enhance your browsing experience, analyze site traffic, and personalize content. By clicking "Accept all", you consent to our use of cookies.