modellix-cli is the official command line tool for Modellix.
It helps you submit model generation tasks and query task results directly from terminal.
npm install -g modellix-cliCheck installation:
modellix-cli --versionYou can provide API key in two ways:
- Preferred: set environment variable once (
MODELLIX_API_KEY) - Alternative: pass
--api-keyin each command
Set env var:
# macOS / Linux
export MODELLIX_API_KEY="your_api_key"# Windows PowerShell
$env:MODELLIX_API_KEY="your_api_key"Use inline JSON body:
modellix-cli model invoke --model-slug bytedance/seedream-4.5-t2i --body '{"prompt":"A cute cat playing in a garden on a sunny day"}'Use JSON file body:
modellix-cli model invoke --model-slug alibaba/qwen-image-edit --body-file ./payload.jsonCommon flags:
--model-slug(required): model slug inprovider/modelformat, for examplebytedance/seedream-4.5-t2i--body: request JSON string--body-file: path to request JSON file--api-key: API key (overrides env var)
modellix-cli task get <task_id>Example:
modellix-cli task get task-abc123- Run
modellix-cli model invoke ...and copy the returnedtask_id. - Run
modellix-cli task get <task_id>to get status and result.
- Your API key is missing, invalid, or expired.
- Verify
MODELLIX_API_KEYor pass--api-keyexplicitly.
- Your account balance is insufficient.
- Recharge your account in the Modellix console and retry.
- You have hit rate limit or concurrency limit.
- Retry with exponential backoff (for example: 1s, 2s, 4s).
View all commands:
modellix-cli --helpView help for one command:
modellix-cli <command> --help