>_ Aliyun Model Studio CLI
The official command-line interface for Aliyun Model Studio (DashScope) AI Platform
Aliyun Model Studio CLI Site · 中文文档 · API Documentation · Get API Key
Chat with Qwen, generate images & videos, understand images, call agents, manage memory, search the web — all from your terminal.
Built for AI Agents. Every command works as a structured tool call.
Features
Equip your AI Agent out-of-the-box with these capabilities, composable across complex tasks:
- Text chat — Qwen3.7-max: major gains in agentic coding, frontend coding, and vibe coding
- Multimodal (Omni) — Full omni-modal support across text + image + audio + video
- Image generation & editing — Qwen-Image 2.0: pro text rendering, photorealism, strong semantic adherence, multi-image composition
- Video generation & editing — HappyHorse-1.0 series: text-/image-/reference-to-video and natural-language video editing (up to 9-image reference)
- Speech synthesis & recognition — CosyVoice streaming TTS, voice cloning from 5–20s samples; FunAudio-ASR covers 30 languages including 7 Chinese dialects and 20+ Mandarin accents
- Image & video understanding — Qwen-VL: long-form video analysis, chart/document parsing, visual reasoning, multilingual OCR
- Knowledge base & memory — Multimodal RAG retrieval and cross-session memory for personalized, coherent dialogue
- App calls — Invoke agents and workflows already published on Aliyun Model Studio
- Web search — Real-time internet retrieval for up-to-date, accurate answers
- Console capabilities — Browse Bailian apps (
app list) and check free-tier quota (usage free) - Local file auto-upload — Every URL parameter accepts a local path; uploaded to free temp storage with 48-hour validity
Installation
npm install -g bailian-cli
npx skills add modelstudioai/skills --all -g
Requires Node.js >= 22.12.
Quick Start
# Authenticate
bl auth login --api-key sk-xxxxx
# Chat with Qwen
bl text chat --message "What is DashScope?"
# Multimodal chat (text + image + audio + video)
bl omni --message "Describe this image" --image ./photo.jpg
# Generate an image
bl image generate --prompt "A cat in a spacesuit" --out-dir ./images/
# Generate a video from local image
bl video generate --image ./cat.png --prompt "Make the cat move" --download cat.mp4
# Browser login (required for console capability commands)
bl auth login --console
# Browse apps / free-tier quota
bl app list
bl usage free --model qwen3-max
More examples and scenarios: Aliyun Model Studio CLI Site
Authentication
DashScope API Key
Required for most commands. Get your key from the DashScope Console.
# Option 1: Environment variable
export DASHSCOPE_API_KEY=sk-xxxxx
# Option 2: Login command (persisted to ~/.bailian/config.json)
bl auth login --api-key sk-xxxxx
# Option 3: Per-command flag
bl text chat --api-key sk-xxxxx --message "Hello"
Console Login (OAuth)
Required for console capability commands (app list, usage free). Opens the Bailian console in your browser to sign in.
bl auth login --console
Alibaba Cloud AK/SK (Knowledge Base only)
Required for knowledge retrieve. Get your AccessKey from RAM Console.
Recommended: create a RAM sub-account with minimum privileges instead of using the root account's AK/SK.
export ALIBABA_CLOUD_ACCESS_KEY_ID=LTAI5t...
export ALIBABA_CLOUD_ACCESS_KEY_SECRET=...
export BAILIAN_WORKSPACE_ID=ws-...
Configuration
# View current config
bl config show
# Set defaults
bl config set --key region --value us
bl config set --key default_text_model --value qwen-turbo
bl config set --key timeout --value 600
# Self-update to latest version
bl update
Config file location: ~/.bailian/config.json
Links
| Resource | URL |
|---|---|
| Aliyun Model Studio CLI Site | https://bailian.console.aliyun.com/cli |
| DashScope API Docs | https://help.aliyun.com/zh/model-studio/ |
| Qwen Model List | https://help.aliyun.com/zh/model-studio/getting-started/models |
| Aliyun Model Studio Console | https://bailian.console.aliyun.com/ |
| Get API Key | https://bailian.console.aliyun.com/cn-beijing/?tab=app#/api-key |
| Get AccessKey | https://ram.console.aliyun.com/manage/ak |
bl CLI hub: 应用调用(bl app)、应用记忆、知识库检索、模型目录/模型列表、用量/额度/配额、免费额度、 工作空间、MCP 市场、pipeline、文件上传、console API、登录鉴权与配置、 Agent…; bailian-gen: 阿里云百炼图片/视频/语音生成与理解入口:用户要生图、画图、生成照片、生成图片、AI 绘画、海报、头像、插画、 文生图(text-to-image)、图生图、改图、修图、多图合成、生成视频、文生视频、图生视频、参考生视频、视频编辑、风格转换、…; bailian-protocol: 阿里云百炼 bl 家族共享执行协议(consent 确认、版本预检、鉴权/安装、错误上报、本地文件与输出约定)。 不是面向用户意图的业务入口;当任一 bailian-* 业务 skill(bailian-cli / bailian-gen / bailian-finetune /…; bailian-finetune: 阿里云百炼模型精调…
