Alibaba Model Studio Wan Video Generation in OpenClaw

Learn how to use the bundled alibaba plugin to generate videos with Wan models on Alibaba Model Studio. This guide covers API key setup, configuration, and usage.

Read this when

  • You want to use Alibaba Wan video generation in OpenClaw
  • You need Model Studio or DashScope API key setup for video generation

The bundled alibaba plugin adds a video-generation provider for Wan models on Alibaba Model Studio, which is the international name for DashScope. This plugin comes activated out of the box, so an API key is the only requirement.

PropertyValue
Provider idalibaba
Pluginbundled, enabledByDefault: true
Auth env varsMODELSTUDIO_API_KEYDASHSCOPE_API_KEYQWEN_API_KEY (first match wins)
Onboarding flag--auth-choice alibaba-model-studio-api-key
Direct CLI flag--alibaba-model-studio-api-key <key>
Default modelalibaba/wan2.6-t2v
Default base URLhttps://dashscope-intl.aliyuncs.com

Getting started

Set an API key

During onboarding, assign the key to the alibaba provider:

openclaw onboard --auth-choice alibaba-model-studio-api-key

Alternatively, supply the key directly:

openclaw onboard --alibaba-model-studio-api-key <your-key>

Or set one of the recognized env vars before launching the Gateway:

export MODELSTUDIO_API_KEY=sk-...
# or DASHSCOPE_API_KEY=...
# or QWEN_API_KEY=...

Set a default video model

{
  agents: {
    defaults: {
      mediaModels: {
        video: {
          primary: "alibaba/wan2.6-t2v",
        },
      },
    },
  },
}

Verify the provider is configured

openclaw models list --provider alibaba

All five bundled Wan models appear in the list. When MODELSTUDIO_API_KEY fails to resolve, openclaw models status --json flags the absent credential under auth.unusableProfiles.

Note

Both the Alibaba plugin and the Qwen plugin authenticate with DashScope and share overlapping env vars. For the dedicated Wan video surface, pick alibaba/... model ids; for Qwen chat, embedding, or media-understanding, use qwen/... ids.

Built-in Wan models

Model refMode
alibaba/wan2.6-t2vText-to-video (default)
alibaba/wan2.6-i2vImage-to-video
alibaba/wan2.6-r2vReference-to-video
alibaba/wan2.6-r2v-flashReference-to-video (fast)
alibaba/wan2.7-r2vReference-to-video

Capabilities and limits

Each model only exposes the runtime mode that matches it. Geometry, too, follows the vendor protocol for that model family, rather than sending a single generic parameter shape.

ModeMax output videosReference limitsMax durationSupported controls
Text-to-video1n/a15 ssize, aspectRatio, resolution, audio, watermark
Image-to-video11 image15 sresolution, audio, watermark
Reference-to-video (Wan 2.6)15 total images/videos; up to 3 videos10 ssize, aspectRatio, resolution, audio, watermark
Reference-to-video (Wan 2.7)15 total images/videos; up to 3 videos10 ssize, aspectRatio, resolution, watermark; audio is always on

For Wan 2.6 text/reference models, resolution and aspectRatio are converted into the documented exact size. The Wan 2.6 image-to-video mode sends the resolution tier and adopts the aspect ratio of the input image. Wan 2.7 reference-to-video uses the newer media, resolution, and ratio fields and always produces audio.

If durationSeconds is left out of a request, DashScope's accepted default of 5 seconds is applied.

Warning

Reference image and video inputs must be remote http(s) URLs; DashScope's reference modes reject local file paths. Upload to object storage first, or use the media tool flow that already produces a public URL.

Advanced configuration

Override the DashScope base URL

By default, the provider points to the international DashScope endpoint. If you need the China-region endpoint instead:

{
  models: {
    providers: {
      alibaba: {
        baseUrl: "https://dashscope.aliyuncs.com",
      },
    },
  },
}

Before AIGC task URLs are assembled, any trailing slashes are removed by the provider.

Auth env priority

The Alibaba API key is looked up by OpenClaw from environment variables, with the first one that is not empty winning:

  1. MODELSTUDIO_API_KEY
  2. DASHSCOPE_API_KEY
  3. QWEN_API_KEY

When auth.profiles entries are configured through openclaw models auth login, they take precedence over environment variable resolution. For details on rotating profiles, cooldown periods, and override behavior, refer to Auth profiles in the models FAQ.

Relationship to the Qwen plugin

Both included plugins communicate with DashScope and accept keys that overlap. Choose accordingly:

  • Use alibaba/wan*.* ids for the dedicated Wan video provider covered on this page.
  • Use qwen/* ids for Qwen chat, embedding, and media understanding, which is described in Qwen.

A single MODELSTUDIO_API_KEY setting authenticates both plugins, because the auth environment variable list is intentionally shared; there is no need to set up each plugin individually.

  • Video generation, Common video tool parameters and how to pick a provider.

  • Qwen, Qwen chat, embedding, and media-understanding configuration using the same DashScope credentials.

  • Configuration reference, Defaults for agents and model settings.

  • Models FAQ, Auth profiles, model switching, and fixing "no profile" errors.

789 words · updated Aug 12, 2026