DashScope / Model Studio
Alibaba Cloud Wan tasks use an async header (X-DashScope-Async: enable) on create, then GET /api/v1/tasks/{task_id} until SUCCEEDED, FAILED, or CANCELED. The video URL is on the task payload. Prompt-extension Qwen calls are ordinary chat completions and can stay synchronous; the DiT job cannot.
Gradio Spaces (HF / ModelScope)
Public demos join a queue: upload → hash → /queue/join → SSE events (estimation, process, complete). That is how the official Wan-AI Spaces and this site’s /wan2.2-s2v demo talk to ZeroGPU. Timeouts, sleeps, and daily caps are queue properties, not model properties.
Replicate / fal / others
- Replicate: POST prediction, poll GET /v1/predictions/{id}, status starting|processing|succeeded|failed|canceled.
- fal: queue.submit + queue.result, or webhook.
- Always store the provider id; never block a serverless Worker for the full sample.
Client rules that prevent ghosts
- Create the job, persist job_id + user id.
- Poll 2–5 s with backoff; cap total wait (S2V can exceed 10 minutes on a busy Space).
- Treat 409 / 429 as queue, not as “the model is broken.”
- On SUCCEEDED, copy the file to your own storage — provider URLs expire.
- On FAILED, show the provider message (OOM, NSFW, empty audio) instead of retry storms.
FAQ
- Can I stream frames?
- Not from official generate.py. You get a finished video. Some hosts preview the first clip via --num_clip on S2V.
- Webhook vs poll?
- Webhooks are better on your own API. Browsers should poll or use SSE from your backend so the GPU vendor never sees the user’s socket directly if you can avoid it.
Primary sources
Checked against Wan-Video/Wan2.2 README · Aug 28, 2026