Melies CLI Documentation
Generate images, videos, and movie posters from the command line. Melies gives you access to 50+ AI models through a single tool. Install it, authenticate, and start generating.
Installation
Install Melies globally from npm. Requires Node.js 18 or later.
Melies works on macOS, Linux, and Windows. Once installed, the melies command is available globally in your terminal.
If you use nvm or another Node version manager, install Melies in the Node version you use most often to keep it available across sessions.
Verify the installation:
Authentication
You need a Melies account to use the CLI. Sign up at melies.co (Google or email).
Run the login command to authenticate via your browser:
This opens your browser. After you sign in, the token is saved automatically.
For CI pipelines and agents, use a token directly.
Where to find your API token
Click your avatar (top right) → Settings → API tab. You can generate up to 5 tokens.
You can also set MELIES_TOKEN as an environment variable. It takes precedence over the stored config.
Quick Start
The Melies workflow follows a consistent pattern: check your balance, pick a model, generate, and use the result.
Quality Presets
Every command supports three quality presets so you can trade speed for quality without memorizing model names. Melies picks the best model for you.
| Preset | What it does | Best for |
|---|---|---|
--fast | Fastest model available. Lower cost, near-instant generation. | Drafts, iteration, testing prompts |
--quality | Balanced model. Better detail and coherence at moderate cost. | Social media, thumbnails, most use cases |
--best | Top-tier model. Maximum quality, longer generation, higher cost. | Hero shots, final renders, portfolio work |
If no preset is specified, --fast is the default. You can always override with -m model-id to pick a specific model. See the Models page for the full catalog.
The --sync flag makes commands wait for the result instead of returning immediately. This is especially useful for scripts and AI agents.
Credit System
Every generation costs credits. The exact cost depends on the model used. Quality presets (--fast, --quality, --best) select a default model for you. Check your balance with melies credits.
Default preset models
| Preset | Image model | Credits | Video model | Credits |
|---|---|---|---|---|
--fast (default) | flux-schnell | 2 | kling-v2 | 30 |
--quality | flux-pro | 8 | kling-v3-pro | 100 |
--best | seedream-3 | 6 | veo-3.1 | 400 |
Use -m model-id to override presets. Credits vary by model. Some models have variable pricing based on resolution or duration. See the Models page for the full catalog and per-model pricing.
Need more credits? Check our pricing plans for details on credit bundles and subscriptions.
Group usage by day:
