1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
const axios = require('axios');
const FormData = require('form-data');
const api_key = "YOUR API-KEY";
const url = "https://api.segmind.com/v1/hailuo-2.3-fast";
const reqBody = {
"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.",
"duration": 6,
"resolution": "1080p",
"prompt_optimizer": true,
"first_frame_image": "https://segmind-resources.s3.amazonaws.com/input/a1f4d83b-62f9-4842-91c7-2af871836dd6-hailuo-2.3-fast.jpg"
};
(async function() {
try {
const formData = new FormData();
// Append regular fields
for (const key in reqBody) {
if (reqBody.hasOwnProperty(key)) {
formData.append(key, reqBody[key]);
}
}
// Convert and append images as Base64 if necessary
const response = await axios.post(url, formData, {
headers: {
'x-api-key': api_key,
...formData.getHeaders()
}
});
console.log(response.data);
} catch (error) {
console.error('Error:', error.response ? error.response.data : error.message);
}
})();The text description used for content creation. Use detailed text for unique scenes or abstract for artistic videos.
Defines video length in seconds. Use 6 for short clips, 10 for more detailed scenes.
Allowed values:
Sets video quality. Choose 768p for faster processing, 1080p for high detail.
Allowed values:
Enhances prompt quality for improved results. Enable for complex prompts, disable for simpler tasks.
Sets initial image for video, affecting screen ratio. Use a themed image for cohesive videos.
To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.
Edited by Segmind Team on October 30, 2025.
Hailuo 2.3 Fast is a sophisticated AI model that generates premium videos from images, using descriptive text prompts. It is built for efficiency in speed and precision; therefore, it can deliver content up to 2.5 times faster than previous visual iterations without compromising on essential details or quality. The model combines advanced motion mapping and facial expression technology for smooth, lifelike animations that are essential for a myriad of professional arenas.
Hailuo 2.3 Fast offers unmatched ultra fast rendering 2.5x speeds, while maintaining professional-quality output. It is tailored for commercial and creative uses.
Input a detailed prompt to the model, then enable the prompt optimizer for complex scenes, ensure you use a high-quality initial frame image, and select the resolution based on your use case, i.e., 1080p for detail or 768p for speed.
Yes, you can choose the video duration between 6 and 10 seconds. 6 seconds is perfect for simple transitions and social media content, while 10 seconds works well for complex narratives.
The 'prompt optimizer' improves the input by automatically refining and expanding your descriptions in the prompt for better results. You can use it for complex scenes and disable it during simpler tasks that work fine with direct interpretation.
What types of initial frame images work best? Select high-resolution images that depict your preferred starting point and match the desired aspect ratio. The image should also align with your prompt’s theme to ensure the rendered video is coherent and visually consistent.