**The official command-line interface for Aliyun Model Studio (DashScope) AI Platform**
[](https://www.npmjs.com/package/bailian-cli)
[](https://nodejs.org)
[](https://www.typescriptlang.org)
[](LICENSE)
[Aliyun Model Studio CLI Site](https://bailian.console.aliyun.com/cli?source_channel=cli_github&) · [中文文档](https://github.com/modelstudioai/cli/blob/main/README.zh.md) · [API Documentation](https://help.aliyun.com/zh/model-studio/) · [Get API Key](https://bailian.console.aliyun.com/cn-beijing/?source_channel=key_github&tab=app#/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._
👆 Click the cover to play the full 2-minute demo
A complete **2-minute, 16:9 cinematic short film** — produced end-to-end from a single natural-language sentence, with **zero manual editing**. This showcase demonstrates how an AI Agent can compose a multi-step creative pipeline by orchestrating three primitives: - **[Qwen Code](https://github.com/QwenLM/qwen-code)** — the agentic coding model that interprets the user's intent and drives the workflow - **[Aliyun Model Studio CLI](https://bailian.console.aliyun.com/cli?source_channel=cli_github&)** — invokes **HappyHorse 1.1**, Aliyun Model Studio's text-/image-/reference-to-video generation model - **[spark-video Skill](https://github.com/JohnKeating1997/spark-video)** — handles scene decomposition, storyboarding, shot continuity, and final stitching ### The single prompt > _"Generate a roughly 2-minute video in Japanese cinematic style — a sweet, innocent first-love story about a high-school girl. The plot should be heart-fluttering enough to make viewers want to fall in love. Aspect ratio: 16:9."_ > > _(Original: "帮我生成一段日系影视风格,高中女生的青涩初恋故事,剧情高甜,让人看了想谈恋爱,2分钟左右的视频,尺寸是16:9")_ ### How it works 1. **Qwen Code** parses the request, plans the narrative beats, and decides which tools to call. 2. The **spark-video Skill** breaks the story into shots, writes per-shot prompts, and enforces visual continuity (characters, lighting, palette, lens language). 3. **`bl video generate`** dispatches each shot to **HappyHorse 1.1** in parallel. 4. The skill stitches all clips back together into a single 16:9 / ~2-min deliverable. No timeline scrubbing. No frame-by-frame editing. Just one sentence → one video. ## Installation ```bash npm install -g bailian-cli # Recommended: full bailian-* skill family (includes companion bailian-protocol) npx skills add modelstudioai/cli --all -g ``` Subset install — always include companion `bailian-protocol` with any business skill: ```bash npx skills add modelstudioai/cli -g -s bailian-protocol -s bailian-gen npx skills add modelstudioai/cli -g -s bailian-protocol -s bailian-cli ``` > Requires Node.js >= 18.17. ## Quick Start ```bash # Authenticate, recommended bl auth login --console # Or authenticate with an API key bl auth login --api-key sk-xxxxx # Or use Token Plan (Base URL built in; the key is tested during login) bl auth login --config token-plan --api-key sk-sp-xxxxx # Configure a coding agent to use DashScope bl config agent --agent codex --base-url https://dashscope.aliyuncs.com/compatible-mode/v1 --api-key sk-xxxxx --model qwen3-coder-plus # 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 # Model recommendation — find the best model for your use case bl advisor recommend --message "I need a visual-understanding chatbot" # Compare specific models bl advisor recommend --message "qwen-max vs deepseek-v3 for code generation" # Browser login (required for console capability commands) bl auth login --console # Fine-tune & deploy — a one-shot train-to-serve workflow bl dataset upload --file ./train.jsonl # Upload a .jsonl dataset (validated first) bl finetune text create --model qwen3-8b --datasets ./train.jsonl --training-type sft-lora # Local paths auto-upload bl finetune watch --job-id ft-xxx --output json # Non-blocking probe (running/succeeded return 0; failed/canceled report an error) bl finetune capability --model qwen3-8b # Which training types a model supports bl deploy text create --model qwen3-8b --name my-svc --plan mu # Deploy the trained model as an endpoint # Browse models / apps / free-tier quota / usage statistics / workspaces bl model list # Browse model families and pricing bl app list bl usage summary # Unified view: free-tier quota + recent usage overview bl usage free # Free-tier quota across models (add --model/--expiring/--sort) bl usage stats --workspace-id