hailuo-02
Model Overview
Compared to earlier versions, this model brings enhanced physics, more natural camera movement, and better alignment with prompts. It currently supports 10-second clips at 768p, with native 1080p coming soon.
Setup your API Key
If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guide.
How to Make a Call
Generating a video using this model involves making two sequential API calls:
The first one is for creating and sending a video generation task to the server (returns a generation ID).
The second one is for requesting the generated or extended video from the server using the generation ID received from the first endpoint.
Below, you can find both corresponding API schemas.
API Schemas
Create a video generation task and send it to the server
Retrieve the generated video from the server
After sending a request for video generation, this task is added to the queue. Based on the service's load, the generation can be completed in seconds or take a bit more.
Full Example: Generating and Retrieving the Video From the Server
The code below creates a video generation task, then automatically polls the server every 10 seconds until it finally receives the video URL.
Generation may take around 4-5 minutes for a 6-second video and 8-9 minutes for a 10-second video.
Last updated
Was this helpful?