Official CLI · modellix-cli on npm

Modellix CLI

Every Modellix model, from your terminal to your agents

The official command-line client for authentication, discovering 100+ image and video models, running asynchronous jobs, and connecting machine-readable --json output to scripts, CI, Cursor, Claude Code, and Codex.

npm install --global modellix-cli

Requires Node.js 18.17 or later. After installation, run modellix-cli --version to verify.

Quickstart

Three commands to get started

Modellix CLI follows the same asynchronous workflow as the API: submit a job, receive a task_id, then poll or wait until it completes.

  1. 01 · Install

    Install globally

    Install it once and use it from any terminal. Requires Node.js 18.17 or later.

    npm install --global modellix-cli
  2. 02 · Authenticate

    Save your API key

    Interactive login validates your key before saving it locally. Get a key from Modellix Console first.

    Console → API Key
    modellix-cli init
  3. 03 · Discover

    Choose a model

    Browse available image and video models, then use model run to submit a job. Add --wait when you want the final result in one command.

    modellix-cli model list

Capabilities

Built for developers, scripts, and agents

Predictable automation flags, local task history, and diagnostics that never print your API key.

  • Discover every model

    Search and filter the catalog with model list, inspect inputs with model describe, and add --json for agent-readable results.

  • One consistent run workflow

    Submit jobs with model run (alias model invoke) using --body or --body-file, then track them with task get or task wait.

  • Batch submission and downloads

    Submit JSONL batches with concurrency controls, then save outputs locally with task download. Machine-readable output avoids exposing temporary signed download URLs.

  • Agent-ready output

    --json and --quiet keep stdout predictable. Documented exit codes work well in CI, while warnings and recovery guidance stay on stderr.

  • Diagnose before you automate

    modellix-cli doctor checks your Node.js version, API key source without revealing the key, network connectivity, and team balance.

  • Multiple profiles for teams

    Save multiple authentication profiles and switch with --profile or MODELLIX_PROFILE, without putting keys in shell history.

Terminal workflow

See a real CLI session

Browse the model catalog, submit a job, and retrieve machine-readable results—the default developer workflow.

~/projects/marketing · modellix-cli
# 1. Browse the model catalog$ modellix-cli model list --type text-to-image --output slugs# 2. Submit a job$ modellix-cli model run \
  --model-slug bytedance/seedream-5.0-pro \
  --body '{"prompt":"A cute cat playing in a sunny garden"}'# 3. Retrieve the result (or add --wait to model run)$ modellix-cli task get task-abc123 --json# Example output → { "code": 0, "data": { "status": "success", "task_id": "task-abc123", ... } }

Agent integration

Connect it to your coding agent

No extra daemon is required. Any agent that can execute shell commands can call modellix-cli directly. Use model run followed by task get, and always add --json when another program consumes the output.

Works with Cursor, Claude Code, Codex, and any agent that can use terminal tools.

Check your environment before automating
modellix-cli doctor --json

Support

Frequently asked questions

Answers about installation, authentication, automation, and billing.

What is Modellix CLI?

Modellix CLI, published as the modellix-cli package, is Modellix’s official command-line client. It manages authentication, helps you discover and run AI image and video models, waits for asynchronous jobs, downloads outputs, and emits stable JSON for scripts and coding agents.

How do I install Modellix CLI?

It requires Node.js 18.17 or later. Run npm install --global modellix-cli, then use modellix-cli --version to verify the installation. Running modellix-cli without arguments prints a local quickstart and does not call the API.

How do I authenticate modellix-cli?

Get an API key from Modellix Console, then run modellix-cli init or modellix-cli auth login. In CI, set MODELLIX_API_KEY, or pass --api-key together with --yes. Prefer an environment variable or hidden prompt so the key is not stored in shell history.

How do I generate an image with Modellix CLI?

Start with modellix-cli model list to find a model. Then use modellix-cli model run with a provider/model slug and a prompt body. Retrieve the result with modellix-cli task get, or add --wait to model run.

Can coding agents use Modellix CLI?

Yes. --json and --quiet make stdout predictable for Cursor, Claude Code, Codex, and other agents that can execute terminal commands. Business results go to stdout, while diagnostics and recovery guidance go to stderr.

Does Modellix CLI replace the REST API?

No. The CLI uses the same Modellix REST API and is designed for terminals and automation. Use REST when you need a custom HTTP client; use the CLI when you want managed authentication, model discovery, job waiting and downloads, or agent-friendly output.

How are CLI jobs billed, and should I retry a failed request?

CLI jobs use the same model pricing as REST API jobs. A successfully submitted job may incur charges, so do not blindly retry after a timeout or network error. If you received a task ID, check its status before submitting the job again.

Modellix CLI

Install the CLI and start building

Install from npm, authenticate once, then run any Modellix model from your terminal—or hand the same commands to your agent.