1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
const axios = require('axios');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/minimax-hailuo-2";
const 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"
};
(async function() {
try {
const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } });
console.log(response.data);
} catch (error) {
console.error('Error:', error.response.data);
}
})();
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.
Hailuo 02, developed by MiniMax, is a state-of-the-art generative AI video model designed for developers, creators, and product managers. Ranked #2 globally on the Artificial Analysis benchmark, it produces professional-grade, 1080P cinematic videos up to 10 seconds long at smooth 24–30 FPS. Leveraging advanced physics simulation, facial recognition, and body tracking, Hailuo 02 delivers ultra-realistic motion, fluid dynamics, and consistent character performance—ideal for marketing, filmmaking, education, and social media.
Q: What’s the maximum video length?
A: Up to 10 seconds per generation.
Q: Can I switch between standard and pro modes?
A: Yes. Use mode: "standard"
for faster renders and mode: "pro"
for advanced physics and detail.
Q: How do I ensure consistent character appearances?
A: Include descriptive facial and body attributes in your prompt; Hailuo 02’s body tracking will maintain consistency.
Q: Does Hailuo 02 support fluid simulations?
A: Absolutely. It excels at water, smoke, and particle effects with real-world physics.
Q: What resolution does Hailuo 02 output?
A: Full HD 1080P by default; specify resolution in your API call if custom sizing is required.