LAS CLI is the official command-line tool for the AI Data Lake Service (LAS), providing commands for LAS invocation authentication, multimodal data processing, intelligent task orchestration, and other Key features. By integrating with AI agents, you can conveniently leverage LAS's multimodal data processing capabilities through simple task descriptions while consuming fewer tokens. This document introduces the installation and key usage instructions for LAS CLI commands.
Command categories | Supported commands | Subcommands | Application scenarios and capability description |
|---|---|---|---|
Initialization and LAS service configuration | Not applicable |
| |
|
| ||
|
| ||
Multimodal data processing |
|
| |
|
| ||
Help |
|
| |
Version |
| Not applicable |
|
You can choose any of the following installation methods based on your operating system and environment.
This method is recommended if Node.js and npm are already installed in your environment.
npm install -g @las-ai/cli@latest
las-cli --version to verify the installation result. If the version number is output successfully, the installation is complete.tip
When installing LAS CLI, the account environment used to execute the installation command must have global installation permissions. If permissions are lacking, or if authentication for global installation commands is required, you can adjust permissions and configure the necessary authentication information based on the actual environment.
The following is an example of installing LAS CLI through natural language interaction in ArkClaw.
npm uninstall -g @las-ai/clirm -f /usr/local/bin/las-cli (or the actual path prompted during installation)After installing LAS CLI for the first time, you need to run the init command to initialize LAS configuration, mainly to complete the authentication configuration for invoking LAS services.
~/.las-cli/config.json, configure the authentication parameters, and then run the init command to initialize LAS CLI.warning
Authentication information is highly sensitive. If leaked, it may result in your model usage being consumed by others, resulting in losses. Therefore, please store and initialize configuration in a trusted environment.
init command to perform the initialization configuration. The following are configuration examples for both scenarios.init command documentation, run las-cli init --help, or refer to the init command reference section below.When configuring using the agent, it is recommended to set authentication information as environment variables, then allow the agent to retrieve environment variables for LAS CLI initialization. This avoids sending sensitive authentication information directly in plain text to the agent.
las-cli init command in the terminal to launch the interactive interface for configuring LAS CLI initialization parameters.las-cli config list command to view the initialization configuration results.Execute las-cli operators list in the terminal to view the current list of supported operators, detailed parameter descriptions, and Examples for each operator.
You can send multimodal file links and task descriptions directly to the agent for processing.
las-cli operators call <operatorId> [--param1 value1 --param2 value2 ...] command to invoke a LAS operator.For example, create a params.json file in the current directory and configure the operator parameters.
{ "url": "https://las-ai-cn-beijing-baseline.tos-cn-beijing.volces.com/operator_cards_serving/public/baseline/las_pdf_parse_doubao/v1/pdf-sample.pdf" }
Run the following command to invoke the operator.
las-cli operators call las_pdf_parse_doubao --params-file ./params.json
By using the las-cli task list command, you can view the list of executed data processing tasks. Additionally, the current invocation methods for LAS multimodal data processing operators support both sync (synchronous) and async (asynchronous) modes. For asynchronous tasks, you can also use this command to check task status.
las-cli task create "task description", and the CLI will invoke a large model to orchestrate operators for the task.las-cli task list to view the task list and see the current status of the task:las-cli task status task-ID to view the execution result:las-cli commandlas-cli init
When executing the init command, an interactive LAS initialization parameter configuration interface will be launched. You can enter the configuration results for the following parameters in the interactive interface.
Parameter | Type | Required | Default value | Description |
|---|---|---|---|---|
token | string | Yes | None | The LAS API Key, which you must obtain from the LAS console. |
region | string | Yes | cn-beijing | The region selected for invoking the operator service. |
modelEndpoint | string | No | None | Large model service endpoint (that is, Base_url). |
modelName | string | No | None | Large model name. |
modelApiKey | password string | No | None | Large model API Key. |
tos | string | No | None | Optional object storage TOS address, used for uploading data files or saving results when invoking LAS operators. |
las-cli region [region]
View the current region for LAS services.
las-cli region
Modify the current region for LAS services.
las-cli region cn-shanghai
Use the list subcommand to view the current configuration results for parameters related to large models.
las-cli config list
Use the model subcommand to reset the large model parameters for LAS services.
las-cli config model
model subcommand, you need to configure the following parameters.Parameter | Type | Required | Default value | Description |
|---|---|---|---|---|
endpoint | string | No | None | Large model service endpoint (that is, Base_url). |
name | string | No | None | Large model name. |
apiKey | password string | No | None | Large model API Key. |
Use the subcommand list to view the current list of supported operators, parameter descriptions for each operator, Examples, and other help content.
las-cli operators list
Use the subcommand call to invoke a specified operator for multimodal data processing.
las-cli operators call <operatorId> [--param1 value1 --param2 value2 ...]
The details are as follows:
operatorId: Replace with the operatorId of the LAS operator to be invoked.--param according to the parameter requirements for operator invocation.Operator name | Operator ID | Description | Invocation mode |
|---|---|---|---|
ASR Pro |
| Enhanced speech recognition, supports noise reduction, speaker identification, and more. | async |
Audio Convert |
| Audio format conversion (wav/mp3/flac). | sync |
Audio Extract & Split |
| Extract audio from video and split into segments. | sync |
Image Resample |
| Image resampling and scaling. | sync |
PDF Parse Doubao |
| Parse PDF documents using Doubao AI. | async |
Video Edit |
| AI video editing and processing. | async |
Video Inpaint |
| Remove objects from video (watermarks/subtitles, and so on). | async |
Video Resize |
| Adjust video resolution. | async |
VLM Video |
| Visual language model video understanding. | sync |
Operators on the LAS platform support two invocation modes, and the CLI provides a unified invocation experience for both modes.
Mode | Description |
|---|---|
sync (synchronous) | After the request is sent, the CLI immediately waits and directly returns the processing result. Suitable for tasks that require short processing time and can respond quickly. |
async (asynchronous) | After the request is sent, the server immediately returns a |
Enhanced speech recognition operator, supporting audio preprocessing, noise reduction, and extended analysis features.
Invocation mode: async
Parameter | Type | Required | Default value | Description |
|---|---|---|---|---|
| string | Yes | None | Audio URL (http/https or tos://bucket/key). |
| string | Yes | None | Audio format, supports raw/wav/mp3/ogg. |
| string | No | None | Language code (zh/en/ja/de and more). |
| string | No | bigasr | Resource pool (bigasr/seedasr). |
| string | No | None | User ID. |
| string | No | bigmodel | Model name. |
| string | No | None | Model version. |
| boolean | No | None | Enable inverse text normalization (ITN). |
| boolean | No | false | Enable punctuation. |
| boolean | No | false | Enable DDC. |
| boolean | No | false | Enable speaker information. |
| boolean | No | false | Enable channel separation. |
| boolean | No | false | Show utterance-level results. |
| boolean | No | false | Show speech rate information. |
| boolean | No | false | Show volume information. |
| boolean | No | false | Enable language detection |
| boolean | No | false | Enable emotion detection |
| boolean | No | false | Enable gender detection |
| boolean | No | false | Use VAD segmentation |
| number | No | None | End window size (milliseconds) |
| boolean | No | false | Enable noise reduction |
| boolean | No | None | Enable multilingual recognition |
| string | No | None | Sensitive word filtering |
| string | No | None | Corpus context |
Examples:
las-cli operators call las_asr_pro \ --audio_url "https://example.com/audio.wav" \ --audio_format wav \ --enable_punc true \ --enable_speaker_info true \ --language zh
Convert audio files between different formats.
Invocation mode: sync
Parameter | Type | Required | Default value | Description |
|---|---|---|---|---|
| string | Yes | None | Input audio TOS path |
| string | Yes | None | Output TOS path |
| string | No | wav | Output format (wav/mp3/flac) |
| array | No | None | Additional FFmpeg parameters |
Examples:
las-cli operators call las_audio_convert \ --input_path "tos://bucket/input.mp3" \ --output_path "tos://bucket/output.wav" \ --output_format wav
Extract audio from video and split it into segments based on the specified duration.
Invocation mode: sync
Parameter | Type | Required | Default value | Description |
|---|---|---|---|---|
| string | Yes | None | Input TOS path |
| string | Yes | None | Output TOS path template |
| number | No | 30.0 | Split duration (seconds) |
| string | No | wav | Output format (wav/mp3/flac) |
| number | No | None | FFmpeg timeout (seconds) |
| array | No | None | Additional FFmpeg parameters |
Examples:
las-cli operators call las_audio_extract_and_split \ --input_path "tos://bucket/video.mp4" \ --output_path_template "tos://bucket/output/segment_%03d.wav" \ --split_duration 60 \ --output_format wav
Resample and scale images.
Invocation mode: sync
Parameter | Type | Required | Default value | Description |
|---|---|---|---|---|
| string | Yes | None | Input image URL or TOS path |
| string | Yes | None | Output TOS directory |
| array | No | [200, 200] | Target size [width, height] |
| array | No | None | Target DPI [x, y] |
| string | No | lanczos | Interpolation method (nearest/bilinear/bicubic/lanczos) |
| string | No | .jpg | Output format (.jpg/.png) |
| string | No | None | Output file name (without suffix) |
Examples:
las-cli operators call las_image_resample \ --image "https://example.com/photo.jpg" \ --tos_dir "tos://bucket/output/" \ --target_size "[800, 600]" \ --method lanczos
Use Doubao AI to parse PDF documents, supporting both standard and detailed parsing modes.
Invocation mode: async
Parameter | Type | Required | Default value | Description |
|---|---|---|---|---|
| string | Yes | None | PDF file URL |
| string | No | normal | Parse mode (normal/detail) |
| number | No | 1 | Start page number |
| number | No | None | Number of pages to parse |
Examples:
las-cli operators call las_pdf_parse_doubao \ --url "https://example.com/document.pdf" \ --parse_mode detail \ --start_page 1 \ --num_pages 10
Edit and process videos using AI.
Invocation mode: async
Parameter | Type | Required | Default value | Description |
|---|---|---|---|---|
| string | Yes | None | Video URL (http/https or tos://) |
| string | Yes | None | Output TOS path prefix |
| string | No | None | Built-in scenario name |
| string | No | None | Natural language task description |
| array | No | None | Reference images |
| string | No | None | Reference target name |
| number | No | None | Segment duration (seconds) |
| string | No | None | Processing mode (simple/detail) |
| number | No | None | Minimum segment duration (seconds) |
| string | No | None | Output format (mp4/mkv) |
Examples:
las-cli operators call las_video_edit \ --video_url "https://example.com/video.mp4" \ --output_tos_path "tos://bucket/output/edited" \ --task_description "将视频剪辑为精彩片段" \ --mode simple
Intelligently remove objects such as watermarks and subtitles from videos.
Invocation mode: async
Parameter | Type | Required | Default value | Description |
|---|---|---|---|---|
| string | Yes | None | Video URL (http/https or tos://) |
| string | Yes | None | Output TOS path prefix |
| array | No | None | Target types (watermark/subtitle/scrolling_subtitle) |
| boolean | No | None | Return subtitle bounding box |
| boolean | No | None | Detection precise mode |
| string | No | None | Inpainting backend (pixel_replace/pixel_generate) |
| number | No | None | Maximum number of frames to process |
| boolean | No | None | Subtitle mask precise mode |
| array | No | None | Fixed bounding box |
Examples:
las-cli operators call las_video_inpaint \ --video_url "https://example.com/video.mp4" \ --output_tos_path "tos://bucket/output/inpainted" \ --targets '["watermark", "subtitle"]' \ --detection_precise_mode true
Adjust video resolution and encoding parameters.
Invocation mode: async
Parameter | Type | Required | Default value | Description |
|---|---|---|---|---|
| string | Yes | None | Input video TOS path |
| string | Yes | None | Output TOS directory |
| string | Yes | None | Output file name |
| number | Yes | None | Minimum width (pixels) |
| number | Yes | None | Maximum width (pixels) |
| number | Yes | None | Minimum height (pixels) |
| number | Yes | None | Maximum height (pixels) |
| string | No | None | Aspect ratio policy (disable/increase/decrease) |
| number | No | None | Pixel alignment step |
| number | No | None | NVENC CQ value (0-51) |
| string | No | None | NVENC RC mode (constqp/vbr/cbr) |
Examples:
las-cli operators call las_video_resize \ --video_path "tos://bucket/input.mp4" \ --output_tos_dir "tos://bucket/output/" \ --output_file_name "resized.mp4" \ --min_width 1280 --max_width 1920 \ --min_height 720 --max_height 1080
Use a visual language model to understand and analyze video content.
Invocation mode: sync
Parameter | Type | Required | Default value | Description |
|---|---|---|---|---|
| string | Yes | No | Video URL (http/https or tos://bucket/key) |
| string | Yes | No | Video understanding prompt (natural language description) |
| string | No | No | Doubao model name |
| number | No | No | Minimum vertical resolution |
| number | No | No | Compression frame rate |
| number | No | No | Maximum output token count |
| number | No | No | Maximum completion token count |
| number | No | No | Sampling temperature (0~2) |
| number | No | No | Top-p sampling (0~1) |
| array | No | No | Stop string |
Examples:
las-cli operators call las_vlm_video \ --video_url "https://example.com/video.mp4" \ --text "请描述这个视频的内容" \ --temperature 0.7
Use the task create "<description>" command to create an intelligent orchestration task with a natural language description. The CLI will invoke a pre-configured large model, decompose your text description into a series of specific operator invocation steps, and execute them automatically.
# Example: Let AI help you analyze video and extract audio las-cli task create "请分析这个视频 tos://bucket/video.mp4,告诉我里面有什么内容,并把音频提取出来"
warning
Before using this feature, you must first properly configure the large model service via las-cli init or las-cli config model.
The task list command is used to view all locally recorded task history. This includes intelligent orchestration tasks generated by task create and asynchronous tasks produced by asynchronous operator invocation.
las-cli task list
task status <task_id> command is used to query the current status and result of a specified task. The CLI first searches the local orchestration task history. If the task is not found, it queries the LAS server as a normal asynchronous task.
las-cli task status task-1678886400000-abcd
task wait <task_id> command blocks the current terminal until the specified asynchronous task is completed. This is very useful in scenarios where a script needs to wait for the result of a preceding task.
# Wait for an ASR task to complete and save its result to the result.json file las-cli task wait <asr-task-id> --operator las_asr_pro --out result.json
task kill <task_id> command sends a request to the LAS server to terminate a running asynchronous task.
las-cli task kill <your-task-id>
task delete <task_id> is used to delete a specified task entry from the local task history, while task clear clears all local task history. This only affects local records and does not affect tasks already existing on the server.
# Delete a single local record las-cli task delete task-1678886400000-abcd # Clear all local records las-cli task clear
las-cli help [command]
# View help information for the config command las-cli help config # View help information for the operators call command las-cli help operators call
Q: What should I do when using LAS CLI for the first time?
A: It is strongly recommended to run las-cli init directly. This interactive command guides you through all necessary configurations, including authentication credentials and default region, and is the fastest way to get started.
Q: I installed it on Windows. Why does running las-cli prompt that the command cannot be found?
A: If you installed via a PowerShell script, the script automatically updates the system PATH environment variable. However, you need to restart your terminal (such as PowerShell, CMD, or Windows Terminal) for the new environment variable to take effect.
Q: How do I set a global region to avoid specifying the --region parameter every time?
A: You can set a global default region using the las-cli region <region_name> command. For example, after running las-cli region cn-shanghai, all subsequent operator invocations will default to the Shanghai region unless you explicitly override it with --region.