Skip to content

CLI

The Depicta CLI lets you generate, edit, and process images from your terminal. Both the Python and Node.js CLIs have identical commands.

Terminal window
pip install depicta

Or run without installing: uvx depicta

Terminal window
depicta auth login

This prompts for your API key interactively. Alternatively, set the DEPICTA_API_KEY environment variable:

Terminal window
export DEPICTA_API_KEY=dpct_your_key_here

Your key is stored in ~/.config/depicta/config.json with 0600 permissions.

Terminal window
depicta image "A sunset over Greek mountains, warm golden light"

The CLI downloads the image, shows the file path, cost, and remaining balance:

✓ Generated: image-20260406-143022.png
Model: gemini-2.5-flash-image
Cost: €0.048 · Balance: €9.74
Terminal window
# Generate a graphic (icon, logo, clipart)
depicta graphic "A minimal rocket icon, white on transparent, 256x256"
# Generate a diagram
depicta diagram "User authentication flow" --type flowchart
# Edit an existing image
depicta edit image photo.png "Make the sky more dramatic"
# Combine two images
depicta combine image hero.png overlay.png --prompt "Side by side comparison"

The CLI auto-detects how you’re using it:

ModeWhenOutput
HumanTerminal (TTY)Formatted status + file path
JSON--json flagFull JSON to stdout
PipePiped to another commandFile path only to stdout

Chain commands together — output flows directly to the next operation:

Terminal window
depicta image "A product photo" | depicta process remove-bg - | depicta process resize - --width 512
CodeMeaning
0Success
1General error
2Authentication failure
3Insufficient credits
4Content rejected
5Rate limited
  • Generate — content types, models, reference images
  • Processing — 20 operations
  • Models — available models and pricing