Wan 2.6 Async Video Generation
API Documentation
Use these endpoints to submit Wan 2.6 jobs and check their status. Each call spends credits based on duration and audio (synchronized dialogue, SFX, music).
Authentication
All requests must include your API key inside the Authorization header:
Authorization: Bearer <YOUR_API_KEY>Missing or invalid keys return 401 Unauthorized.
POST
https://wan26ai.app/api/generate
Create generation task
Submits a new Wan 2.6 job. The call immediately returns a task_id while the render completes asynchronously.
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model ID: wan/2-6-text-to-video, wan/2-6-image-to-video, or wan/2-6-video-to-video. |
| prompt | string (max 5000 chars) | Yes | Scene description (max 5000 characters). |
| duration | string | No | Video length: "5", "10", or "15" (video-to-video only supports 5 or 10). |
| resolution | string | No | Output resolution: "720p" or "1080p". Default: 1080p. |
| image_urls | string[] | No | Reference image URLs (required for image-to-video model). |
| video_urls | string[] | No | Source video URLs (required for video-to-video model). |
| callback_url | string | No | Optional webhook URL for task completion notification. |
| public | boolean | No | Expose the task to public galleries. |
Credit consumption
Credits deduct when the task is created. Failed jobs are automatically refunded.
| Preset | Credits deducted |
|---|---|
| 720p × 5s | 80 |
| 720p × 10s | 150 |
| 720p × 15s | 220 |
| 1080p × 5s | 115 |
| 1080p × 10s | 220 |
| 1080p × 15s | 325 |
Sample request
{
"model": "wan/2-6-text-to-video",
"prompt": "A golden retriever running through a sunlit meadow, slow motion, cinematic",
"duration": "5",
"resolution": "1080p"
}
// Image-to-Video example:
{
"model": "wan/2-6-image-to-video",
"prompt": "Add gentle wind motion to the scene",
"duration": "5",
"resolution": "720p",
"image_urls": ["https://example.com/reference.jpg"]
}
// Video-to-Video example:
{
"model": "wan/2-6-video-to-video",
"prompt": "Transform to anime style",
"duration": "5",
"resolution": "720p",
"video_urls": ["https://example.com/source.mp4"]
}Sample response
{
"code": 200,
"message": "success",
"data": {
"task_id": "n35abc123def456wan26",
"status": "IN_PROGRESS"
}
}GET / POST
https://wan26ai.app/api/status
Check task status
Use this endpoint to poll the latest record. When the task is still IN_PROGRESS we query the provider once more before replying.
| Parameter | Type | Required | Description |
|---|---|---|---|
| task_id | string | Yes | ID returned by /generate. Send via query (?task_id=) or JSON body. |
| Field | Description |
|---|---|
| task_id | ID returned from /generate. |
| status | SUCCESS |
| request | Sanitized copy of the submitted payload. |
| response | Array of media URLs when status is SUCCESS. |
| consumed_credits | Credits charged for the task (0 when refunded). |
| error_message | Provider error when status is FAILED. |
| created_at | UTC timestamp when the job was stored. |
Sample request
GET https://wan26ai.app/api/status?task_id=n35abc123def456wan26
Authorization: Bearer <YOUR_API_KEY>
# or POST
POST https://wan26ai.app/api/status
Authorization: Bearer <YOUR_API_KEY>
Content-Type: application/json
{
"task_id": "n35abc123def456wan26"
}Sample response
{
"code": 200,
"message": "success",
"data": {
"task_id": "n35abc123def456wan26",
"status": "SUCCESS",
"request": {
"model": "wan/2-6-text-to-video",
"prompt": "A golden retriever running through a sunlit meadow",
"duration": "5",
"resolution": "1080p"
},
"response": [
"https://static.gogloai.com/wan26/video_001.mp4"
],
"consumed_credits": 115,
"error_message": null,
"created_at": "2025-12-17T10:30:00Z"
}
}Error handling
401 Unauthorized- Missing or invalid API key.402 Payment Required- Credit balance could not cover the deduction.429 Too Many Requests- Reduce the polling cadence or request rate.500- Transient issue; retry with exponential backoff.