DEV Community

AIHubMix
AIHubMix

Posted on

Wan AI 3.0 API Tutorial: Use Alibaba Wan 3.0 on AIHubMix

Alibaba's Wan AI has moved from teasers to a public beta. Wan 3.0 can generate videos up to 30 seconds in a single run, render more expressive characters, and use references from multiple input types. Better still, developers can already call the model through AIHubMix instead of waiting for a separate Wan API rollout.

This tutorial shows how to generate a Wan 3.0 video with the AIHubMix API, poll the asynchronous job, download the result, estimate the cost, and write prompts that take advantage of the model's longer shot length.

Launch status: Alibaba announced the Wan 3.0 public beta on August 6, 2026. AIHubMix lists the model as wan3.0-video. Features and prices in this guide reflect the launch-day API and may change during the beta.

What Is Wan AI 3.0?

Wan AI is Alibaba's video generation model family. The Wan 3.0 public beta focuses on three improvements:

  • Native 30-second generation: one request can produce a video up to 30 seconds long.
  • Reality-grade rendering: Alibaba highlights more expressive characters, stronger reference consistency, and better rendering of digital content.
  • Omni-Reference: Wan 3.0 can reason over text, images, audio, video, and structured sources such as documents, spreadsheets, slides, PDFs, and webpages.

Alibaba describes these features in the official Wan 3.0 launch thread. The AIHubMix launch announcement confirms that Wan 3.0 is live on its platform with text, image, audio, and video inputs.

Wan 3.0 on AIHubMix at a glance

Item Value
Model ID wan3.0-video
Endpoint https://aihubmix.com/ai/v1/videos
Maximum duration Up to 30 seconds
Resolutions 480p, 720p, 1080p
Inputs listed by AIHubMix Text, image, audio, video
Output Video
Job type Asynchronous

The wider Wan 3.0 beta also advertises document and webpage references. At launch, however, the AIHubMix model page explicitly lists text, vision, audio, and video modalities. Check the current documentation before sending document-native inputs through the gateway.

Why Use Alibaba Wan Through AIHubMix?

AIHubMix provides a single API key and a consistent developer workflow across many AI models. For Wan 3.0, the practical advantages are immediate access, an asynchronous task endpoint, and launch pricing below Alibaba's published public-beta rates.

The AIHubMix Wan 3.0 model page currently lists:

IHubMix price
480p:price per second $ 0.04225;
720p: price per second $0.0846;
1080p: price per second $0.169.

Alibaba's launch thread lists $0.05, $0.10, and $0.20 per second for the same resolutions. That makes the launch-day AIHubMix rates about 15.5% lower. Always verify the live model page before estimating production costs.

Prerequisites

You need:

  1. An AIHubMix account and API key.
  2. The Async Tasks feature enabled for your account in the AIHubMix console.
  3. curl for the REST example, or Python 3.9+ for the SDK example.

Store the key in an environment variable instead of placing it in source code:

export AIHUBMIX_API_KEY="your_api_key_here"
Enter fullscreen mode Exit fullscreen mode

Do not commit .env files or API keys to Git.

Generate a Wan 3.0 Video With cURL

Wan 3.0 generation is asynchronous. The workflow has three steps:

  1. Submit a video job.
  2. Poll the returned task ID until the job completes.
  3. Download the generated MP4.

Step 1: Submit the video job

curl -X POST https://aihubmix.com/ai/v1/videos \
  -H "Authorization: Bearer $AIHUBMIX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "wan3.0-video",
    "prompt": "A continuous cinematic tracking shot follows a cyclist through a rain-soaked Tokyo side street at night. Neon signs reflect in the pavement. The camera begins wide, moves alongside the cyclist, then slowly pushes in as steam rises from a food stall. Natural motion, realistic skin and fabric, physically accurate reflections, no cuts.",
    "seconds": "10",
    "size": "720p"
  }'
Enter fullscreen mode Exit fullscreen mode

The response contains a task identifier. Save it as task_id for the next request.

Step 2: Poll the task status

curl https://aihubmix.com/ai/v1/tasks/{task_id} \
  -H "Authorization: Bearer $AIHUBMIX_API_KEY"
Enter fullscreen mode Exit fullscreen mode

Poll at a reasonable interval, such as every 10 to 15 seconds. Stop when the status becomes completed, failed, or canceled. Aggressive polling does not make generation faster and may trigger rate limits.

Step 3: Download the video

curl https://aihubmix.com/ai/v1/tasks/{task_id}/content \
  -H "Authorization: Bearer $AIHUBMIX_API_KEY" \
  --output wan3-result.mp4
Enter fullscreen mode Exit fullscreen mode

Open wan3-result.mp4 locally and review subject consistency, camera motion, unwanted cuts, and visual artifacts before using it in a production workflow.

Use Wan 3.0 With Python

AIHubMix also documents an OpenAI-compatible Python workflow. Install or update the SDK:

pip install -U openai
Enter fullscreen mode Exit fullscreen mode

Create generate_wan_video.py:

import os
import sys
import time

from openai import OpenAI


API_KEY = os.environ.get("AIHUBMIX_API_KEY")
if not API_KEY:
    sys.exit("Set AIHUBMIX_API_KEY before running this script.")

client = OpenAI(
    api_key=API_KEY,
    base_url="https://aihubmix.com/v1",
)

prompt = (
    "A single uninterrupted product shot of a silver smartwatch on black "
    "volcanic stone. Soft morning light moves across the brushed metal. "
    "The camera makes a slow 180-degree orbit while condensation gathers "
    "on the surface. Premium commercial realism, restrained reflections, "
    "stable logo placement, no text overlays, no cuts."
)

video = client.videos.create(
    model="wan3.0-video",
    prompt=prompt,
    seconds="10",
    size="720p",
)

print(f"Created task: {video.id}")

while video.status in ("queued", "in_progress"):
    progress = getattr(video, "progress", 0) or 0
    print(f"Status: {video.status}; progress: {progress}%")
    time.sleep(10)
    video = client.videos.retrieve(video.id)

if video.status != "completed":
    error = getattr(getattr(video, "error", None), "message", "Unknown error")
    sys.exit(f"Generation ended with status {video.status}: {error}")

content = client.videos.download_content(video.id)
content.write_to_file("wan3-result.mp4")
print("Saved wan3-result.mp4")
Enter fullscreen mode Exit fullscreen mode

Run it:

python generate_wan_video.py
Enter fullscreen mode Exit fullscreen mode

For a production service, move polling into a background worker, add exponential backoff, persist the task ID, and make downloads resumable. A web request should not remain open while a 30-second AI video is rendering.

How to Write Better Wan AI Prompts

A good Wan 3.0 prompt reads like a compact shot brief, not a list of style adjectives. Use this order:

Subject + action + setting + lighting + camera movement + shot progression + continuity constraints
Enter fullscreen mode Exit fullscreen mode

1. Describe movement over time

A 30-second clip needs progression. Explain how the action and camera evolve from the opening to the final frame.

Weak:

A cinematic woman in a futuristic city.
Enter fullscreen mode Exit fullscreen mode

Better:

A courier walks through a crowded futuristic market at dawn. Begin with a wide establishing shot, track backward at walking speed as she approaches, then arc to her left when she stops at a glowing map kiosk. Steam crosses the foreground while the crowd continues moving naturally. One continuous take, no cuts.
Enter fullscreen mode Exit fullscreen mode

2. Name a specific camera move

Replace vague words such as "cinematic" with a physical direction:

  • slow push-in
  • lateral tracking shot
  • handheld follow shot
  • crane down to eye level
  • 180-degree product orbit
  • locked-off wide shot

Use one main move and one transition. Too many camera instructions often create unstable motion.

3. Protect identity and product details

When using a reference image or video, explain its role:

Use the first reference for the character's face, hair, and clothing. Use the second reference for the cafe interior and color palette. Preserve the same character identity, jacket details, and table layout throughout the shot.
Enter fullscreen mode Exit fullscreen mode

Do not assume the model knows which reference controls the person, location, or product.

4. Use constraints sparingly

Add only constraints that can be checked in the final video:

One continuous take, no scene cuts, stable facial identity, natural hand motion, no text overlays.
Enter fullscreen mode Exit fullscreen mode

Long negative-prompt lists can compete with the main direction. Start with four or five important constraints, generate a short test, and refine from the visible failure.

Three Wan 3.0 Prompt Examples

Cinematic character scene

A tired detective enters a quiet all-night diner during heavy rain. The camera starts outside the window, slowly pushes through the doorway behind him, and follows as he removes his wet coat and sits at the counter. Fluorescent light mixes with red neon from the street. Keep his face, charcoal coat, and age consistent throughout. Subtle natural expression, realistic wet fabric, one continuous take, no cuts.
Enter fullscreen mode Exit fullscreen mode

Ecommerce product video

A white running shoe rests on a wet track before sunrise. Begin with an extreme close-up of water droplets on the mesh, pull back into a low three-quarter view, then make a smooth half-orbit as warm sunlight reaches the sole. Preserve the shoe silhouette, material, color, and logo placement. Premium commercial lighting, physically accurate reflections, no extra text, no cuts.
Enter fullscreen mode Exit fullscreen mode

Social media food clip

A chef plates handmade ramen in a compact open kitchen. Start overhead as noodles enter the bowl, descend to counter height when broth is poured, then track sideways as the chef adds egg and scallions. Warm practical lighting, visible steam, natural hand movement, appetizing realistic texture. One continuous 10-second take, no text overlay.
Enter fullscreen mode Exit fullscreen mode

A Cost-Smart Testing Workflow

Do not begin prompt development with a 30-second 1080p render. Use a staged workflow:

  1. Test composition and motion at 480p for 5 seconds.
  2. Fix identity, hand, camera, and continuity problems.
  3. Validate the final prompt at 720p for 10 seconds.
  4. Render the 30-second 1080p version only after the shot is stable.

At current AIHubMix pricing, a 5-second 480p test costs about $0.21, while a 30-second 1080p render costs $5.07. Iterating at the lowest useful setting can reduce prompt-development cost substantially.

Common API Problems

The request returns an authorization error

Confirm that AIHUBMIX_API_KEY is set in the same shell that runs the command. Also check that the header uses Bearer followed by a space and the key.

The asynchronous endpoint is unavailable

Enable Async Tasks for the account in the AIHubMix console. The video endpoint depends on that account-level feature.

The task stays queued

Longer and higher-resolution videos need more processing time, especially during a public-beta launch. Keep the task ID, poll less frequently, and retry status requests rather than submitting duplicate paid jobs.

The Python client has no videos attribute

Update the openai package. Video methods require a recent SDK version:

pip install -U openai
Enter fullscreen mode Exit fullscreen mode

If your environment must stay on an older SDK, use the REST workflow shown earlier.

A long video loses consistency

Reduce competing actions, specify one camera path, state which reference controls each element, and test a shorter version first. A 30-second generation magnifies ambiguity in the prompt.

Wan 3.0 FAQ

Is Wan 3.0 available now?

Yes. Alibaba announced Wan 3.0 as a public beta on August 6, 2026, and AIHubMix made wan3.0-video available the same day.

Is Wan 3.0 an Alibaba model?

Yes. Wan AI is developed by Alibaba's Tongyi Lab. Search terms such as Wan Alibaba, Alibaba Wan, and Wan AI refer to the same model family.

Can Wan 3.0 generate a 30-second video?

Yes. The public beta supports native video generation up to 30 seconds in a single run.

Does AIHubMix support image-to-video with Wan 3.0?

The AIHubMix model page lists vision, audio, and video alongside text as supported input modalities. The launch-day quick start demonstrates text-to-video. Check the latest API documentation for the current upload and reference schema before building a multimodal production pipeline.

How much does the Wan 3.0 API cost?

At publication time, AIHubMix lists $0.04225 per second for 480p, $0.0846 for 720p, and $0.169 for 1080p. A 30-second clip therefore costs approximately $1.27, $2.54, or $5.07, depending on resolution.

Start Building With Wan 3.0

Wan 3.0 changes the useful unit of AI video generation from a short visual beat to a complete 30-second shot. The best way to evaluate it is to start with a tightly directed 5-second test, refine the motion and continuity, and scale only the prompts that hold together.

Use the wan3.0-video model page on AIHubMix to verify current pricing and API availability, then submit your first asynchronous generation with the examples above.


Sources: Alibaba Wan 3.0 public-beta announcement, AIHubMix Wan 3.0 announcement, and AIHubMix Wan 3.0 model details.
``

Top comments (0)