Hailuo 2.3 Fast
Transform text and images into professional-quality videos at lightning speed.
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) 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
https://api.segmind.com/v1/hailuo-2.3-fastParameters
first_frame_imagerequiredstring (uri)Sets initial image for video, affecting screen ratio. Use a themed image for cohesive videos.
promptrequiredstringThe text description used for content creation. Use detailed text for unique scenes or abstract for artistic videos.
durationoptionalintegerDefines video length in seconds. Use 6 for short clips, 10 for more detailed scenes.
6610prompt_optimizeroptionalbooleanEnhances prompt quality for improved results. Enable for complex prompts, disable for simpler tasks.
trueresolutionoptionalstringSets video quality. Choose 768p for faster processing, 1080p for high detail.
"1080p""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.
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