Alibaba Cloud Model Studio CLI is a command-line tool built by Alibaba Cloud Model Studio specifically for AI Agents. With a single installation command and authentication setup, you can integrate the AI capabilities of Model Studio into various AI tools.
Installation and setup
Installation
Authentication and configuration
Before using Model Studio CLI, you must complete authentication. The following authentication methods are supported:
Authentication method | Command | Use case |
|---|---|---|
Console login (recommended) |
| Model invocation + application management (opens browser for OAuth login) |
API Key |
| Model invocation (text, image, video, speech, etc.) |
Environment variable | Configure API Key environment variable | CI/CD, headless environments |
Config file |
| Persistent (does not validate Key) |
One-time pass-through |
| Single invocation, not persisted |
Console login and API Key can be configured simultaneously without overriding each other.After authentication is complete, you can use
bl config to configure parameters such as the model and output directory:
Common global parameters
Common global parameters
Parameter | Description |
|---|---|
| Specify API Key (effective for this invocation only) |
| Switch region (default: cn) |
| Custom API endpoint |
| Output format |
| Request timeout |
| Quiet mode, reduce output |
| Print HTTP request/response details |
| Disable ANSI colors |
| Preview request without executing |
| Non-interactive mode, suitable for Agents and CI/CD |
| Number of concurrent requests (default: 1) |
Real-world scenarios
E-commerce product image generation
Tell the Agent:
- Generate 6 product listing images:
- To adjust a specific image:
- To generate a product showcase video:
News podcast generation
Tell the Agent:
- Search the web for news material:
- Use an LLM to write a dialogue script:
- Generate audio for each role:
- Use ffmpeg to merge the audio segments into a complete podcast.
Storybook generation
Tell the Agent:
Command reference
Text chat
bl text chat
Send text chat requests, compatible with the OpenAI API format.
Parameter | Description | Default |
|---|---|---|
| Model ID | qwen3.7-max |
| Message content (repeatable, prefix with | — |
| Read messages from a JSON file ( | — |
| System prompt | — |
| Maximum number of tokens to generate | 4096 |
| Sampling temperature (0.0, 2.0] | — |
| Top-p sampling threshold | — |
| Streaming output (enabled by default on TTY) | — |
| Tool definition, JSON or file path (repeatable) | — |
| Enable thinking mode (for qwen3/qwq models) | — |
| Maximum tokens for thinking mode | 4096 |
Omni-modal understanding
bl omni
Omni-modal conversation supporting image, audio, and video inputs with text and speech outputs.
Parameter | Description | Default |
|---|---|---|
| Message content (repeatable) | — |
| Model ID | qwen3.5-omni-plus |
| System prompt | — |
| Image URL or local file (repeatable) | — |
| Audio URL or local file (repeatable) | — |
| Video URL or local file | — |
| Output voice (options: Chelsie, Cherry, Ethan, Serena, Tina) | Cherry |
| Audio output format | wav |
| Save audio to file | Auto-generated |
| Output text only, without generating audio | — |
| Maximum number of tokens to generate | — |
| Sampling temperature (0.0, 2.0] | — |
Image generation and editing
bl image generate
Generate images from text.
Parameter | Description | Default |
|---|---|---|
| Image description | — |
| Model ID | qwen-image-2.0 |
| Image size, supports ratio (3:4, 16:9) or pixels (2048*2048) | — |
| Number of images to generate per request (max 6) | 1 |
| Random seed for reproducible results | — |
| Negative prompt to exclude unwanted content | — |
| Enable prompt extension | true (synchronous mode) |
| Add watermark | true |
| Async mode, return task ID immediately | — |
| Image save directory | — |
| Filename prefix | image |
| Polling interval | 3 |
Parameter | Description | Default |
|---|---|---|
| Source image URL or local file (repeatable, for multi-image compositing) | — |
| Editing instruction | — |
| Model ID | qwen-image-2.0 |
| Output size | — |
| Number of outputs (max 6) | 1 |
| Random seed | — |
| Negative prompt | — |
| Enable prompt extension | true |
| Add watermark | true |
| Save directory | — |
| Filename prefix | edited |
Video generation and editing
bl video generate
Generate videos from text or images.
Parameter | Description | Default |
|---|---|---|
| Video description | — |
| Model ID | happyhorse-1.0-t2v (i2v when --image is specified) |
| Input image, enables image-to-video mode | — |
| Negative prompt | — |
| Resolution (e.g. 1280*720) | — |
| Aspect ratio (e.g. 16:9, 1:1) | — |
| Video duration (seconds) | 5 |
| Enable prompt extension | — |
| Add watermark | true |
| Random seed | — |
| Save to file upon completion | — |
| Return task ID immediately | — |
| Same as --no-wait, for Agent/CI mode | — |
| Polling interval | 5 |
Parameter | Description | Default |
|---|---|---|
| Input video URL or local file (2-10 seconds) | — |
| Editing instruction | — |
| Model ID | happyhorse-1.0-video-edit |
| Reference images (up to 4, comma-separated) | — |
| Negative prompt | — |
| Resolution: 720P or 1080P | 1080P |
| Aspect ratio (16:9, 9:16, 1:1, 4:3, 3:4) | — |
| Output duration (2-10 seconds) | — |
| Audio processing: auto or origin (keep original audio) | auto |
| Enable prompt extension | — |
| Add watermark | true |
| Random seed | — |
| Save to file | — |
| Return task ID immediately | — |
| Polling interval | 15 |
Parameter | Description | Default |
|---|---|---|
| Video description, use markers to reference assets (image 1, video 1, etc.) | — |
| Model ID | happyhorse-1.0-r2v |
| Reference images (repeatable, for multiple subjects) | — |
| Reference videos (repeatable) | — |
| Voice-over for images (matched by position) | — |
| Voice-over for videos (matched by position) | — |
| Resolution: 720P or 1080P | 720P |
| Aspect ratio (16:9, 9:16, 1:1) | — |
| Video duration (2-10 seconds) | 5 |
| Enable prompt extension | — |
| Add watermark | true |
| Random seed | — |
| Save to file | — |
| Return task ID immediately | — |
| Polling interval | 15 |
Parameter | Description |
|---|---|
| Async task ID |
Parameter | Description |
|---|---|
| Task ID |
| Output file path |
Visual understanding
bl vision describe
Describe image or video content using vision models.
Parameter | Description | Default |
|---|---|---|
| Image path or URL | — |
| Video file path or URL | — |
| Question about the content | Auto-detect |
| Vision model | qwen3-vl-plus |
Speech synthesis and recognition
bl speech synthesize
Text-to-speech (TTS).
Parameter | Description | Default |
|---|---|---|
| Text to synthesize | — |
| Read text from file | — |
| Model ID | cosyvoice-v3-flash |
| Voice ID (use --list-voices to view available voices) | — |
| List available voices | — |
| Audio format: mp3, pcm, wav, opus | mp3 |
| Sample rate (Hz) | — |
| Volume (0-100) | 50 |
| Speech rate (0.5-2.0) | 1.0 |
| Pitch (0.5-2.0) | 1.0 |
| Random seed(0-65535) | — |
| Language hint (zh, en, ja, ko, etc.) | — |
| Natural language style instruction (e.g., "please speak in a gentle tone") | — |
| Enable SSML markup parsing | — |
| Save audio to file | Auto-generated |
| Stream raw PCM audio output | — |
Parameter | Description | Default |
|---|---|---|
| Audio file URL or local path (repeatable, up to 100) | — |
| Model ID | fun-asr |
| Language hint (zh, en, ja, etc.) | — |
| Enable speaker diarization | — |
| Expected number of speakers (requires --diarization) | — |
| Hot word list ID to improve recognition accuracy | — |
| Audio channel ID | 0 |
| Save full recognition results to JSON file | — |
| Return task ID immediately | — |
| Polling interval | 2 |
Web search
bl search web
Web search。
Parameter | Description | Default |
|---|---|---|
| Search keywords | — |
| Number of search results | 10 |
| List available MCP search tools | — |
Applications and data
bl app call
Call a Model Studio application (agent or workflow).
Parameter | Description | Default |
|---|---|---|
| Application ID (required) | — |
| Input prompt | — |
| Image URL (repeatable) | — |
| Pre-uploaded file ID (repeatable) | — |
| Session ID for multi-turn conversations | — |
| Streaming output (enabled by default on TTY) | — |
| Knowledge base pipeline ID (comma-separated) | — |
| Memory ID to enable long-term memory | — |
| Business parameters JSON (workflow variables) | — |
| Display Agent thinking process | — |
Parameter | Description | Default |
|---|---|---|
| Search by name | — |
| Page number | 1 |
| Items per page | 30 |
| API region | cn-beijing |
Parameter | Description |
|---|---|
| User ID (required) |
| Messages JSON array |
| Custom memory content |
| User profile schema ID |
| Memory library ID (isolated memory space) |
Parameter | Description | Default |
|---|---|---|
| User ID (required) | — |
| Search keywords | — |
| Messages JSON array for contextual search | — |
| Number of results to return | 10 |
| Memory library ID | — |
Parameter | Description | Default |
|---|---|---|
| User ID (required) | — |
| Items per page | 10 |
| Page number | 1 |
| Memory library ID | — |
Parameter | Description | Default |
|---|---|---|
| Knowledge base index ID (required) | — |
| Search keywords (required) | — |
| Model Studio workspace ID | — |
| Number of results to return | 10 |
| Enable reranking | — |
| Number of results to retain after reranking | — |
| Alibaba Cloud AccessKey ID | — |
| Alibaba Cloud AccessKey Secret | — |
Development utilities
bl file upload
Upload local files to DashScope temporary storage (valid for 48 hours).
Parameter | Description |
|---|---|
| Local file path |
| Target model name (file is bound to this model) |
Parameter | Description | Default |
|---|---|---|
| Model name | — |
| API region | cn-beijing |
Parameter | Description | Default |
|---|---|---|
| Filter by name | — |
| Service type: OFFICIAL or PRIVATE | OFFICIAL |
| Page number | 1 |
| Items per page | 30 |
| API region | cn-beijing |
Parameter | Description | Default |
|---|---|---|
| Runtime input (JSON) | — |
| Read input from file | — |
| Maximum number of parallel steps | 1 |
| Event output format: jsonl | — |
| Step timeout | — |
Parameter | Description |
|---|---|
| Describe your requirements |
| Show only intent analysis and candidate list without ranking |