remove.bg's standalone API shuts down on December 1, 2026. The notice is on remove.bg's own API and pricing pages, and the pricing page now points API customers to Leonardo.Ai. If you call api.remove.bg from production code, those calls stop working on that date.
This guide covers the practical side: what changes in your request, what stays the same, and what to check before you switch. It uses bgbuster as the target, but the checklist at the end applies whichever provider you choose.
What you're migrating away from
As listed on remove.bg's pages in September 2026:
- Endpoint:
POST https://api.remove.bg/v1.0/removebg, authenticated with anX-API-Keyheader. - Input:
image_filefor an upload orimage_urlfor a remote image, plus asizefield. - Output: the image bytes in the response body. Formats are PNG (up to 10 MP), JPG, WebP, or a ZIP with a JPG plus an alpha matte (up to 50 MP).
- Pricing: €9/month for 40 credits on subscription, or €3 for 3 credits one-time. The first 50 API calls each month are free while the API is still up.
- Credits: one-time credits expire at the shutdown. Use them or write them off; they won't move to another provider.
How the request maps
| remove.bg | bgbuster | Notes |
|---|---|---|
POST /v1.0/removebg | POST https://api.bgbuster.com/images/remove-background | |
X-API-Key header | X-Api-Key header | Same header, so only the value changes |
image_file / image_url | input | One field takes either a file or a public URL |
| Image bytes in the response | output=raw | bgbuster defaults to output=url, which returns JSON |
format | format=png or format=webp | For JPEG, see chained edits |
size | No equivalent | bgbuster returns the input's resolution; use a resize operation to change it |
| Tight crop around the subject | trim=true | Trims the empty transparent space around the result |
The main difference is the default response. remove.bg returns image bytes. bgbuster returns JSON with a temporary URL, valid for one day, unless you pass output=raw. To keep your existing response handling unchanged, send output=raw.
Before and after
cURL
# Before: remove.bg
curl -X POST https://api.remove.bg/v1.0/removebg \
-H "X-API-Key: $REMOVE_BG_KEY" \
-F "image_file=@product.jpg" \
-F "size=auto" \
-o product-cutout.png
# After: bgbuster
curl -X POST https://api.bgbuster.com/images/remove-background \
-H "X-Api-Key: $BGBUSTER_API_KEY" \
-F "input=@product.jpg" \
-F "output=raw" \
-F "format=png" \
-o product-cutout.pngNode.js
The official SDK wraps the same endpoint:
import { writeFile } from "node:fs/promises";
import { createClient } from "@bgbuster/sdk";
const client = createClient(process.env.BGBUSTER_API_KEY);
const bytes = await client.removeBackground({
input: "https://example.com/product.jpg",
output: "raw",
format: "png"
});
await writeFile("product-cutout.png", Buffer.from(bytes));If you'd rather not add a dependency, plain fetch works:
const body = new FormData();
body.append("input", "https://example.com/product.jpg");
body.append("output", "raw");
const response = await fetch("https://api.bgbuster.com/images/remove-background", {
method: "POST",
headers: { "X-Api-Key": process.env.BGBUSTER_API_KEY },
body
});
if (!response.ok) {
throw new Error(`bgbuster ${response.status}: ${await response.text()}`);
}
const bytes = Buffer.from(await response.arrayBuffer());Python
import os
import requests
with open("product.jpg", "rb") as image:
response = requests.post(
"https://api.bgbuster.com/images/remove-background",
headers={"X-Api-Key": os.environ["BGBUSTER_API_KEY"]},
files={"input": image},
data={"output": "raw", "format": "png"},
timeout=60,
)
response.raise_for_status()
with open("product-cutout.png", "wb") as f:
f.write(response.content)When you need more than a cutout
If you used remove.bg's background-color or crop parameters, use POST /images/edit instead. It takes the same input and an ordered list of operations, applied in the order you send them. For example, this produces a white-background JPEG no wider than 1200px:
curl -X POST https://api.bgbuster.com/images/edit \
-H "X-Api-Key: $BGBUSTER_API_KEY" \
-F "input=@product.jpg" \
-F 'operations=[{"removeBackground":true},{"background":"#ffffff"},{"resize":{"width":1200}}]' \
-F "format=jpeg" \
-F "quality=85" \
-F "output=raw" \
-o product-white.jpgThe available operations are removeBackground, background (a hex, rgb(), hsl(), or named color), resize, rotate, flip, trim, blur, brightness, contrast, and saturation. /images/edit can also output png, webp, jpeg, gif, and avif. Either endpoint costs one credit per successful request.
Cost
bgbuster sells credit packs with no subscription, and credits never expire. One credit is one successful request. At the pack sizes on the pricing page, that's €0.0033 to €0.0017 per image. For a line-by-line comparison with remove.bg's plans, see bgbuster vs remove.bg.
Migration checklist
- Find every call site. Search your code for
api.remove.bgandremovebg, including background jobs, CMS plugins, and scripts no one has run in months. - Decide on the response mode. Use
output=rawfor a drop-in swap. Useoutput=urlif you'd rather store a link. The URL expires after one day, so copy the file somewhere permanent if you need to keep it. - Map the options you use.
sizehas no equivalent. Background colors and crops move to/images/edit. - Handle the new error codes.
402 INSUFFICIENT_BALANCEmeans you're out of credits, and429means you hit the rate limit (see the API guide for the full list). - Test on your own images. Run a sample of real production images, especially the hard ones: hair, glass, and subjects that match the background. Compare the output side by side before switching traffic.
- Switch before the deadline. Don't wait for the last week of November. Give yourself time to handle edge cases on real traffic while remove.bg still works as a fallback.
Next steps
- Create an account and an API key. No credit card is needed to sign up.
- Copy-paste quickstarts for 8 languages.
- Read the API guide for errors, retries, and rate limits.
