Skip to main content
mel is the Melius command-line interface — create projects and canvases, add nodes, wire edges, run generations across the latest image, video, audio, and language models, and download the results, all from your terminal or a script.
You authenticate with an API key. Create one in the Melius app under Team settings → Integrations. See Installation.

Built for agents, great for humans

mel is designed agents-first — every command returns structured JSON, uses deterministic exit codes, and needs zero interactive input, so an AI agent in a sandbox can drive it reliably. The same qualities make it pleasant in a terminal or a shell script: predictable output you can pipe through jq, and clear errors that tell you the exact command to fix them.
npm install -g @melius-ai/cli

mel auth login --api-key mel_...
mel project list
mel node create <canvasId> --type image --prompt "a sunset over the ocean"

How generations work

A generation in Melius is a canvas node — you create a node, start a run, and wait for it to finish:
mel canvas create <projectId>            → a canvas
mel node create <canvasId> --type image  → a node (prompt + optional model)
mel run start <nodeId> --canvas-id <id>  → start a run
mel run wait <runId>                     → block until finished
mel run download <runId>                 → a presigned URL for the output
Runs are asynchronousmel run start returns a run id immediately and the generation happens in the background. mel run wait blocks until it’s finished (or failed). To run an entire canvas in dependency order, use mel bulk-run start <canvasId> --wait.

The output contract

Every command follows the same shape, which is what makes mel scriptable:
  • Success → structured JSON on stdout, exit code 0
  • Errors → structured JSON on stderr, a deterministic exit code
Add --text for tab-separated human output, --fields id,title to project specific fields, or --quiet for exit-code-only. See Global flags.

Rate limits and credits

  • Credits. Generations consume credits from the team you act on, exactly like the app. See each model’s cost in mel model list.
  • Rate limits. Requests are subject to a monthly per-plan limit. On a 429, mel prints a notice to stderr and automatically backs off and retries, so polling commands ride through a limit instead of failing. Enterprise plans are unlimited.

Next steps

Installation

Install mel, create a key, and authenticate.

Quickstart

Run your first generation end to end.

Command reference

Every command, flag, exit code, and error shape.

Using mel from an agent

JSON parsing, exit-code branching, and headless auth.
Last modified on July 1, 2026