Hailuo 2.3

Hailuo 2.3 creates hyper-realistic videos from text prompts with fluid character movements and advanced expressive detail.

~156.71s
$0.350 - $0.700 per generation
 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

POSThttps://api.segmind.com/v1/hailuo-2.3

Parameters

promptrequired
string

Customizes video content; use for creative scenarios or instructional content.

durationoptional
integer

Controls video length; choose 6 for brief clips or 10 for longer videos.

Default: 6
Allowed values :
610
first_frame_imageoptional
string (uri)

Sets video aspect ratio; link to an image with desired dimensions.

prompt_optimizeroptional
boolean

Enhances prompt execution; true optimizes outputs, false for basic generation.

Default: true
resolutionoptional
string

Determines video clarity; use 768p for standard quality, 1080p for high definition.

Default: "768p"
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