DreamLayer CLI
What this lets you do
Run DreamLayer against files on your machine without writing an integration. The CLI reads local images, streams progress into your terminal, and writes finished PNGs or sprite ZIPs back to disk.What you need
- Node.js 22.12 or later. If you do not have it:
brew install nodeon macOS, or the installer at nodejs.org - A DreamLayer API key with credits
Steps
1. Install
dreamlayer@beta and the pinned version above select 0.4.0-beta.4. The
unversioned latest release remains 0.3.0. The beta includes existing image
commands as well as sprite sheets. Installing it globally replaces your local
CLI version; it does not change npm’s latest tag.
2. Give it the key
3. Generate
4. Edit from a reference image
5. Cut out the background
6. Upscale
7. Check your balance without spending
DREAMLAYER_API_KEY. It calls no image service, costs nothing, and does not expose an account selector.
8. Check capabilities without spending
Confirm it worked
The command exits0, the output file exists and opens as a PNG, and the Usage page in the console shows one settled credit.
Common errors
Troubleshooting
Every command accepts--json for machine-readable output. Error output carries only
the stable public contract and excludes prompts, images, local filenames, and your key.
Successful image output includes the destination path you selected, so remove that path
before sharing it if the local name is private.
Next steps
Sprite-sheet beta
After setting your key, check access without generating anything:--animation-mode loop for repeating motion or a full turntable. Custom
instructions default to once; presets default to loop. Use --action walk,
run, or idle instead of --animation-prompt for a preset, never both.
If neither is supplied, the CLI uses walk.
Request 7–100 frames (default 12) and a square frame size of 32, 64, 128, 256, 512,
720, or 1080 (default 512). Approve the total rounded charge with --max-credits.
New transparent sprites cost 5.6 credits for seven frames or 6.6 for twelve. Export size does not change pricing.
Add --background keep when transparency is not needed: the frames keep the generated
background. This costs $0.32 plus $0.01 per frame, converted to API credits at your
account’s undiscounted purchase rate. A public twelve-frame request costs 2.9334 credits.
That flag needs 0.4.0-beta.4 or later.
The pinned older CLI still validates a historical spending ceiling locally. The
5.8-credit ceiling above is permission to spend at most that amount, not the new
5.6-credit charge. For exact current estimates, use the authenticated
/v1/sprite-pricing endpoint. Do not treat the older
client’s calculated minimum as today’s price. Keep your approved ceiling explicit.
The frame-size response issue is fixed; 512 is the default, not a required workaround.
Retrieve existing completed outputs using their original execution IDs without regenerating.
Credits settle on complete delivery and are returned on failure or timeout.
Sprite requests have no customer cancellation. Save the execution ID to resume
status. See sprite sheets for output details and beta limitations.