Hailuo 2.3 Fast

Transform text and images into professional-quality videos at lightning speed.

~126.11s
$0.240 - $0.410 per generation
 1import requests
 2import json
 3
 4url = "https://api.segmind.com/v1/hailuo-2.3-fast"
 5headers = {
 6    "x-api-key": "YOUR_API_KEY",
 7    "Content-Type": "application/json"
 8}
 9
10data = {
11    "prompt": "A woman stands outdoors in soft sunlight, modeling a blue floral knit cardigan over white pants. She gently poses with relaxed confidence, running her hand through her flowing hair as the camera slowly pans around, highlighting the sweater’s floral pattern against a natural garden background.",
12    "duration": 6,
13    "resolution": "1080p",
14    "prompt_optimizer": true,
15    "first_frame_image": "https://segmind-resources.s3.amazonaws.com/input/a1f4d83b-62f9-4842-91c7-2af871836dd6-hailuo-2.3-fast.jpg"
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/hailuo-2.3-fast

Parameters

first_frame_imagerequired
string (uri)

Sets initial image for video, affecting screen ratio. Use a themed image for cohesive videos.

promptrequired
string

The text description used for content creation. Use detailed text for unique scenes or abstract for artistic videos.

durationoptional
integer

Defines video length in seconds. Use 6 for short clips, 10 for more detailed scenes.

Default: 6
Allowed values :
610
prompt_optimizeroptional
boolean

Enhances prompt quality for improved results. Enable for complex prompts, disable for simpler tasks.

Default: true
resolutionoptional
string

Sets video quality. Choose 768p for faster processing, 1080p for high detail.

Default: "1080p"
Allowed values :
"768p""1080p"

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