Hailuo
MiniMax · Видео
hailuo- Режимы
- 1
Оживляет фотографию: короткое видео MiniMax из одного изображения.
Режимы и цены
- Цена
- 19 токенов
- за видео 6 с · standard · 768P
Запрос
Hailuo 02
"model": "hailuo:generate"Цена
19 токенов за видео 6 с · standard · 768P. Это цена примера запроса ниже, в токенах баланса. Точную цену своего запроса до запуска даёт POST /v1/quotes.quality: standardresolution: 768Pduration: 6
токенов баланса за видео · по столбцам duration
| quality · resolution | 6 | 10 |
|---|---|---|
| standard | ||
| 768P | 19 | 33 |
| 1080P | 33 | 19 |
| pro | ||
| 768P | 28 | 57 |
| 1080P | 50 | 19 |
Подсвечена цена примера запроса.
Все правила цены: 8
Правила идут по порядку: цену задаёт первое, под которое подходит запрос.
| quality | resolution | duration | Цена |
|---|---|---|---|
| standard | 768P | 6 | 19 за генерацию |
| standard | 768P | 10 | 33 за генерацию |
| standard | 1080P | 6 | 33 за генерацию |
| standard | 1080P | 10 | 19 за генерацию |
| pro | 768P | 6 | 28 за генерацию |
| pro | 768P | 10 | 57 за генерацию |
| pro | 1080P | 6 | 50 за генерацию |
| pro | 1080P | 10 | 19 за генерацию |
Состав цены (pricing из 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
}
]
}Пример запроса
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
}Результат
Пока генерация идёт, читайте её по id: статус сменится с queued или running на succeeded. С заголовком Prefer: wait готовый объект может прийти уже в ответе на POST, тогда это 200, а не 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"
}Если генерация не удалась
HTTP-ответ тот же 200. Причина в error.code, судьба токенов в error.refund. Все коды: Генерации медиа
{
"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
}Параметры
| Параметр | Описание |
|---|---|
promptstring | |
qualitystring | МодельЗначения:standardproПо умолчанию "standard" |
resolutionstring | РазрешениеЗначения:768P1080PПо умолчанию "768P" |
durationstring | ДлительностьЗначения:610По умолчанию "6" |
image_urlfile · обязательный | A file_ref (asset:… or attachment:…), an https URL or a data: URL. |
Вебхук
Когда генерация завершается, тот же объект приходит POST-запросом на ваш адрес в поле data. Подпись, повторы и настройка: Вебхуки
{
"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"
}
}Лимиты
Генерация асинхронная: создание, ожидание или опрос, результат по ссылке на 7 дней. Подробно: Генерации медиа
Одновременные генерации ограничены на аккаунт, лишние ждут в очереди: Лимиты и заголовки