### Clone and Install Dependencies Source: https://github.com/modelstudioai/cli/blob/main/CONTRIBUTING.md Clone the repository and install project dependencies using pnpm. ```bash git clone https://github.com/modelstudioai/cli.git bailian-cli cd bailian-cli pnpm install ``` -------------------------------- ### Install Bailian CLI and Skill Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/assets/versioning.md If the `bl --version` command fails, indicating the CLI is missing, use these commands to install the Bailian CLI globally and add the associated skill. ```bash npm install -g bailian-cli npx skills add modelstudioai/cli --all -g ``` -------------------------------- ### Bailian CLI Video Generation Example Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/SKILL.md Create videos from a text prompt. The --download flag allows you to save the generated video to a specified file. ```bash bl video generate --prompt "Sunset on the beach" --download sunset.mp4 ``` -------------------------------- ### Model Recommendation Source: https://github.com/modelstudioai/cli/blob/main/README.md Get recommendations for AI models based on your use case or compare specific models. ```bash # Model recommendation — find the best model for your use case bl advisor recommend --message "I need a visual-understanding chatbot" ``` ```bash # Compare specific models bl advisor recommend --message "qwen-max vs deepseek-v3 for code generation" ``` -------------------------------- ### Generate video with multiple subjects and voices Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/video.md This example demonstrates generating a video with multiple subjects, each defined by a reference image and an associated voice audio file. The prompt can describe interactions between these subjects. ```bash bl video ref --prompt "Image 1 and Image 2 have a conversation" --image a.jpg --image b.jpg --image-voice va.mp3 --image-voice vb.mp3 ``` -------------------------------- ### Summarize video content with a prompt Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/vision.md Use this command to get a summary of a video's content by providing its URL and a descriptive prompt. ```bash bl vision describe --video https://example.com/video.mp4 --prompt "Summarize the video content" ``` -------------------------------- ### Get Model Recommendations Source: https://github.com/modelstudioai/cli/blob/main/packages/cli/README.md Use the advisor to get model recommendations based on a described use case or to compare specific models. ```bash # 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" ``` -------------------------------- ### Describe an image using a local file Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/vision.md Use this command to get a description of a local image file. Ensure the image path is correct. ```bash bl vision describe --image photo.jpg ``` -------------------------------- ### Bailian CLI App Call Example Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/SKILL.md Call an application with a specific app-id and prompt. Replace '' with the actual application ID. ```bash bl app call --app-id --prompt "Hello" ``` -------------------------------- ### Get CLI Version Source: https://github.com/modelstudioai/cli/blob/main/CONTRIBUTING.md Command to check the installed version of the bailian-cli. ```bash bl --version ``` -------------------------------- ### Get Node Version Source: https://github.com/modelstudioai/cli/blob/main/CONTRIBUTING.md Command to check the installed Node.js version. ```bash node --version ``` -------------------------------- ### Get OS Information (macOS) Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/assets/issue-reporting.md A specific command to get OS version details on macOS. ```bash sw_vers ``` -------------------------------- ### Bailian CLI Console Login Example Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/SKILL.md Log in to the Bailian console. Always specify a --console-site, such as 'international' or 'domestic'. ```bash bl auth login --console --console-site international ``` -------------------------------- ### Example Commit Messages Source: https://github.com/modelstudioai/cli/blob/main/CONTRIBUTING.md Illustrative commit messages following the imperative and scoped format. ```bash feat(image): add --negative-prompt fix(auth): handle expired console token ``` -------------------------------- ### Recognize Speech from Multiple Audio URLs Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/speech.md This example demonstrates how to recognize speech from multiple audio files by providing multiple `--url` flags. The command can process several audio sources in a single invocation. ```bash bl speech recognize --url https://example.com/a.mp3 --url https://example.com/b.mp3 ``` -------------------------------- ### Get OS Information (Linux/macOS) Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/assets/issue-reporting.md Obtain system information on Linux or macOS for issue reporting. ```bash uname -a ``` -------------------------------- ### Call a Bailian Console API with Query Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/console.md Use this command to call a specific Bailian console API, providing the API name and request data in JSON format. This example queries the free tier quota for a model. ```bash bl console call --api zeldaEasy.broadscope-bailian.freeTrial.queryFreeTierQuota --data '{"queryFreeTierQuotaRequest":{"models":["qwen3-max"]}}' ``` -------------------------------- ### Stream Raw PCM Audio to FFplay Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/speech.md Stream raw PCM audio to stdout and pipe it to `ffplay` for playback. This example specifies parameters for `ffplay` to correctly interpret the audio stream. ```bash bl speech synthesize --text "Hello" --voice --stream | ffplay -nodisp -autoexit -f s16le -ar 24000 -ac 1 - ``` -------------------------------- ### Set CLI Configuration Defaults Source: https://github.com/modelstudioai/cli/blob/main/packages/cli/README.md Configure default settings for the CLI using 'bl config set'. Examples include setting the base URL, default text model, and timeout. ```bash # Set defaults bl config set --key base_url --value https://dashscope-us.aliyuncs.com bl config set --key default_text_model --value qwen-turbo bl config set --key timeout --value 600 ``` -------------------------------- ### Generate image with watermark disabled (alternative prompt) Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/image.md Another example demonstrating how to disable watermarks for image generation. This ensures the output image does not contain any watermarks. ```bash bl image generate --prompt "An alien in the space" --watermark false ``` -------------------------------- ### Bailian CLI Omni Command Example Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/SKILL.md The omni command can process various media types, including video. Use --message to describe the content and --video to specify the input file. --text-only ensures the output is text. ```bash bl omni --message "Describe the video content" --video ./demo.mp4 --text-only ``` -------------------------------- ### Get Memory Profile by Schema and User ID Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/memory.md Retrieve a user profile using its schema ID and user ID. Both IDs are required for the query. ```bash bl memory profile get --schema-id schema_xxx --user-id user1 ``` -------------------------------- ### Bailian CLI Text Chat Example Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/SKILL.md Use this command to engage in text-based conversations or generate text content. Specify your message using the --message flag. ```bash bl text chat --message "Write a poem about spring in Chinese" ``` -------------------------------- ### Chat Completion with Model and System Prompt Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/text.md Specify a particular model and provide a system prompt to guide the AI's behavior. Useful for setting context or persona for the chat. ```bash bl text chat --model qwen-max --system "You are a coding assistant." --message "Write fizzbuzz in Python" ``` -------------------------------- ### List MCP Servers with JSON Output Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/mcp.md Use `bl mcp list` with the `--output json` flag to get the list of MCP servers in JSON format. This is useful for programmatic processing. ```bash bl mcp list --output json ``` -------------------------------- ### Create GitHub Issue using gh CLI Template Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/assets/issue-reporting.md This command creates a new GitHub issue using a specified template, such as 'bug_report.yml', when the GitHub CLI is installed and authenticated. It's a quick way to start a new issue if you don't have a pre-filled body file. ```bash gh issue create --repo modelstudioai/cli --template bug_report.yml ``` -------------------------------- ### Manage Applications and Usage Source: https://github.com/modelstudioai/cli/blob/main/packages/cli/README.md List available applications, check free-tier quotas, and view usage statistics for workspaces. ```bash # Browser login (required for console capability commands) bl auth login --console # Browse apps / free-tier quota / usage statistics / workspaces bl app list bl usage free --model qwen3-max bl usage free --expiring 30 # Quotas expiring within 30 days bl usage free --sort remaining # Sort by remaining % ascending bl usage stats --workspace-id # Usage overview for a workspace bl usage stats --model qwen-turbo --workspace-id # Per-model usage bl workspace list # List all workspaces ``` -------------------------------- ### Run CLI from Source Source: https://github.com/modelstudioai/cli/blob/main/CONTRIBUTING.md Build the core package in watch mode and run CLI commands from the source code. ```bash # Terminal 1 — watch-build core pnpm dev # Terminal 2 — run any bl command pnpm bl auth login --api-key sk-xxxxx pnpm bl text chat --message "hello" pnpm bl video generate --prompt "a cat walking" ``` -------------------------------- ### Recommend Models with a Message Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/advisor.md Use the `--message` flag to describe your requirements for model recommendation. This is an alternative to providing the prompt positionally. ```bash bl advisor recommend --message "I need a visual-understanding chatbot" ``` ```bash bl advisor recommend --message "Build an Agent that auto-generates animations" ``` ```bash bl advisor recommend --message "Legal contract review, high precision required" ``` ```bash bl advisor recommend --message "Low-cost high-concurrency online customer service" --output json ``` ```bash bl advisor recommend --message "Long document summarization" --dry-run ``` -------------------------------- ### Display Configuration in JSON Format Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/config.md Display the current configuration settings in JSON format. Use the `--output json` flag for structured output. ```bash bl config show --output json ``` -------------------------------- ### Create a Token Plan API Key Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/token-plan.md Use this command to generate an API key for a specific account and workspace. You can optionally provide a description for the key. ```bash bl token-plan create-key --account-id acc_123 --workspace-id ws_456 ``` ```bash bl token-plan create-key --account-id acc_123 --workspace-id ws_456 --description 'Dev key' ``` -------------------------------- ### 配置API Key到配置文件 Source: https://github.com/modelstudioai/cli/blob/main/INSTALL.md 使用此命令将API Key写入配置文件,实现持久化存储。与`bl auth login --api-key`不同,此命令不校验Key的可用性。 ```bash bl config set --key api_key --value ``` -------------------------------- ### bl memory profile get Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/memory.md Retrieves a user profile by schema ID and user ID. ```APIDOC ## bl memory profile get ### Description Gets user profile by schema ID and user ID. ### Usage `bl memory profile get --schema-id --user-id ` ### Options #### Path Parameters - `--schema-id ` (string) - Required - Profile schema ID. - `--user-id ` (string) - Required - User ID. ### Request Example ```bash bl memory profile get --schema-id schema_xxx --user-id user1 ``` ``` -------------------------------- ### View CLI Configuration Source: https://github.com/modelstudioai/cli/blob/main/packages/cli/README.md Use the 'bl config show' command to display the current configuration settings of the CLI. ```bash # View current config bl config show ``` -------------------------------- ### Upload a WAV file for Qwen3-ASR-Flash model Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/file.md Use this command to upload a local WAV audio file to DashScope temporary storage, associating it with the qwen3-asr-flash model. ```bash bl file upload --file audio.wav --model qwen3-asr-flash ``` -------------------------------- ### Generate Video from Image Prompt Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/video.md Create a video by providing an input image URL and a text prompt describing the desired action or modification for the image content. This enables image-to-video transformations. ```bash bl video generate --image https://example.com/cat.png --prompt "Make the cat in the scene move" ``` -------------------------------- ### Query Usage Statistics for a Specific Model Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/usage.md Query usage statistics for a particular model. Omit the --model flag to get an overview. ```bash bl usage stats --model qwen-turbo ``` -------------------------------- ### 临时传入API Key执行命令 Source: https://github.com/modelstudioai/cli/blob/main/INSTALL.md 在单次命令执行时临时传入API Key,该Key仅当次生效,不会写入配置文件。适用于需要API Key但不想持久化存储的场景。 ```bash bl text chat --api-key sk-xxx --message "你好" ``` -------------------------------- ### Basic Chat Completion Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/text.md Send a simple text message to the chat model to get a completion. This is the most basic way to interact with the chat functionality. ```bash bl text chat --message "What is Qwen?" ``` -------------------------------- ### Log in with API Key Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/auth.md Use this command to authenticate with the DashScope API using your API key. The `--api-key` flag is required. ```bash bl auth login --api-key sk-xxxxx ``` -------------------------------- ### Using Local Files with Bailian CLI Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/SKILL.md Demonstrates how to use local file paths for various media types with Bailian CLI commands. The CLI automatically uploads local files to temporary storage. ```bash bl image edit --image ./photo.png --prompt "Add sunset" bl video edit --video ./clip.mp4 --prompt "Anime style" bl omni --message "What do you see?" --image ./photo.jpg --audio ./voice.wav bl speech recognize --url ./meeting.wav bl vision describe --image ./screenshot.png ``` -------------------------------- ### Check current quota usage Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/quota.md Check your current API usage against rate limits. This command can be run without any arguments to get a general overview. ```bash bl quota check ``` -------------------------------- ### Generate Video from Text Prompt Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/video.md Use this command to generate a video based on a text description. The prompt is the core input for the video content. ```bash bl video generate --prompt "A person reading a book, static shot" ``` -------------------------------- ### Add/Refresh Bailian CLI Skill Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/assets/versioning.md If the skill version mismatches the installed CLI version, refresh the skill using this command. This ensures the skill is up-to-date with the CLI. ```bash npx skills add modelstudioai/cli --all -g -y ``` -------------------------------- ### Interactive Model Recommendation Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/advisor.md Run `bl advisor recommend` without any arguments to engage in interactive input for model selection. ```bash bl advisor recommend ``` -------------------------------- ### Configure Alibaba Cloud AK/SK for Knowledge Base Source: https://github.com/modelstudioai/cli/blob/main/packages/cli/README.md Set environment variables for Alibaba Cloud AccessKey ID, Secret, and Workspace ID. This is required for the 'knowledge retrieve' command. ```bash export ALIBABA_CLOUD_ACCESS_KEY_ID=LTAI5t... export ALIBABA_CLOUD_ACCESS_KEY_SECRET=... export BAILIAN_WORKSPACE_ID=ws-... ``` -------------------------------- ### Check Latest Published Bailian CLI Version Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/assets/versioning.md Query the npm registry to find the latest published version of the Bailian CLI. This is used to compare against the installed version. ```bash npm view bailian-cli version ``` -------------------------------- ### Upload a JPG file for Qwen-VL-Plus model Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/file.md Use this command to upload a local JPG image file to DashScope temporary storage, associating it with the qwen3-vl-plus model. ```bash bl file upload --file photo.jpg --model qwen3-vl-plus ``` -------------------------------- ### List Apps by Name and Output as JSON Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/SKILL.md Lists available applications matching a keyword and outputs the result in JSON format. Use the 'code' field for the app ID in subsequent calls. ```bash bl app list --name --output json ``` -------------------------------- ### Generate Video with Download Option Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/video.md Generate a video from a text prompt and specify a file path to save the output directly. This is useful for immediate saving of generated videos. ```bash bl video generate --prompt "Ocean waves at sunset." --download sunset.mp4 ``` -------------------------------- ### 通过API Key进行鉴权 Source: https://github.com/modelstudioai/cli/blob/main/INSTALL.md 在无法拉起浏览器的环境(如SSH、CI)下,使用此命令,并将用户提供的API Key作为参数传入,完成登录授权。 ```bash bl auth login --api-key <用户提供的_Key> ``` -------------------------------- ### List All Workspaces Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/workspace.md Lists all available workspaces. This is the default command for the `bl workspace` group. ```bash bl workspace list ``` -------------------------------- ### Video Editing with Reference Image Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/video.md Perform video editing using a reference image to guide the style or content replacement. This is useful for applying specific visual styles or object transformations. ```bash bl video edit --video https://example.com/input.mp4 --prompt "Replace the outfit with the style shown in the image" --ref-image https://example.com/clothes.png ``` -------------------------------- ### List Bailian Applications with Pagination Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/app.md Control the number of results per page and navigate through application lists using pagination. Specify page number and size with `--page` and `--page-size`. ```bash bl app list --page 2 --page-size 10 ``` -------------------------------- ### Generate multiple images concurrently Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/image.md Generate multiple images in parallel by specifying the number of concurrent requests with `--concurrent`. This example generates 2 images, with 3 concurrent requests, resulting in 6 images total. ```bash bl image generate --prompt "Product shots" --n 2 --concurrent 3 # 6 images in parallel ``` -------------------------------- ### Call a Bailian Application with Basic Prompt Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/app.md Use this command to invoke a Bailian application with a simple text prompt. Ensure you provide a valid `--app-id`. ```bash bl app call --app-id abc123 --prompt "Hello" ``` -------------------------------- ### Generate Video from Image Source: https://github.com/modelstudioai/cli/blob/main/packages/cli/README.md Create a video from a local image by providing a prompt for animation and specifying the output file name. ```bash bl video generate --image ./cat.png --prompt "Make the cat move" --download cat.mp4 ``` -------------------------------- ### Create GitHub Issue with Body File using gh CLI Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/assets/issue-reporting.md Use this command when the GitHub CLI is installed and authenticated to create an issue with a pre-written body from a file. Ensure the issue title clearly describes the bug and its symptoms. ```bash gh issue create \ --repo modelstudioai/cli \ --title "[bug] " \ --body-file /path/to/redacted-issue.md ``` -------------------------------- ### 校验CLI安装与版本 Source: https://github.com/modelstudioai/cli/blob/main/INSTALL.md 安装CLI后,通过`bl --version`检查版本号,`which bl`(或`where bl` for Windows)检查命令是否在PATH中。若命令未找到,需检查npm全局bin目录是否已添加到PATH。 ```bash bl --version ``` ```bash which bl # Windows 可用 where bl ``` -------------------------------- ### Call an App with Specific Parameters Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/SKILL.md Calls a specified application using its ID and a user prompt. Business parameters can be passed using the --biz-params flag. ```bash bl app call --app-id --prompt "..." ``` -------------------------------- ### Generate video with reference image and video Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/video.md This command generates a video incorporating both a reference image for a subject and a reference video for a scene or action. The prompt can describe interactions between elements from both references. ```bash bl video ref --prompt "Video 1 plays guitar, Image 1 walks over" --ref-video scene.mp4 --image person.jpg ``` -------------------------------- ### List all model rate limits Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/quota.md View rate limits for all models, including non-self-service ones. Use the --all flag to see all available models. ```bash bl quota list --all ``` -------------------------------- ### Describe a local video file Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/vision.md This command allows you to describe the content of a local video file by providing its path. Supported formats include mp4, mov, avi, mkv, and webm. ```bash bl vision describe --video ./local-video.mp4 ``` -------------------------------- ### Upload a PNG file for Qwen-Image-2.0 model Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/file.md Use this command to upload a local PNG image file to DashScope temporary storage, associating it with the qwen-image-2.0 model. ```bash bl file upload --file cat.png --model qwen-image-2.0 ``` -------------------------------- ### Chat with Video Input using `bl omni` Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/omni.md Process video content by providing a URL or local path. The model can analyze the video for summarization or description. ```bash bl omni --message "Summarize this video" --video https://example.com/video.mp4 ``` -------------------------------- ### List Tools for a Specific MCP Server Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/mcp.md Use `bl mcp tools` with a server code to list all the tools exposed by that particular MCP server. ```bash bl mcp tools market-cmapi00073529 ``` -------------------------------- ### 安装Skills Source: https://github.com/modelstudioai/cli/blob/main/INSTALL.md 使用`npx`命令安装`modelstudioai/cli`的Skills。此命令会将指定的Skills添加到全局环境中,以便CLI使用。 ```bash npx skills add modelstudioai/cli --all -g ``` -------------------------------- ### Query Free-Tier Quota for All Models Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/usage.md Use this command to query the free-tier quota for all available models. This is the default behavior when no specific model is provided. ```bash bl usage free ``` -------------------------------- ### Generate video with a reference image Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/video.md Use this command to generate a video with a single subject defined by a reference image. The prompt specifies the action for the subject. ```bash bl video ref --prompt "Image1 running on the grass" --image person.jpg ``` -------------------------------- ### Upload a MP4 file for Wan2.1-T2V-Plus model Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/file.md Use this command to upload a local MP4 video file to DashScope temporary storage, associating it with the wan2.1-t2v-plus model. ```bash bl file upload --file video.mp4 --model wan2.1-t2v-plus ``` -------------------------------- ### Chat with Audio Input using `bl omni` Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/omni.md Include an audio file in your prompt to allow the model to process spoken content. Supports various audio formats via URL or local path. ```bash bl omni --message "What is this audio saying?" --audio https://example.com/audio.wav ``` -------------------------------- ### List All Bailian Applications Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/app.md Retrieve a list of all available Bailian applications. This command shows basic application information. ```bash bl app list ``` -------------------------------- ### Log in via Console Browser Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/auth.md Initiate a browser-based login flow for authentication. Use the `--console` flag to trigger this method. ```bash bl auth login --console ``` -------------------------------- ### Call a Bailian Application with Knowledge Base Pipelines Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/app.md Execute a Bailian application with specific knowledge base pipelines. Provide a comma-separated list of pipeline IDs to the `--pipeline-ids` flag. ```bash bl app call --app-id abc123 --prompt "Search for materials" --pipeline-ids pipe1,pipe2 ``` -------------------------------- ### Generate image using a pro model Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/image.md Utilize a pro version of a model, such as `qwen-image-2.0-pro`, for image generation by specifying it with the `--model` flag. ```bash bl image generate --prompt "Pro quality" --model qwen-image-2.0-pro ``` -------------------------------- ### Chat with Qwen Model Source: https://github.com/modelstudioai/cli/blob/main/packages/cli/README.md Initiate a text-based chat session with the Qwen model. ```bash bl text chat --message "What is DashScope?" ``` -------------------------------- ### List available MCP tools Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/search.md Use this flag to list all available MCP tools that can be utilized with the search command. The command will exit after listing the tools. ```bash bl search web --list-tools ``` -------------------------------- ### 全局安装阿里云百炼CLI Source: https://github.com/modelstudioai/cli/blob/main/INSTALL.md 使用npm全局安装`bailian-cli`包。确保Node.js版本满足要求,并且npm可用。 ```bash npm install -g bailian-cli ``` -------------------------------- ### List Memory Nodes with Pagination Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/memory.md List memory nodes for a user with custom pagination settings. Specify the desired page size and page number to retrieve specific subsets of memory nodes. ```bash bl memory list --user-id user1 --page-size 20 --page 2 ``` -------------------------------- ### Create Memory Profile Schema Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/memory.md Use this command to create a user profile schema for memory profiling. The schema name and attributes are required. ```bash bl memory profile create --name "user_basic" --attributes '[{"name":"age","description":"age"},{"name":"hobby","description":"hobby"}]' ``` -------------------------------- ### List Tools for an MCP Server with JSON Output Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/mcp.md Use `bl mcp tools` with the `--output json` flag to retrieve the list of tools for an MCP server in JSON format, facilitating automated parsing. ```bash bl mcp tools market-cmapi00073529 --output json ``` -------------------------------- ### Describe an image with a specific prompt Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/vision.md Provide a custom prompt to ask specific questions about the content of a remote image. The image is specified by its URL. ```bash bl vision describe --image https://example.com/photo.jpg --prompt "What breed is this dog?" ``` -------------------------------- ### Display Current Configuration Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/config.md Show the current configuration settings of the Bailian CLI. This command displays all active configuration values. ```bash bl config show ``` -------------------------------- ### List model rate limits in JSON format Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/quota.md Retrieve model rate limits in JSON format for easier processing. Use the --output json flag. ```bash bl quota list --output json ``` -------------------------------- ### Authenticate CLI Source: https://github.com/modelstudioai/cli/blob/main/README.md Log in to the CLI using either the console or an API key. ```bash # Authenticate, recommended bl auth login --console ``` ```bash # Or authenticate with an API key bl auth login --api-key sk-xxxxx ``` -------------------------------- ### Basic Text Chat with `bl omni` Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/omni.md Initiate a chat by providing a text message using the `--message` flag. The model will respond with text. ```bash bl omni --message "Hello, who are you?" ``` -------------------------------- ### 最小功能验证:鉴权状态和文本聊天 Source: https://github.com/modelstudioai/cli/blob/main/INSTALL.md 在鉴权配置完成后,执行此命令组进行最小功能验证。首先检查鉴权状态,然后尝试发送一个简单的文本消息进行测试。`--non-interactive`和`--output json`用于自动化脚本执行和解析输出。 ```bash bl auth status --output json ``` ```bash bl text chat --message "ping" --non-interactive --output json ``` -------------------------------- ### Perform a web search with a specific query Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/search.md Use this command to search the web for a given query. The default number of results is 10. ```bash bl search web --query "Alibaba Cloud Bailian latest features" ``` -------------------------------- ### Generate Video with Custom Resolution and Duration Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/video.md Generate a video with specific resolution and duration settings. This allows for fine-tuning the output video's technical specifications. ```bash bl video generate --prompt "Mountain landscape" --resolution 720P --duration 5 ``` -------------------------------- ### Perform a general web search Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/search.md Conduct a general web search using a simple query string. This will return the default number of results. ```bash bl search web --query "Today's news" ``` -------------------------------- ### Generate Images Source: https://github.com/modelstudioai/cli/blob/main/README.md Create images based on textual prompts. ```bash # Generate an image bl image generate --prompt "A cat in a spacesuit" --out-dir ./images/ ``` -------------------------------- ### List Workspaces in JSON Output Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/workspace.md Lists workspaces and formats the output as JSON. This is useful for programmatic consumption of the workspace data. ```bash bl workspace list --output json ``` -------------------------------- ### List Workspaces with Limit Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/workspace.md Lists workspaces, limiting the number of results returned. Use the `--list` flag to specify the maximum number of workspaces to display. ```bash bl workspace list --list 5 ``` -------------------------------- ### Call a Bailian Application with Image Input Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/app.md Invoke a Bailian application by providing an image URL along with the prompt. This is useful for image analysis or description tasks. ```bash bl app call --app-id abc123 --prompt "Describe this image" --image https://example.com/photo.jpg ``` -------------------------------- ### Basic Video Editing Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/video.md Edit a video by providing the input video URL and a text prompt describing the desired edit. This is the most straightforward way to apply edits. ```bash bl video edit --video https://example.com/input.mp4 --prompt "Convert the entire scene to claymation style" ``` -------------------------------- ### Generate a basic image Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/image.md Use this command to generate a single image based on a text prompt. The default model and settings are applied. ```bash bl image generate --prompt "A cat in a spacesuit on Mars" ``` -------------------------------- ### List All Activated MCP Servers Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/mcp.md Use `bl mcp list` without any arguments to retrieve a list of all MCP servers activated under your Bailian account. ```bash bl mcp list ``` -------------------------------- ### Set Base URL Configuration Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/config.md Set the base URL for API requests. Use `--key base_url` and provide the desired URL, such as the DashScope endpoint. ```bash bl config set --key base_url --value https://dashscope.aliyuncs.com ``` -------------------------------- ### Generate video with image and voice Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/video.md Use this command to generate a video where a reference image is associated with a specific voice audio file. This is useful for creating talking head videos or videos with narrated subjects. ```bash bl video ref --prompt "Image 1 speaks" --image person.jpg --image-voice voice.mp3 --resolution 1080P ``` -------------------------------- ### Set Output Configuration Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/config.md Set the output format for CLI commands. Use the `--key output` and `--value json` flags to configure the output to JSON. ```bash bl config set --key output --value json ``` -------------------------------- ### Call a Bailian Application with Multiple Images Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/app.md Send multiple image URLs to a Bailian application for processing. The `--image` flag can be repeated for each image. ```bash bl app call --app-id abc123 --prompt "Analyze the image" --image img1.jpg --image img2.jpg ``` -------------------------------- ### List Bailian Applications with JSON Output Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/app.md Obtain the list of Bailian applications in JSON format for programmatic use. This is useful for scripting and integration. ```bash bl app list --output json ``` -------------------------------- ### List Available Voices Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/speech.md Use this command to list all built-in system voices for a specified model. The output will include a console link to view these voices. ```bash bl speech synthesize --list-voices --model cosyvoice-v3-flash ``` -------------------------------- ### Generate image with seed and prompt extension control Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/image.md Reproduce a specific image generation using a `--seed` value and control prompt extension behavior with `--prompt-extend`. Setting `--prompt-extend` to `false` disables this feature. ```bash bl image generate --prompt "A castle" --seed 42 --prompt-extend false ``` -------------------------------- ### Query Free-Tier Quota for a Specific Model Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/usage.md Query the free-tier quota for a single, specified model. Replace 'qwen3-max' with the desired model name. ```bash bl usage free --model qwen3-max ``` -------------------------------- ### Multimodal Chat with Bailian CLI Source: https://github.com/modelstudioai/cli/blob/main/packages/cli/README.md Engage in multimodal chat, supporting text, images, audio, and video inputs. ```bash bl omni --message "Describe this image" --image ./photo.jpg ``` -------------------------------- ### Query Model Usage Statistics with JSON Output Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/usage.md Query model usage statistics and specify the output format as JSON. ```bash bl usage stats --output json ``` -------------------------------- ### Query Free-Tier Quota for Multiple Models Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/usage.md Query the free-tier quota for multiple models by providing a comma-separated list. Ensure model names are accurate. ```bash bl usage free --model qwen3-max,qwen-turbo ``` -------------------------------- ### List rate limits for specific models Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/quota.md View rate limits for specific models. Provide model names, comma-separated, using the --model flag. ```bash bl quota list --model qwen3.6-plus ``` ```bash bl quota list --model qwen3.6-plus,qwen-turbo ``` -------------------------------- ### Query Usage Statistics for Multiple Models Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/usage.md Query usage statistics for multiple models by providing a comma-separated list of model names. ```bash bl usage stats --model qwen3.6-plus,deepseek-v4-pro ``` -------------------------------- ### Call an MCP Tool with a Query Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/mcp.md Use `bl mcp call` to execute a specific tool on an MCP server, providing a query string for the tool's arguments. ```bash bl mcp call market-cmapi00073529.SmartStockSelection --query "Screen consumer stocks with ROE > 15%" ``` -------------------------------- ### Call a Bailian Application with Session and Streaming Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/app.md Continue a conversation using a `--session-id` and enable streaming for real-time responses. This is suitable for multi-turn interactions. ```bash bl app call --app-id abc123 --prompt "Continue" --session-id sess_xxx --stream ``` -------------------------------- ### Add Memory with Content Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/memory.md Use this command to add custom text content as memory for a specific user. Ensure the user ID is provided. ```bash bl memory add --user-id user1 --content "The user likes Python programming" ``` -------------------------------- ### Search Open Issues with GitHub CLI Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/assets/issue-reporting.md Use this command to search for existing open issues on the modelstudioai/cli repository. Replace `` with relevant terms. ```bash # If gh is available: gh issue list --repo modelstudioai/cli --search "" --state open --limit 10 ``` -------------------------------- ### List model RPM/TPM rate limits Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/quota.md View the rate limits (RPM and TPM) for available models. This command shows the default limits for self-service models. ```bash bl quota list ``` -------------------------------- ### Video Editing with Resolution and Download Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/video.md Edit a video, specify the output resolution, and save the result to a local file. This is useful for controlling the output quality and format. ```bash bl video edit --video https://example.com/input.mp4 --prompt "Convert to anime style" --resolution 720P --download output.mp4 ``` -------------------------------- ### List Tools for an MCP Server with Custom URL Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/mcp.md Use `bl mcp tools` with the `--url` flag to specify a custom endpoint for the MCP server, useful when interacting with non-Bailian MCP instances. ```bash bl mcp tools my-server --url https://example.com/mcp ``` -------------------------------- ### Manage Bailian CLI Configuration Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/assets/setup.md Commands to view, set, or export configuration settings for the Bailian CLI. This includes default models and output directories. ```bash bl config show bl config set --key default-text-model --value qwen3.7-max bl config set --key output_dir --value ~/bailian-output ``` ```bash bl config export-schema # all commands as JSON tool schemas bl config export-schema --command "image generate" ``` -------------------------------- ### Query Usage Statistics for a Specific Model and Number of Days Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/usage.md Query usage statistics for a specific model within a defined number of past days. ```bash bl usage stats --model qwen-turbo --days 7 ``` -------------------------------- ### 配置DashScope Base URL Source: https://github.com/modelstudioai/cli/blob/main/INSTALL.md 通过命令行或配置文件设置DashScope的Base URL,用于指定API的访问端点。默认值为中国大陆的`https://dashscope.aliyuncs.com`。 ```bash bl config set --key base_url ``` -------------------------------- ### Run a pipeline with inline input Source: https://github.com/modelstudioai/cli/blob/main/skills/bailian-cli/reference/pipeline.md Execute a pipeline workflow definition using inline JSON for runtime input. Ensure the input JSON is correctly formatted. ```bash bl pipeline run workflow.yaml --input '{"brief":"hello"}' ```