Skip to main content
modellix-cli is the official command-line tool for Modellix. It helps you call the Modellix async model API from terminal and automate workflows in scripts or AI agents. For full API behavior and response fields, see the official REST API docs.

What You Can Do

  • Create async model generation tasks
  • Query task status and final generation result

Install

Authentication

You can provide API key in either way:
  1. Recommended: environment variable MODELLIX_API_KEY
  2. Alternative: --api-key flag in each command

Create a Task

Use inline JSON body

Use JSON file body

Common flags

  • --model-slug (required): model slug in provider/model format, for example bytedance/seedream-4.5-t2i
  • --body: request JSON string
  • --body-file: path to request JSON file
  • --api-key: API key (overrides MODELLIX_API_KEY)
Example success response:

Query Task Result

Use the returned task_id:
Example success response:
  1. Run modellix-cli model invoke ... and copy the returned task_id.
  2. Run modellix-cli task get <task_id> to get status and result.
modellix-cli model invoke returns immediately with a task_id, so you need to poll task get to track progress.

Error Handling Guide

The CLI surfaces API errors directly. Use the error code to decide whether to fix inputs or retry.
  • 400: fix parameters or request body format before retrying.
  • 401: your API key is missing, invalid, or expired. Verify MODELLIX_API_KEY or pass --api-key.
  • 402: your account balance is insufficient. Recharge in the Modellix console and retry.
  • 404: verify task_id and --model-slug.
  • 429: you hit rate or concurrency limits. Retry with exponential backoff (for example: 1s, 2s, 4s).
  • 500 / 503: temporary server-side issue. Retry up to 3 times with backoff.

Help