Hailuo
MiniMax · Video
hailuo- Modes
- 1
Modes and prices
- Price
- 19 tokens
- per video 6 s · standard · 768P
Request
Hailuo 02
"model": "hailuo:generate"Price
19 tokens per video 6 s · standard · 768P. This is the price of the example request below, in balance tokens. POST /v1/quotes gives the exact price of your request before it runs.quality: standardresolution: 768Pduration: 6
balance tokens per video · columns are duration
| quality · resolution | 6 | 10 |
|---|---|---|
| standard | ||
| 768P | 19 | 33 |
| 1080P | 33 | 19 |
| pro | ||
| 768P | 28 | 57 |
| 1080P | 50 | 19 |
The highlighted price is the example request's.
All price rules: 8
The rules go in order: the first one a request matches sets its price.
| quality | resolution | duration | Price |
|---|---|---|---|
| standard | 768P | 6 | 19 per generation |
| standard | 768P | 10 | 33 per generation |
| standard | 1080P | 6 | 33 per generation |
| standard | 1080P | 10 | 19 per generation |
| pro | 768P | 6 | 28 per generation |
| pro | 768P | 10 | 57 per generation |
| pro | 1080P | 6 | 50 per generation |
| pro | 1080P | 10 | 19 per generation |
Price make-up (pricing from GET /v1/models/{id})
{
"unit": "tokens",
"kind": "by_parameters",
"base": 19,
"example_price": 19,
"matrix": [
{
"when": {
"quality": "standard",
"resolution": "768P",
"duration": "6"
},
"price": 19
},
{
"when": {
"quality": "standard",
"resolution": "768P",
"duration": "10"
},
"price": 33
},
{
"when": {
"quality": "standard",
"resolution": "1080P",
"duration": "6"
},
"price": 33
},
{
"when": {
"quality": "standard",
"resolution": "1080P",
"duration": "10"
},
"price": 19
},
{
"when": {
"quality": "pro",
"resolution": "768P",
"duration": "6"
},
"price": 28
},
{
"when": {
"quality": "pro",
"resolution": "768P",
"duration": "10"
},
"price": 57
},
{
"when": {
"quality": "pro",
"resolution": "1080P",
"duration": "6"
},
"price": 50
},
{
"when": {
"quality": "pro",
"resolution": "1080P",
"duration": "10"
},
"price": 19
}
]
}Example request
curl https://api.unitool.ai/v1/generations \
-H "Authorization: Bearer $UNITOOL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Prefer: wait=60" \
-d '{
"model": "hailuo",
"mode": "generate",
"input": {
"prompt": "A red fox running through fresh snow at sunrise",
"quality": "standard",
"resolution": "768P",
"duration": "6",
"image_url": "https://example.com/input.png"
},
"metadata": {
"order_id": "A-1042"
}
}'{
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "hailuo",
"mode": "generate",
"status": "queued",
"progress": 0,
"cost": {
"estimated_tokens": 19,
"charged_tokens": 0,
"refunded_tokens": 0,
"settled": false
},
"outputs": [],
"error": null,
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": null,
"expires_at": null
}Result
While the generation runs, read it by id: the status changes from queued or running to succeeded. With the Prefer: wait header the finished object may come in the answer to POST itself, as 200 instead of 202.
curl https://api.unitool.ai/v1/generations/gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60 \
-H "Authorization: Bearer $UNITOOL_API_KEY"{
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "hailuo",
"mode": "generate",
"status": "succeeded",
"progress": 1,
"cost": {
"estimated_tokens": 19,
"charged_tokens": 19,
"refunded_tokens": 0,
"settled": true
},
"outputs": [
{
"index": 0,
"type": "video",
"file_ref": "attachment:482913",
"url": "https://api.unitool.ai/v1/files/q83vEjRkT1mXc0yLw2hN5aZp7dUoB9sGfI4tKeYxWrQ6/file.mp4",
"content_type": "video/mp4",
"width": 1366,
"height": 768,
"duration_sec": 6,
"size": 6815744,
"expires_at": "2026-12-06T12:00:41.000Z"
}
],
"error": null,
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": "2026-11-29T12:00:41.000Z",
"expires_at": "2026-12-06T12:00:41.000Z"
}If the generation fails
The HTTP answer is still 200. The reason is in error.code, what happened to the tokens in error.refund. All codes: Media generations
{
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "hailuo",
"mode": "generate",
"status": "failed",
"progress": 0,
"cost": {
"estimated_tokens": 19,
"charged_tokens": 19,
"refunded_tokens": 19,
"settled": true
},
"outputs": [],
"error": {
"code": "model_error",
"message": "The model failed to produce a result.",
"refund": "full"
},
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": "2026-11-29T12:00:41.000Z",
"expires_at": null
}Parameters
| Parameter | Description |
|---|---|
promptstring | |
qualitystring | Values:standardproDefault "standard" |
resolutionstring | Values:768P1080PDefault "768P" |
durationstring | Values:610Default "6" |
image_urlfile · required | A file_ref (asset:… or attachment:…), an https URL or a data: URL. |
Webhook
When the generation finishes, the same object is sent by POST to your address, in the data field. Signature, retries and setup: Webhooks
{
"type": "generation.succeeded",
"timestamp": "2026-11-29T12:00:41.000Z",
"data": {
"id": "gen_6f1c0e9a2b7d4c3e8f5a1b2c3d4e5f60",
"object": "generation",
"model": "hailuo",
"mode": "generate",
"status": "succeeded",
"progress": 1,
"cost": {
"estimated_tokens": 19,
"charged_tokens": 19,
"refunded_tokens": 0,
"settled": true
},
"outputs": [
{
"index": 0,
"type": "video",
"file_ref": "attachment:482913",
"url": "https://api.unitool.ai/v1/files/q83vEjRkT1mXc0yLw2hN5aZp7dUoB9sGfI4tKeYxWrQ6/file.mp4",
"content_type": "video/mp4",
"width": 1366,
"height": 768,
"duration_sec": 6,
"size": 6815744,
"expires_at": "2026-12-06T12:00:41.000Z"
}
],
"error": null,
"metadata": {
"order_id": "A-1042"
},
"created_at": "2026-11-29T12:00:00.000Z",
"completed_at": "2026-11-29T12:00:41.000Z",
"expires_at": "2026-12-06T12:00:41.000Z"
}
}Limits
Generations are async: create, wait or poll, the result by link for 7 days. Details: Media generations
Concurrent generations are limited per account, extra ones wait in the queue: Limits and headers