Hailuo Pro Text to Video
Endpoint
POST /videos/generations
Full URL: https://modelfold.ai/v1/videos/generations
Authentication: every request must include the
Authorization: Bearer <API_KEY>header.
Send model parameters directly in the JSON body. Do not wrap them in input. This request waits for generation to finish and returns data[].url; supported media models also offer async jobs, polling and callbacks. Replace example media URLs with your own publicly accessible files. See API gateway for billing and errors.
Input parameters for the generation task
Request Parameters
Body (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model name to use for generation. Required field. - Must be hailuo/02-text-to-video-pro for this endpoint Default:"hailuo/02-text-to-video-pro"。 Allowed values:hailuo/02-text-to-video-pro。 Example:hailuo/02-text-to-video-pro。 |
prompt | string | Yes | Prompt required by the ModelFold gateway; at most 2000 characters. The text prompt for video generation (Max length: 1500 characters) maxLength: 1500. Example:High top angle wide mid close-up tracking shot, flying very fast two meters high over prehistoric ferns and moss-covered ground, dominated by a real young boy (pink t-shirt, pink shorts, white shoes, white long socks), with his back to the camera, body stretched out, gliding smoothly forward, flying in the air, casting a clear shadow on the terrain below. His legs and body are high above the surface, his feet not touching the ground, soaring in a Superman pose. The background is a vast Jurassic valley, filled with dense, ancient jungle vegetation and towering cycads. In the distance, rugged volcanic mountains rise with a winding path cutting through. Massive, slow-moving sauropods graze far off on the horizon. Large, fluffy white clouds float in the vibrant blue sky. Strong dynamic motion blur adds a vivid sense of high-speed flight and deep cinematic perspective. Realistic image –raw.。 |
prompt_optimizer | boolean | No | Whether to use the model's prompt optimizer (Boolean value (true/false)) Example:true。 |
nsfw_checker | boolean | No | Defaults to false. When false, no additional content filtering is applied and results are returned directly by the model. |
Request Example
bash
curl -X POST "https://modelfold.ai/v1/videos/generations" \
-H "Authorization: Bearer $MODELFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hailuo/02-text-to-video-pro",
"prompt": "High top angle wide mid close-up tracking shot, flying very fast two meters high over prehistoric ferns and moss-covered ground, dominated by a real young boy (pink t-shirt, pink shorts, white shoes, white long socks), with his back to the camera, body stretched out, gliding smoothly forward, flying in the air, casting a clear shadow on the terrain below. His legs and body are high above the surface, his feet not touching the ground, soaring in a Superman pose. The background is a vast Jurassic valley, filled with dense, ancient jungle vegetation and towering cycads. In the distance, rugged volcanic mountains rise with a winding path cutting through. Massive, slow-moving sauropods graze far off on the horizon. Large, fluffy white clouds float in the vibrant blue sky. Strong dynamic motion blur adds a vivid sense of high-speed flight and deep cinematic perspective. Realistic image –raw."
}'json
{
"model": "hailuo/02-text-to-video-pro",
"prompt": "High top angle wide mid close-up tracking shot, flying very fast two meters high over prehistoric ferns and moss-covered ground, dominated by a real young boy (pink t-shirt, pink shorts, white shoes, white long socks), with his back to the camera, body stretched out, gliding smoothly forward, flying in the air, casting a clear shadow on the terrain below. His legs and body are high above the surface, his feet not touching the ground, soaring in a Superman pose. The background is a vast Jurassic valley, filled with dense, ancient jungle vegetation and towering cycads. In the distance, rugged volcanic mountains rise with a winding path cutting through. Massive, slow-moving sauropods graze far off on the horizon. Large, fluffy white clouds float in the vibrant blue sky. Strong dynamic motion blur adds a vivid sense of high-speed flight and deep cinematic perspective. Realistic image –raw."
}Response
200 — Generation completed. usage contains actual billing details; result URLs are illustrative.
json
{
"ok": true,
"created": 1792134000,
"data": [
{
"url": "https://modelfold.ai/uploads/outputs/result.mp4"
}
],
"usage": {}
}