Minimax Hailou 2

Generate breathtaking 1080P cinematic videos from text or images with ultra-realistic motion and physics.

~174.45s
$0.338 - $0.600 per generation
 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

POSThttps://api.segmind.com/v1/minimax-hailuo-2

Parameters

last_frame_imagerequired
string (uri)

Sets the ending image.Select a high-quality URL for better results.

Default: null
moderequired
string

Select video generation mode. Choose 'standard' for efficiency or 'pro' for advanced features when available.

Default: "standard"
Allowed values :
"standard""pro"
promptrequired
string

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

Default: "Man wandered into a desert canyon with a lion at his side."
image_urloptional
string (uri)

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

Default: "https://segmind-resources.s3.amazonaws.com/input/db787c04-b073-4e08-ba52-6cee341c7310-7f1198b9-2961-4dc1-ad67-e9c60013b44a.jpeg"
prompt_optimizeroptional
boolean

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

Default: true

Response Type

Returns: Video

Common Error Codes

The API returns standard HTTP status codes. Detailed error messages are provided in the response body.

400

Bad Request

Invalid parameters or request format

401

Unauthorized

Missing or invalid API key

403

Forbidden

Insufficient permissions

404

Not Found

Model or endpoint not found

406

Insufficient Credits

Not enough credits to process request

429

Rate Limited

Too many requests

500

Server Error

Internal server error

502

Bad Gateway

Service temporarily unavailable

504

Timeout

Request timed out