Wan 2.5
High-resolution video generation with prompt expansion support
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/generateTask/wan-2-5 | Create generation task |
| GET | /api/v1/statusTask/wan-2-5 | Query task status |
Authentication
All requests require an API Key in the header:
Request Body
Parameters
Parameter
Required
Default
Description
request_typestring—
asyncasync (polling) or callback (webhook)
callback_urlstring✱
—
Callback URL, required when request_type=callback
providerstring—
autoRouting strategy: auto, value, or official
inputobject✓
—
Model input parameters
Mode Options:
text-to-video— Generate video from textimage-to-video— Generate video from image
Example
Text-to-Video
Image-to-Video
Response
POST /api/v1/generateTask/wan-2-5
Returns taskId on success for subsequent status queries.
Success:
Error:
GET /api/v1/statusTask/wan-2-5
Query task execution status and results via taskId.
Success:
Failed:
Status Response Fields
| Field | Type | Description |
|---|---|---|
taskId | string | Unique task identifier |
state | string | pending processing success failed |
resultJson | string | JSON containing resultUrls array (on success) |
failCode | string | Error code (on failure) |
failMsg | string | Error message (on failure) |
createTime | integer | Task creation timestamp (ms) |
completeTime | integer | Task completion timestamp (ms) |
costTime | integer | Processing duration (ms) |
Error Codes
| Code | Description |
|---|---|
| 400 | Invalid parameters or request error |
| 401 | Invalid or missing API Key |
| 429 | Rate limit exceeded |
| Fail Code | Description |
|---|---|
CONTENT_VIOLATION | Content violates safety guidelines |
INVALID_IMAGE_URL | Cannot access provided image URL |
Rate Limits
| Limit | Value |
|---|---|
| Requests | 10000 / minute |
| Concurrent tasks | 1000 |
Exceeding limits returns 429 error. Wait and retry.
Tips
- Generation time:
- 720p resolution: ~50-70 seconds
- 1080p resolution: ~70-90 seconds
- Submit task, wait 50 seconds, then poll every 5 seconds
- Callback mode: Recommend using
callbackmode to avoid frequent polling. - Video expiration: Result URLs are valid for 15 days. Download promptly.
- Content moderation: Prompts must comply with content safety guidelines.
- High resolution support:
720p: Fast generation, for previews and social media1080p: HD output, for professional publishing and high-quality content
- Prompt expansion:
enable_prompt_expansion: true(default): System auto-optimizes and expands prompt with more detailsenable_prompt_expansion: false: Strictly uses original prompt, for precise control- Short prompts benefit from expansion; detailed prompts can disable it
- Aspect ratio selection:
16:9: Landscape (default), for traditional video platforms9:16: Portrait, for short video platforms and mobile viewing1:1: Square, for social media
- Negative prompt:
- Use
negative_promptto avoid blur, low quality, jitter, and other unwanted effects - Example: "low quality, blurry, shaky, distorted"
- Helps improve video stability and clarity
- Use
- Seed reproduction:
- Same
seed+prompt+ parameters reproduces identical results - Ideal for consistent batch generation or iterative refinement
- Same
- Image-to-video:
- Reference image becomes video start frame
- Describe desired animation effects and camera movement in prompt
- Ideal for bringing still images to life, character animation, scene expansion
- Prompt tips:
- Describe specific scenes and actions (e.g., "clouds drifting over mountains", "slow dolly in")
- Describe dynamic elements (e.g., "swaying leaves", "flowing water", "flying birds")
- Describe camera movement (e.g., "slow push in", "orbiting shot", "wide to close")
- Be specific; concrete descriptions work better than abstract ones
- Duration selection:
- 5 seconds: Quick previews, short clips, loop animations
- 10 seconds: More narrative space, complete scene showcases
- Image formats:
image_urlssupports JPG, PNG, WebP, max 10MB per image. - Best practices:
- Use clear, specific prompts
- Enable prompt expansion for richer details
- Use negative prompt to avoid common issues
- 720p for quick iteration, 1080p for final output