Hailuo
Hailuo
MiniMax Hailuo video generation with Pro/Standard variants
- Endpoint
- POST /api/v1/videos/generate
- model
- hailuo
- Output
- Video
- Credits
- from 15
1
إرسال مهمة
POST
/api/v1/videos/generateالمُعاملات
modelstringمطلوبMust be "hailuo"
typestringاختياريالافتراضيtext-to-video"text-to-video" or "image-to-video" (default: text-to-video)
text-to-videoimage-to-videopromptstringمطلوبText prompt (3-5000 chars)
hailuo_modelstringاختياري"hailuo/02-text-to-video-pro", "hailuo/02-image-to-video-pro", "hailuo/02-text-to-video-standard", or "hailuo/02-image-to-video-standard"
hailuo/02-text-to-video-prohailuo/02-image-to-video-prohailuo/02-text-to-video-standardhailuo/02-image-to-video-standardimage_urlsstring[]اختياريRequired for image-to-video
input_imagestringاختياريDeprecated. Alias for image_urls[0]
durationstringاختياري"6" or "10" (Standard variants only)
610resolutionstringاختياري"512P" or "768P" (image-to-video-standard only)
512P768P
الطلب
curl -X POST https://www.bananapro.site/api/v1/videos/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "hailuo",
"type": "image-to-video",
"prompt": "A close-up of waves rolling onto a rocky beach",
"hailuo_model": "hailuo/02-image-to-video-standard",
"image_urls": ["https://cdn.gempix2.site/gempix2/img/tasks/gptimage25-g25-89eb5727b74db3d74b84ab07045757123470ab2b6bc0ae72-0.webp"],
"duration": "6",
"resolution": "768P"
}'الرد200
{
"success": true,
"data": {
"task_id": "task_hailuo123",
"credits_used": 35,
"remaining_credits": 465,
"model": "hailuo/02-image-to-video-standard"
}
}قيم credits_used في هذه الأمثلة توضيحية. يُحسب الاستهلاك الفعلي عند الإرسال وتُعيده واجهة API.
2
الاستعلام عن المهمة
GET
/api/v1/videos/{task_id}status
pending- Accepted and waiting to start. Keep polling.
processing- Running. Keep polling.
completed- Finished. Read video_url; output holds the full result.
failed- Ended without a result. error_message says why and credits_refunded shows what was returned.
Poll every 5 to 10 seconds and stop at completed or failed, or register a webhook to be notified instead. Failed tasks are refunded automatically.
الطلب
curl https://www.bananapro.site/api/v1/videos/task_abc123 \
-H "Authorization: Bearer sk-your-api-key"الرد200
{
"success": true,
"data": {
"task_id": "task_abc123",
"model": "hailuo",
"status": "completed",
"output": { "video_url": "https://..." },
"video_url": "https://...",
"error_message": null,
"credits_used": 35,
"credits_refunded": 0,
"created_at": "2026-10-04T10:00:00.000Z",
"updated_at": "2026-10-04T10:01:12.000Z",
"completed_at": "2026-10-04T10:01:12.000Z"
},
"request_id": "req_abc123"
}انتظار النتيجة
TASK_ID=task_abc123
while true; do
TASK=$(curl -s https://www.bananapro.site/api/v1/videos/$TASK_ID \
-H "Authorization: Bearer sk-your-api-key")
STATUS=$(echo "$TASK" | jq -r '.data.status')
if [ "$STATUS" = "completed" ] || [ "$STATUS" = "failed" ]; then
echo "$TASK" | jq
break
fi
sleep 10
doneالتسعير
| Variant | Credits |
|---|---|
| text-to-video-pro | 65 |
| image-to-video-pro | 65 |
| text-to-video-standard (6s) | 35 |
| text-to-video-standard (10s) | 55 |
| image-to-video-standard (6s, 512P) | 15 |
| image-to-video-standard (6s, 768P) | 35 |
| image-to-video-standard (10s, 512P) | 25 |
| image-to-video-standard (10s, 768P) | 55 |
المزايا
- Text-to-video generation
- Image-to-video generation
- Standard and Pro variants
- Optional duration/resolution controls