rembg or a hosted background removal API?
rembg is free, open-source software that removes image backgrounds on your own machine. A hosted API such as LassoCut does the same job on someone else's servers, for a price per image. Both are reasonable choices; which one fits depends on your volume, your hardware, where your images are allowed to go and how much upkeep you want to take on.
This page is written by LassoCut, the hosted option compared here. rembg is excellent free software, and for many projects it is the better answer. We say when.
Updated 1 October 2026 · by Jerome Aupin, founder of LassoCut. Facts about rembg come from its README on GitHub, read on 1 October 2026; check it for changes before you decide.
What rembg is
rembg describes itself as a tool to remove image backgrounds that can be used as a command-line tool, a Python library, an HTTP server or a Docker container. It is published under the MIT licence by Daniel Gatis, and the code is on GitHub.
- Install: with pip, choosing one backend:
pip install "rembg[cpu]"for the library, or"rembg[cpu,cli]"to add the command line. The README lists Python 3.11 up to, but not including, 3.14. - GPU option:
rembg[gpu]for NVIDIA cards, which may needonnxruntime-gpu, CUDA andcudnn-devel, andrembg[rocm]for AMD cards onceonnxruntime-rocmworks. If the GPU setup does not work, the README suggests falling back to the CPU backend. - Command line:
rembg ifor a single file,rembg pfor a whole folder (with a watch mode for new files),rembg bfor a stream of raw frames, for example from FFmpeg, andrembg dto download models ahead of time. - HTTP server:
rembg s --host 0.0.0.0 --port 7000starts a local server with its API documentation at/apiand a web interface you can switch off with--no-ui. - Models: local models are downloaded automatically the first time you use them and stored under
~/.rembg/models/, or wherever theREMBG_HOMEvariable points. The README puts the default model at about 1 GB, and offers several smaller or more specialised ones. - Licences of the models: the README states that model weights carry their own licences, independent of rembg's MIT licence, and that the default model's licence requires a paid agreement for commercial use. It asks you to check each model's source before commercial use.
When self-hosting rembg is the right choice
- No per-image fee: the software is free. If you already have a machine with spare capacity, the marginal cost of one more image is close to zero.
- Offline work: once the model is on disk, rembg runs without an internet connection. Good for air-gapped networks, field laptops and build pipelines with no outbound access.
- Privacy and data residency: images never leave your infrastructure. If a contract or a regulation forbids sending images to a third party, this settles the question.
- Control: you choose the model, pin the version, read the code, change it, and add it to your own product. Nothing changes unless you upgrade.
- Learning and research: the library, the CLI and the server are a good way to understand how background removal works end to end.
When a hosted API is the right choice
- No GPU and no server to run: nothing to install, no CUDA versions to match, no model files of up to a gigabyte to download and store, no memory sizing. You send an HTTPS request and get an image back.
- Scaling: a traffic spike is the provider's problem. Self-hosting means sizing machines for your peak, keeping them up and paying for them while idle.
- Plugins for non-developers: with LassoCut, the same account and credits work in Photoshop, Figma, WordPress and WooCommerce, GIMP 3, Zapier, Make, n8n, a CLI and the browser (platforms). Designers on your team do not have to touch Python.
- Consistent results across tools: the web app, the API and every plugin call the same service, so a product photo cut in Figma matches the one your script processed overnight.
- Support and upkeep: someone else watches the service, updates it and answers email (contact@lassocut.com). With rembg you rely on the open-source community and your own team.
- Commercial licensing in one place: you buy credits under one set of terms instead of checking the licence of each model you download.
Side-by-side comparison
| rembg (self-hosted) | LassoCut (hosted API) | |
|---|---|---|
| Software price | Free, MIT licence; model weights have their own licences | Credit packs from $9 for 100 images; no subscription |
| Running cost | Your machine, electricity or cloud bill, and your time | From $0.09 down to $0.015 per full-size image, by pack size |
| Free allowance | Unlimited, on your hardware | 50 free previews a month, up to 10 a day (small images) |
| Setup | pip install, a backend (CPU, CUDA or ROCm), a model download on first use | A free account and an API key |
| Hardware | Yours; a GPU is optional but helps speed | None on your side |
| Works offline | Yes, once the model is downloaded | No, it needs an internet connection |
| Where images go | Nowhere: they stay on your machine | To LassoCut's servers (see the privacy policy) |
| Interfaces | Python library, CLI, local HTTP server, Docker | HTTPS API, web app, batch tool, CLI, plugins and automation connectors |
| Scaling | You size and run the machines | Handled by the service, within a rate limit |
| Support | Community and GitHub issues | Email support from the company running it |
| Control over the model | Full: choose, pin, replace | None: the service picks; a type hint can steer it |
We have not run a quality benchmark of rembg against LassoCut, so this table makes no claim about which cuts better. Run both on twenty of your own images before deciding.
The same task in Python, both ways
rembg
From the rembg README, after pip install "rembg[cpu]". The first call downloads the model.
from rembg import remove
with open('input.png', 'rb') as i:
with open('output.png', 'wb') as o:
input = i.read()
output = remove(input)
o.write(output)
For many files, the README recommends creating one session with new_session() and passing it to each remove(input, session=session) call, so the model is loaded once.
LassoCut
From the LassoCut Python guide, after pip install requests and with your key in LASSOCUT_API_KEY. size=preview is covered by the free previews; use full for full-size images.
import os, requests
r = requests.post(
"https://api.lassocut.com/v1.0/removebg",
headers={"X-Api-Key": os.environ["LASSOCUT_API_KEY"]},
files={"image_file": open("photo.jpg", "rb")},
data={"size": "preview"},
)
r.raise_for_status()
open("no-bg.png", "wb").write(r.content)
print("credits charged:", r.headers["X-Credits-Charged"])
To process a folder in parallel with retries, see the thread-pool example in the same guide.
What it costs
rembg has no licence fee and no per-image price. What you pay for is the machine that runs it, the time to install and update it, and, for commercial work, whatever the licence of the model you pick requires.
LassoCut sells one-time credit packs, from the pricing page: 1 credit is 1 full-size image.
| Pack | Price | Per image |
|---|---|---|
| 100 credits | $9 | $0.09 |
| 1,000 credits | $39 | $0.039 |
| 10,000 credits | $249 | $0.0249 |
| 100,000 credits | $1,500 | $0.015 |
No subscription, and purchased credits do not expire while your account is open. A preview costs 0.25 credit, and every account gets 50 free previews a month. An API call that returns an error is not charged. Credits are sold to businesses only.
A rough way to decide: if you already own a suitable machine and someone on the team is happy to maintain it, rembg is cheaper at almost any volume. If you would have to rent a GPU server, or pay for a person's time to keep it running, compare that monthly bill with the pack that matches your volume.
Using both
The two are not exclusive. Some teams run rembg for internal or confidential images and use a hosted API where convenience matters: designers in Figma or Photoshop, a WordPress shop, a Zapier or n8n automation. Others prototype with rembg, then move to a hosted API when traffic grows, or the other way round when volume makes owning a GPU worth it.
For a wider look at hosted options and their prices, see the background removal API comparison.
Questions
Is rembg free for commercial use?
rembg itself is under the MIT licence. Its README says that model weights carry their own licences, independent of rembg's, and that the default model's licence requires a paid agreement for commercial use. Check the licence of the model you use before commercial work.
Do I need a GPU to run rembg?
No. The README offers a CPU backend, rembg[cpu], and optional GPU backends for NVIDIA (CUDA) and AMD (ROCm) cards. A GPU makes processing faster; a hosted API needs no hardware on your side at all.
Does rembg work offline?
Yes, once its models are on disk. They download automatically on first use, or ahead of time with rembg d, and are stored under ~/.rembg/models/ unless REMBG_HOME says otherwise. LassoCut needs an internet connection.
Can I batch remove backgrounds with rembg?
Yes: rembg p input_folder output_folder processes a whole folder, and -w watches it for new files. In Python, reuse one new_session() across files. With LassoCut, use the batch tool in the browser, the CLI, or the Python folder script.
Is LassoCut better than rembg?
We have not benchmarked the two, so we make no quality claim. LassoCut saves you from running servers and works in design tools and automations; rembg is free, offline and fully under your control. Test both on your own images.
Can I call LassoCut over HTTP like the rembg server?
Yes, LassoCut is an HTTPS API: you send POST /v1.0/removebg with your key in the X-Api-Key header and an image file, URL or base64. The parameters and paths are not the same as rembg's local server, so code written for one needs small changes for the other. See the API reference.
How much does LassoCut cost compared with rembg?
rembg has no per-image price; you pay for the machine and the upkeep. LassoCut costs $0.09 per image in the 100-credit pack down to $0.015 per image in the 100,000-credit pack, paid once, plus 50 free previews a month. See pricing.
What to know about LassoCut
- A new service from a small independent company, JAUPIN Design LLC.
- Credits are sold to businesses only.
- The free allowance is 50 previews a month (up to 0.25 megapixel); full-size images need credits.
- It only removes backgrounds; it is not a general image editor.
rembg is open-source software by Daniel Gatis, published under the MIT licence; LassoCut is not affiliated with the rembg project. Other names are trademarks of their owners. References are for identification and comparison only.