Hailuo 2.3
Hailuo 2.3 creates hyper-realistic videos from text prompts with fluid character movements and advanced expressive detail.
1import requests
2import json
3
4url = "https://api.segmind.com/v1/hailuo-2.3"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "A young woman in yoga attire balances gracefully in tree pose on a rock by a serene lake, surrounded by wildflowers and soft morning light. She slowly shifts her arms overhead, transitions through gentle stretches and flows, framed by sun rays filtering through the tree, with calm water and distant mountains in the background.",
12 "duration": 6,
13 "resolution": "768p",
14 "prompt_optimizer": true,
15 "first_frame_image": "https://segmind-resources.s3.amazonaws.com/output/29539533-f96d-4d18-ad41-71a17f06d160-44c1380a-3513-40b6-b085-bc2cd3cc5477.png"
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"
5headers = {
6 "x-api-key": "YOUR_API_KEY",
7 "Content-Type": "application/json"
8}
9
10data = {
11 "prompt": "A young woman in yoga attire balances gracefully in tree pose on a rock by a serene lake, surrounded by wildflowers and soft morning light. She slowly shifts her arms overhead, transitions through gentle stretches and flows, framed by sun rays filtering through the tree, with calm water and distant mountains in the background.",
12 "duration": 6,
13 "resolution": "768p",
14 "prompt_optimizer": true,
15 "first_frame_image": "https://segmind-resources.s3.amazonaws.com/output/29539533-f96d-4d18-ad41-71a17f06d160-44c1380a-3513-40b6-b085-bc2cd3cc5477.png"
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.3Parameters
promptrequiredstringCustomizes video content; use for creative scenarios or instructional content.
durationoptionalintegerControls video length; choose 6 for brief clips or 10 for longer videos.
6610first_frame_imageoptionalstring (uri)Sets video aspect ratio; link to an image with desired dimensions.
prompt_optimizeroptionalbooleanEnhances prompt execution; true optimizes outputs, false for basic generation.
trueresolutionoptionalstringDetermines video clarity; use 768p for standard quality, 1080p for high definition.
"768p""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