Remove image backgrounds in bulk from the command line with the LassoCut API. One file, no dependencies, Node.js 18 or later.
lassocut login # sign in with GitHub or Google in the browser, once
lassocut photo.jpg # writes photo-removebg.png next to it
lassocut --output-directory out/ photos/ # every image in a folder
lassocut --size full --bg-color white "shots/*.jpg"Marketplace presets and a cast shadow:
lassocut --preset amazon photo.jpg # photo-removebg.jpg, white background, ready for Amazon
lassocut --preset shopify --shadow cast --light 30 --shadow-length long --shadow-strength 55 "shots/*.jpg"--preset is one of amazon, ebay, etsy, shopify, zalando, instagram. Results are .jpg files, and the CLI
prints (not compliant: <reason>) after a file that does not meet the preset. Compliant means compliant with the
image rules LassoCut checks. --preset cannot be combined with --format, --channels, --bg-color, --bg-image-file,
--crop, --crop-margin, --scale or --position. --shadow cast adds a cast shadow (--light from -90 to 90,
positive = light from the left, default 45; --shadow-length short, medium or long; --shadow-strength 0 to 100,
default 55); Zalando allows no shadow, so it is ignored there with a warning.
Coming from the remove.bg command-line tool? See the CLI migration guide. The flags are the same (--size, --type, --format,
--channels, --bg-color, --bg-image-file, --output-directory, --reprocess-existing,
--confirm-batch-over, --extra-api-option), results keep the -removebg file suffix, and
REMOVE_BG_API_KEY is read if LASSOCUT_API_KEY is not set. Replace the command name and the key.
The key comes from --api-key, then LASSOCUT_API_KEY, then REMOVE_BG_API_KEY, then the one saved by
lassocut login (in %APPDATA%\lassocut\config.json on Windows, ~/.config/lassocut/config.json elsewhere).
lassocut logout removes the saved key; delete it in your account to revoke it.
New flags: --api-url (or LASSOCUT_API_URL), --output-suffix, --concurrency (default 4).
Rate limits (429) and temporary errors (503) are retried automatically.
Install: npm install -g lassocut-cli (or run once with npx lassocut-cli). Run lassocut --help for the full list. Tests: npm test.
MIT licence, copyright (c) 2026 JAUPIN Design LLC. remove.bg is a trademark of Canva Austria GmbH; LassoCut is not affiliated with it.