logobgbuster
Blog

Migrating off the remove.bg API before December 1, 2026

remove.bg's standalone API shuts down on December 1, 2026. Here's how its requests map to bgbuster's, with before-and-after code in cURL, Node.js, and Python.

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 an X-API-Key header.
  • Input: image_file for an upload or image_url for a remote image, plus a size field.
  • 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.bgbgbusterNotes
POST /v1.0/removebgPOST https://api.bgbuster.com/images/remove-background
X-API-Key headerX-Api-Key headerSame header, so only the value changes
image_file / image_urlinputOne field takes either a file or a public URL
Image bytes in the responseoutput=rawbgbuster defaults to output=url, which returns JSON
formatformat=png or format=webpFor JPEG, see chained edits
sizeNo equivalentbgbuster returns the input's resolution; use a resize operation to change it
Tight crop around the subjecttrim=trueTrims 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.png

Node.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.jpg

The 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

  1. Find every call site. Search your code for api.remove.bg and removebg, including background jobs, CMS plugins, and scripts no one has run in months.
  2. Decide on the response mode. Use output=raw for a drop-in swap. Use output=url if you'd rather store a link. The URL expires after one day, so copy the file somewhere permanent if you need to keep it.
  3. Map the options you use. size has no equivalent. Background colors and crops move to /images/edit.
  4. Handle the new error codes. 402 INSUFFICIENT_BALANCE means you're out of credits, and 429 means you hit the rate limit (see the API guide for the full list).
  5. 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.
  6. 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

Try the bgbuster API

Pay per image, no subscription, credits that never expire.

See pricing