Minimax Hailou 2
Generate breathtaking 1080P cinematic videos from text or images with ultra-realistic motion and physics.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/minimax-hailuo-2"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "Man wandered into a desert canyon with a lion at his side.",
12 "prompt_optimizer": true,
13 "image_url": "https://segmind-resources.s3.amazonaws.com/input/db787c04-b073-4e08-ba52-6cee341c7310-7f1198b9-2961-4dc1-ad67-e9c60013b44a.jpeg",
14 "mode": "standard",
15 "last_frame_image": null
16}
17
18response = requests.post(url, headers=headers, json=data)
19
20if response.status_code == 200:
21 result = response.json()
22 print(json.dumps(result, indent=2))
23else:
24 print(f"Error: {response.status_code}")
25 print(response.text) 1import requests
2import json
3
4url = "https://api.segmind.com/v1/minimax-hailuo-2"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "Man wandered into a desert canyon with a lion at his side.",
12 "prompt_optimizer": true,
13 "image_url": "https://segmind-resources.s3.amazonaws.com/input/db787c04-b073-4e08-ba52-6cee341c7310-7f1198b9-2961-4dc1-ad67-e9c60013b44a.jpeg",
14 "mode": "standard",
15 "last_frame_image": null
16}
17
18response = requests.post(url, headers=headers, json=data)
19
20if response.status_code == 200:
21 result = response.json()
22 print(json.dumps(result, indent=2))
23else:
24 print(f"Error: {response.status_code}")
25 print(response.text)API Endpoint
https://api.segmind.com/v1/minimax-hailuo-2Parameters
last_frame_imagerequiredstring (uri)Sets the ending image.Select a high-quality URL for better results.
nullmoderequiredstringSelect video generation mode. Choose 'standard' for efficiency or 'pro' for advanced features when available.
"standard""standard""pro"promptrequiredstringDefine video content details for clarity or abstractness. Use nautical themes for oceanic scenes or fictional for creative vibes.
"Man wandered into a desert canyon with a lion at his side."image_urloptionalstring (uri)Provide image URL for relighting. Use high-resolution images to enhance detail or standard for faster processing.
"https://segmind-resources.s3.amazonaws.com/input/db787c04-b073-4e08-ba52-6cee341c7310-7f1198b9-2961-4dc1-ad67-e9c60013b44a.jpeg"prompt_optimizeroptionalbooleanEnhance prompt for video quality. Set to true for optimized storytelling or false to keep original tone.
trueResponse Type
Returns: Video
Common Error Codes
The API returns standard HTTP status codes. Detailed error messages are provided in the response body.
Bad Request
Invalid parameters or request format
Unauthorized
Missing or invalid API key
Forbidden
Insufficient permissions
Not Found
Model or endpoint not found
Insufficient Credits
Not enough credits to process request
Rate Limited
Too many requests
Server Error
Internal server error
Bad Gateway
Service temporarily unavailable
Timeout
Request timed out