Endpointy
| Metoda | Endpoint | Opis |
|---|---|---|
| POST | /api/v1/generateTask/wan-2-5 | Utwórz zadanie generowania |
| GET | /api/v1/statusTask/wan-2-5 | Sprawdź status zadania |
Uwierzytelnianie
Wszystkie żądania wymagają klucza API w nagłówku:Treść żądania
Parametry
async (polling) or callback (webhook)
Callback URL, required when request_type=callback (conditional)
Routing strategy: auto, value, or official
Model input parameters
text-to-video— Generate video from textimage-to-video— Generate video from image
Przykład
Text-to-VideoOdpowiedź
POST /api/v1/generateTask/wan-2-5
ReturnstaskId on success for subsequent status queries.
Success:
GET /api/v1/statusTask/wan-2-5
Query task execution status and results viataskId.
Pola odpowiedzi statusu
Unique task identifier.
Current task state:
pending, processing, success, or failed.JSON string containing
resultUrls array. Only present on success. Parse with JSON.parse().Error code. Only present when
state is failed. See Kody błędów.Human-readable error message. Only present when
state is failed.Task creation timestamp (Unix milliseconds).
Task completion timestamp (Unix milliseconds).
Processing duration in milliseconds.
Kody błędów
| 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 |
Limity rate
| Limit | Value |
|---|---|
| Requests | 10000 / minute |
| Concurrent tasks | 1000 |
429 error. Wait and retry.
Wskazówki
- 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