DEV Community

Viddra Team
Viddra Team

Posted on

Wan 3.0 API: pricing, features and a working Python example

Wan 3.0 is Alibaba's "all-in-one" video generation model, and it has quietly become the most flexible frontier model you can call from a single endpoint: text-to-video, image-to-video with first/last-frame control, and reference-to-video — with native audio baked in, up to 30 seconds per clip.

This is the rundown I wanted when I wired it up: real pricing, the actual feature set, and a complete Python example using the real API shape (no pseudocode).

Pricing: per-second, audio included

Pay-as-you-go, no subscription. Audio is included at every tier — the same price whether sound is on or off:

Resolution Price/sec Duration Example cost
480p $0.25 2–30s 5s clip ≈ $1.25
720p $0.50 2–30s 5s clip ≈ $2.50
1080p $1.00 2–30s 5s clip ≈ $5.00

Five aspect ratios are supported: 16:9, 9:16, 1:1, 4:3, 3:4. Output is a 30fps MP4.

That 30-second ceiling is the standout feature. Most frontier models cap at 5–15 seconds per run; Wan 3.0 does 2–30s, which makes it one of the longest single-shot generators available through an API. Need longer? Chain clips by feeding the last frame of one render in as the first frame of the next.

What the model actually supports

  • Text-to-video — straight prompt to clip
  • Image-to-video — animate a still (first-frame input), with an optional last frame for controlled transitions or loops
  • Reference-to-video — ground the generation in up to 10 reference images, 5 reference videos and 5 reference audio tracks; the model preserves your subject's look
  • Native audio — ambience, sound effects and music are baked into the MP4 (included in the per-second price)

For e-commerce/product shots, the combination of image-to-video + reference media + native audio in one render is the practical selling point: packshot photo in, product loop with sound out.

The API shape

Plain REST + JSON, authenticated with a Bearer key (vsk-...). The flow is asynchronous:

  1. POST /v1/video/generations202 Accepted with an id and a hold_usd (the estimated cost is frozen from your balance)
  2. Poll GET /v1/video/generations/{id} every 3–5 seconds: queued → running → succeeded / failed
  3. succeeded returns a video_url; failed automatically refunds the held amount

On Viddra the model id is wan3.0-video, and the full live model directory is at GET /v1/models.

A complete Python example

Runnable as-is — the only thing to replace is the API key:

import time
import requests

API = "https://api.viddra.com"
H = {"Authorization": "Bearer YOUR_VIDDRA_API_KEY"}

# 1) Submit the generation task (async — returns 202 Accepted)
task = requests.post(
    f"{API}/v1/video/generations",
    headers=H,
    json={
        "model": "wan3.0-video",
        "prompt": "Cinematic dolly shot through a neon-lit market street in the rain, ultra-detailed, 4k",
        "duration": 5,
        "resolution": "720p",
        "aspect_ratio": "16:9",
        "audio": True,
    },
).json()

print(task)  # {'id': '...', 'status': 'queued', 'hold_usd': '2.5000', ...}

# 2) Poll until the task succeeds (or fails — the hold is auto-refunded)
while True:
    t = requests.get(f"{API}/v1/video/generations/{task['id']}", headers=H).json()

    if t["status"] == "succeeded":
        print("video_url:", t["video_url"])
        break
    if t["status"] == "failed":
        raise RuntimeError(t.get("error"))
    time.sleep(5)
Enter fullscreen mode Exit fullscreen mode

Most 5-second renders finish in a couple of minutes. Wan 3.0 supports durations from 2 to 30 seconds, so the same code works for a 30s 1080p render — only your bill changes.

Things worth knowing before your first call

  • hold_usd vs cost_usd: the estimate is frozen at submit time and settled against the actual (millisecond-precision) cost on completion. Failed tasks never charge you.
  • Rate limits: 100 requests/minute/IP globally. You can also set an optional monthly spend cap per API key — once hit, generation calls return 429 MONTHLY_LIMIT_EXCEEDED until next month. Good safety net for CI jobs.
  • Free test budget: new accounts get $1 in credits — enough for a 2s 720p or a 4s 480p Wan 3.0 clip, which is enough to validate your whole integration end-to-end without paying. Top-ups get a 10% bonus.
  • One error envelope: every error is {"error": {"code": ..., "message": ...}}, and 4xx messages name the exact offending field — refreshingly rare.

Wrapping up

Full disclosure: I work on Viddra, the unified API used above — one key for 20+ video/image/audio models, pay-per-second from $0.12/s. The endpoint contract above is straight from the public docs, so nothing here is pseudocode.

Useful links:

If you build something with it — or you're comparing Wan 3.0 against Seedance 2.5 or Veo 3.1 Fast for long-form generation — happy to talk trade-offs in the comments.

Top comments (0)