modellix-cli is the official command-line client for Modellix.
Use it to manage authentication profiles, discover and run models, wait for asynchronous tasks, download results, and produce stable output for scripts and agents.
For full API behavior and response fields, see the REST API guide.
Package details: npm · GitHub
Requirements
- Node.js 18.17 or later
- A Modellix API key from the Modellix Console
Install
modellix-cli with no arguments prints a local Quickstart. It does not call the API or start an interactive wizard.
Quickstart
1
Store and validate an API key
MODELLIX_API_KEY for temporary and CI usage (see Authentication).2
Check the environment
3
Discover model slugs
4
Submit a model task
5
Query the returned task ID
Authentication and profiles
Authenticated commands select a profile in this order:--profileMODELLIX_PROFILE- the saved
currentProfile default
--api-keyMODELLIX_API_KEY- the selected saved profile
Recommended setup
modellix-cli init is the short setup command and supports the same profile selection.
Interactive prompts hide the key, and the CLI validates it before writing.
Non-interactive setup:
Environment variable (CI and temporary use)
--api-key on the command line, which can remain in shell history.
auth status, auth whoami, config show, and JSON status output never print the credential value.
Auth commands
Local configuration
Diagnose the environment
doctor checks the Node.js version, reports the API-key source without printing the key, validates API connectivity, and reads the team balance when authentication succeeds.
A failed required check returns a non-zero exit status.
Discover models
--quiet or --output slugs to print one slug per line.
Inspect one model:
Run a model
Inline JSON body
JSON file body
Pipe JSON from stdin
Common flags
--model-slug(required): exactprovider/modelvalue frommodel list--body: request JSON string--body-file: path to a JSON file, or-for stdin--api-key: API key (overrides environment and saved profile)--wait: poll until the task reaches a terminal state--timeout: wait deadline (for example5m,30s, or bare seconds)--output task-id: print only the new task ID for shell pipelines
--body or --body-file, not both.
The request body must be a JSON object and is capped at 64 MiB.
Submit and wait in one command
task wait recovery command.
Compatibility alias
modellix-cli model invoke remains an alias of model run.
New scripts should use model run.
Example success response (async submit):
Batch model tasks
model batch accepts one JSON object per line (JSONL):
--max-tasks or explicit --yes, because every line can create a paid task.
All slugs and JSON bodies are validated before the first POST.
Concurrency is limited to 1–10, and the absolute local limit is 1000 tasks.
Query, wait, and download tasks
Get a task result
Wait for one or more tasks
1.
An overall timeout exits 124; JSON mode includes completed responses and unfinishedTaskIds.
Download task resources
--overwrite deliberately.
JSON output contains local paths and byte counts, not signed source URLs.
Local task history
Successful submissions are recorded locally so task IDs remain recoverable:Output, automation, and CI
Built-in Modellix business commands accept these common output controls:
When flags overlap, quiet wins over JSON, then JSON wins over the command default.
Business output uses stdout; warnings, debug details, and recovery instructions use stderr.
For CI:
CI automatically disables colors, progress-capable output, and the background update check.
Set MODELLIX_CLI_SKIP_NEW_VERSION_CHECK=true to disable the update check explicitly.
Exit codes
Networking and diagnostics
Override the API origin for a trusted gateway or local development server:localhost, 127.0.0.1, or ::1.
Sanitized request diagnostics go to stderr:
Shell completion
Troubleshooting
API error codes the CLI surfaces:
400: fix parameters or request body format before retrying401: API key missing, invalid, or expired402: insufficient balance404: verifytask_idand--model-slug429: rate or concurrency limits500/503: temporary server-side issue