Wan25/26
وان25/26
نماذج إنشاء الفيديو واسعة النطاق لإنتاج محتوى عالي الجودة
- Endpoint
- POST /api/v1/videos/generate
- model
- wan25
- Output
- Video
- Credits
- See below
1
إرسال مهمة
POST
/api/v1/videos/generateالمُعاملات
modelstringمطلوب"wan25" or "wan26"
wan25wan26typestringاختياريالافتراضيtext-to-video"text-to-video", "image-to-video", or "video-to-video" (wan26 only; default: text-to-video)
text-to-videoimage-to-videovideo-to-videopromptstringمطلوبText description of the video
image_urlsstring[]اختياريInput image URLs for image-to-video
image_urlstringاختياريLegacy single image URL for image-to-video
video_urlstringاختياريInput video URL for wan26 video-to-video
input_imagestringاختياريDeprecated. Alias for image_urls[0]
durationstringاختياري"5" or "10" (wan25); "5", "10", or "15" (wan26)
51015resolutionstringاختياري"720p" or "1080p"
720p1080pnegative_promptstringاختياريWhat to avoid
enable_prompt_expansionbooleanاختياريAuto-expand prompt
truefalseseednumberاختياريRandom seed for reproducibility
الطلب
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": "wan25",
"prompt": "A butterfly landing on a flower in slow motion",
"duration": "5",
"resolution": "1080p"
}'الرد200
{
"success": true,
"data": {
"task_id": "task_wan123",
"credits_used": 100,
"remaining_credits": 400,
"model": "wan25"
}
}قيم 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": "wan25",
"status": "completed",
"output": { "video_url": "https://..." },
"video_url": "https://...",
"error_message": null,
"credits_used": 100,
"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التسعير
Wan 2.5
| Duration | 720p | 1080p |
|---|---|---|
| 5 sec | 60 | 100 |
| 10 sec | 120 | 200 |
Wan 2.6
| Duration | 720p | 1080p |
|---|---|---|
| 5 sec | 80 | 110 |
| 10 sec | 160 | 220 |
| 15 sec | 240 | 330 |
المزايا
- توليد الفيديو من النص
- فترات متعددة
- دعم 720p و1080p
- توسيع المطالبة اختياري