Command-line tool
Dolly, from your terminal.
Generate images, video, voice and music from the command line — and always see the price before you spend. Zero dependencies, Node 18.17+.
npm install -g dolly-cli
dolly auth loginGet a key at Account → API keys. It's stored in ~/.dolly/config (mode 0600) and never printed back.
Quickstart
The habit the whole tool is built around: quote before you spend. Price anything for free, then generate.
# 1. Price it — spends nothing
dolly quote image "a ceramic mug on a marble counter"
# 2. Generate it — shows the same quote, then asks
dolly gen image "a ceramic mug on a marble counter" --out ./renders/
# 3. Write to an exact path (great for agents building a site)
dolly gen image "a wide desert highway at dusk" --out ./public/hero.jpg --yes--model is optional for images (Dolly picks a default); required for video, voice, music and tools. --yes skips the confirm in scripts, and --max-spend <credits> is a hard ceiling the server enforces. Failed generations refund automatically.
Commands
| dolly auth login | Store your API key in ~/.dolly/config (0600). Prompts; never echoes the key. |
| dolly auth status | Show the signed-in account, its balance, and the endpoint in use. |
| dolly models [--kind …] | List available models. Filter by image | video | voice | music | tool. |
| dolly quote <kind> [prompt] | Price a generation for free — spends nothing. --model to name one. |
| dolly gen <kind> <prompt> | Generate. Shows the quote first, then asks (or --yes). Writes with --out. |
| dolly edit <op> <file> | bg-remove · upscale · extend · reframe · resize · restore · colorize · retouch. |
| dolly assets add <files…> | Upload and name a reusable asset (--handle, --kind). Reference it later by @handle. |
| dolly assets ls | rm <handle> | List or delete your saved assets. |
| dolly job <id> | Check the status of a job or batch. |
| dolly batch <file.csv> | Quote every row, refuse if the total exceeds --max-total, then submit. |
Full options live in dolly --help and each subcommand's help. --param key=value passes anything a model's schema accepts that has no dedicated flag.
Scripting
Every command takes --json and prints exactly one JSON document on stdout (progress and prompts go to stderr, so pipes are always safe). Exit codes are meaningful, so a script can react instead of parsing text.
HERO=$(dolly gen image "a hero shot" --out ./public/hero.jpg --yes --json | jq -r '.data.written[0]')| 0 | success |
| 1 | error |
| 2 | usage — your command line is wrong |
| 3 | not signed in, or the key was rejected |
| 4 | insufficient credits |
| 5 | over --max-spend / --max-total, or you declined |
| 6 | prompt or image rejected by moderation |
| 7 | the generation failed — and was refunded |
| 8 | rate limited |
Same key, same API
The CLI and the MCP connector share one account, one key and one set of prices. Use the CLI when you're writing files into a repo; use MCP when you're inside an assistant. Generating needs a plan.