Alibaba Model Studio Wan Video Generation Provider
Set up the bundled alibaba plugin to generate video with Wan models on Alibaba Model Studio (DashScope). Covers API key auth, CLI flags, and the default wan2.6-t2v model.
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 (known internationally as DashScope). It is on by default; all you need is an API key.
| Property | Value |
|---|---|
| Provider id | alibaba |
| Plugin | bundled, enabledByDefault: true |
| Auth env vars | MODELSTUDIO_API_KEY → DASHSCOPE_API_KEY → QWEN_API_KEY (first match wins) |
| Onboarding flag | --auth-choice alibaba-model-studio-api-key |
| Direct CLI flag | --alibaba-model-studio-api-key <key> |
| Default model | alibaba/wan2.6-t2v |
| Default base URL | https://dashscope-intl.aliyuncs.com |
Getting started
Set an API key
Save the key to the alibaba provider during onboarding:
openclaw onboard --auth-choice alibaba-model-studio-api-key
Alternatively, supply the key inline:
openclaw onboard --alibaba-model-studio-api-key <your-key>
You can also export any of the accepted env vars before the Gateway starts:
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 this list. When MODELSTUDIO_API_KEY cannot be resolved, openclaw models status --json reports the missing credential under auth.unusableProfiles.
Note
Both the Alibaba plugin and the Qwen plugin authenticate against DashScope, and their accepted env vars overlap. For the dedicated Wan video surface, use
alibaba/...model ids; for Qwen chat, embedding, or media-understanding, useqwen/...ids.
Built-in Wan models
| Model ref | Mode |
|---|---|
alibaba/wan2.6-t2v | Text-to-video (default) |
alibaba/wan2.6-i2v | Image-to-video |
alibaba/wan2.6-r2v | Reference-to-video |
alibaba/wan2.6-r2v-flash | Reference-to-video (fast) |
alibaba/wan2.7-r2v | Reference-to-video |
Capabilities and limits
When a request carries exactly one reference image and no video, wan2.6-t2v
switches to wan2.6-i2v on its own, and the result reports which model was
resolved. Such routing happens only if a same-generation image-to-video sibling
exists in the known model catalog. Every other request follows the selected
model's mode. Geometry is handled per the vendor protocol for that model
family.
| Mode | Max output videos | Reference limits | Max duration | Supported controls |
|---|---|---|---|---|
| Text-to-video | 1 | n/a | 15 s | size, aspectRatio, resolution, audio, watermark |
| Image-to-video | 1 | 1 image | 15 s | resolution, audio, watermark |
| Reference-to-video (Wan 2.6) | 1 | 5 total images/videos; up to 3 videos | 10 s | size, aspectRatio, resolution, audio, watermark |
| Reference-to-video (Wan 2.7) | 1 | 5 total images/videos; up to 3 videos | 10 s | size, aspectRatio, resolution, watermark; audio is always on |
For Wan 2.6 text and reference models, resolution and aspectRatio are translated into
the documented exact size. Wan 2.6 image-to-video passes the resolution tier and
takes its aspect ratio from the input image. Wan 2.7 reference-to-video passes
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 applies.
Local files and remote http(s) URLs are both accepted for image-to-video and Wan 2.7 reference images. When images are local, OpenClaw transmits them as base64 data URIs, and each image may be at most 20 MB before encoding. Consult the Model Studio references for image-to-video and Wan 2.7 reference-to-video.
Remote http(s) URLs remain mandatory for reference videos and for Wan 2.6 reference-to-video images.
Advanced configuration
Override the DashScope base URL
By default the provider uses the international DashScope endpoint. Follow these steps to reach the China-region endpoint instead:
{
models: {
providers: {
alibaba: {
baseUrl: "https://dashscope.aliyuncs.com",
},
},
},
}
Trailing slashes are removed by the provider prior to building AIGC task URLs.
Auth env priority
The Alibaba API key is resolved by OpenClaw from environment variables in the sequence below, and the first non-empty value wins:
MODELSTUDIO_API_KEYDASHSCOPE_API_KEYQWEN_API_KEY
Any auth.profiles entries you configure (through openclaw models auth login) take precedence over env-var resolution. For profile rotation, cooldown, and override mechanics, see Auth profiles in the models FAQ.
Relationship to the Qwen plugin
DashScope is the backend for both bundled plugins, and their API keys overlap. Follow this split:
- Use
alibaba/wan*.*ids with the dedicated Wan video provider covered on this page. - Use
qwen/*ids for Qwen chat, embedding, and media understanding (see Qwen).
A single MODELSTUDIO_API_KEY setting authenticates both plugins at once, because the auth env var list is deliberately overlapping; you do not need to run onboarding for each plugin separately.
Related
-
Video generation, Provider selection plus the parameters shared by the video tool.
-
Qwen, Setting up Qwen chat, embedding, and media understanding against the same DashScope auth.
-
Configuration reference, Model configuration and agent defaults.
-
Models FAQ, Auth profiles, model switching, and fixes for "no profile" errors.