Hailuo MCP
Call Hailuo / MiniMax video generation capabilities in the AI Agent through MCP.
Generate a video from a text description, then play or download it when it is ready.
Describe the subject, action, and camera shot to create your first video.
Use a compatible model and first_image_url for image-to-video generation.
Keep the task ID to check completion status and video results.
Get a Key, copy the request, and view the corresponding JSON response below.
export ACEDATACLOUD_API_KEY="YOUR_API_KEY"
curl --request POST "https://api.acedata.cloud/hailuo/videos" \
--header "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"action": "generate",
"model": "minimax-t2v",
"prompt": "A small sailboat crossing a calm lake at sunrise.",
"async": true
}'The following excerpt shows key fields from the existing API response. The task identifier, usage, and generated content depend on the values returned by your request.
{
"task_id": "58cc618b-9639-4ee7-add2-d2fcf260d9a3",
"trace_id": "0c1f9f13-0aef-4d9a-a9d2-1d27055ff190"
}Use the task ID returned upon submission to check progress and retrieve the final result.
curl --request POST "https://api.acedata.cloud/hailuo/tasks" \
--header "Authorization: Bearer $ACEDATACLOUD_API_KEY" \
--header "Content-Type: application/json" \
--data '{"action": "retrieve", "id": "58cc618b-9639-4ee7-add2-d2fcf260d9a3"}'The following illustrates the fields for a task in progress. Continue querying the same ID until it completes.
{
"id": "58cc618b-9639-4ee7-add2-d2fcf260d9a3",
"type": "videos",
"finished_at": null
}The following is an excerpt of key fields from the current API response. The task ID, usage, and generated content depend on the values returned by your request.
{
"id": "58cc618b-9639-4ee7-add2-d2fcf260d9a3",
"started_at": 1736863231.648,
"finished_at": 1736863300.748,
"elapsed": 69.1,
"response": {
"success": true,
"task_id": "58cc618b-9639-4ee7-add2-d2fcf260d9a3",
"trace_id": "0c1f9f13-0aef-4d9a-a9d2-1d27055ff190",
"data": [
{
"id": "2a1tbgnjdxrg80cmcmes19s33r",
"state": "succeeded",
"video_url": "https://platform.cdn.acedata.cloud/czjl/tjU3QYKgU96IJFgpL0eMfBFhmy0qXz9Y05P2IBhShCYaDCFUA/tmp5uligw3a.output.mp4"
}
]
}
}Image-to-video generation uses the appropriate model and first_image_url. See the guide for complete input requirements.
Read the video or audio track URL returned in response. If the task fails, read the error message and end the query process.
Refer to the current API and pricing page for request parameters, available models, and costs. If you encounter authentication, balance, or quota errors, check the Key's associated application, validity period, and usage restrictions. Retain the trace_id when troubleshooting requests.
Continue to the complete guide for parameters, result fields, and error handling.