The VLM Run CLI provides a powerful command-line interface for interacting with the VLM Run platform directly from your terminal.
Installation
The CLI is included when you install the VLM Run Python SDK:
Configuration
Global Options
Usage: vlmrun [OPTIONS] COMMAND [ARGS]...
CLI for VLM Run (https://app.vlm.run)
Options:
--base-url TEXT Base URL for API requests [env var: VLMRUN_BASE_URL]
--api-key TEXT API Key for authentication [env var: VLMRUN_API_KEY]
--debug Enable debug logging
-v, --version Show version and exit
--help Show this message and exit
Using Environment Variables
You can set your API key and other settings using environment variables:
# Linux/macOS
export VLMRUN_API_KEY=your-api-key
export VLMRUN_BASE_URL=https://api.vlm.run/v1 # Optional
# Windows
set VLMRUN_API_KEY=your-api-key
Command Groups
The CLI is organized into logical command groups:
Command | Description |
---|
files | File upload and management |
models | Model listing and information |
generate | Generate predictions from files |
hub | Domain and schema management |
datasets | Dataset creation and management |
fine-tuning | Model fine-tuning operations |
predictions | View and manage predictions |
Common Operations
File Management
Upload a file to VLM Run:
# Upload a single file
vlmrun files upload path/to/image.jpg
# Upload multiple files
vlmrun files upload file1.jpg file2.jpg file3.jpg
# List uploaded files
vlmrun files list
# Get file information
vlmrun files get FILE_ID
Model Operations
# List available models
vlmrun models list
Generating Predictions
Generate predictions from various file types:
# Image prediction
vlmrun generate image path/to/image.jpg --domain document.invoice
# Document prediction
vlmrun generate document path/to/document.pdf --domain document.form
# Audio prediction
vlmrun generate audio path/to/audio.mp3 --domain audio.transcription
# Video prediction
vlmrun generate video path/to/video.mp4 --domain video.transcription
Working with Domains
# List available domains
vlmrun hub list
# View schema for a domain
vlmrun hub schema document.invoice
Managing Datasets
# Create a dataset from local files
vlmrun datasets create --directory ./images --domain document.invoice --name "Invoice Dataset" --type images
# List your datasets
vlmrun datasets list
# Get dataset details
vlmrun datasets get DATASET_ID
Fine-tuning Models
# Create a fine-tuning job
vlmrun fine-tuning create --model base_model --training-file TRAINING_FILE_ID
# List fine-tuning jobs
vlmrun fine-tuning list
# Get fine-tuning job status
vlmrun fine-tuning get JOB_ID
Advanced Usage
JSON Output
Add the --json
flag to get machine-readable JSON output:
vlmrun files list --json > files.json
Using Remote Files
Generate predictions from remote URLs:
vlmrun generate image --url https://example.com/image.jpg --domain document.invoice
Detailed Help
Get detailed help for any command:
# General help
vlmrun --help
# Command-specific help
vlmrun generate --help
vlmrun generate image --help
Command Reference
For each command, refer to the built-in help for detailed information:
vlmrun <command> --help
vlmrun <command> <subcommand> --help