DEV Community

Cover image for remove.bg's API shuts down on 1 December 2026: how to migrate in one line
Afaq Ahmad
Afaq Ahmad

Posted on Edited on

remove.bg's API shuts down on 1 December 2026: how to migrate in one line

TL;DR: remove.bg's standalone website and self-serve API stop on 1 December 2026 at 09:00 CET. If your code calls api.remove.bg, you need a new provider before then. The fastest fix is a drop-in compatible API: change one URL and the key, keep everything else.

Disclosure: I work on NukeBG, one of those drop-in APIs, so the examples below use it. The checklist works for any compatible provider.

What's actually changing

remove.bg is folding into Canva. According to Leonardo.Ai's announcement:

  • The remove.bg website and self-serve API end on 1 December 2026, 09:00 CET (08:00 UTC).
  • Background removal for end users moves into Canva.
  • Self-serve API access moves to Leonardo.Ai, which is a different API with its own endpoints and request format.
  • Enterprise API contracts continue.

So if you have a Shopify app, a WordPress plugin, a Zapier or n8n flow, a product-photo pipeline or a cron job hitting api.remove.bg, it will start failing on that date unless you move it.

Your three options

Three ways to replace the remove.bg API: move to Leonardo.Ai, self-host a model, or use a drop-in compatible API

  1. Move to Leonardo.Ai. The official route. Budget time to rewrite and retest, because the request and response formats differ.
  2. Self-host an open model such as rembg or BiRefNet. No per-image fee, but you own the GPUs, the queue, scaling and edge cleanup.
  3. Use a drop-in compatible API. Same endpoint shape, same parameters, same responses. You change the base URL and the key.

If you just need your existing integration to keep working, option 3 is the least work. The rest of this post shows exactly what that looks like.

The one line that changes

The only line that changes: api.remove.bg becomes api.nukebg.com; same X-Api-Key header, parameters, response headers and error format

- https://api.remove.bg/v1.0/removebg
+ https://api.nukebg.com/v1.0/removebg
Enter fullscreen mode Exit fullscreen mode

The X-Api-Key header stays (with your new key), and so do the parameter names, the response headers and the {"errors": [...]} error format.

cURL

curl -f -H "X-Api-Key: $NUKEBG_API_KEY" \
  -F image_file=@photo.jpg \
  -F size=auto \
  -o no-bg.png \
  https://api.nukebg.com/v1.0/removebg
Enter fullscreen mode Exit fullscreen mode

Python

import os, requests

r = requests.post(
    "https://api.nukebg.com/v1.0/removebg",
    headers={"X-Api-Key": os.environ["NUKEBG_API_KEY"]},
    files={"image_file": open("photo.jpg", "rb")},
    data={"size": "auto"},
)
r.raise_for_status()
open("no-bg.png", "wb").write(r.content)
Enter fullscreen mode Exit fullscreen mode

Node.js

import { openAsBlob } from "node:fs";
import { writeFile } from "node:fs/promises";

const form = new FormData();
form.append("image_file", await openAsBlob("photo.jpg"));
form.append("size", "auto");

const res = await fetch("https://api.nukebg.com/v1.0/removebg", {
  method: "POST",
  headers: { "X-Api-Key": process.env.NUKEBG_API_KEY },
  body: form,
});
await writeFile("no-bg.png", Buffer.from(await res.arrayBuffer()));
Enter fullscreen mode Exit fullscreen mode

PHP

$ch = curl_init("https://api.nukebg.com/v1.0/removebg");
curl_setopt_array($ch, [
  CURLOPT_POST => true,
  CURLOPT_HTTPHEADER => ["X-Api-Key: " . getenv("NUKEBG_API_KEY")],
  CURLOPT_POSTFIELDS => ["image_file" => new CURLFile("photo.jpg"), "size" => "auto"],
  CURLOPT_RETURNTRANSFER => true,
]);
file_put_contents("no-bg.png", curl_exec($ch));
Enter fullscreen mode Exit fullscreen mode

What carries over

remove.bg feature Status Notes
image_file, image_file_b64, image_url ✅ Supported Multipart, urlencoded or JSON. JPG, PNG or WebP up to 25 MB
size ✅ Supported preview up to auto / full (25 MP) and 50mp
format ✅ Supported auto, png, jpg, webp, zip
crop, crop_margin, roi ✅ Supported Same syntax, px or %
scale, position ✅ Supported
channels ✅ Supported rgba cutout or alpha mask
bg_color, bg_image_url, bg_image_file ✅ Supported Hex or colour names
Accept: application/json ✅ Supported Returns result_b64 plus the foreground box
GET /v1.0/account ✅ Supported Same account shape, credits under data.attributes
type, semitransparency, shadow_* ➖ Accepted, ignored Old requests won't break

Response headers carry over too: X-Width, X-Height, X-Credits-Charged, X-Type and the X-Foreground-* bounding box.

Does the output hold up?

Switching providers is pointless if the cutouts get worse. Here is a real product shot, run through the API:

Before: a perfume bottle on a cluttered dresser. After: the same bottle on a transparent background with clean edges

The subject is cut out with a real alpha channel, colour spill is cleaned from the edges, and the product itself is never redrawn. Run one of your own images through both services before you switch and compare them side by side.

Zapier, Make or n8n

Open the HTTP step that calls remove.bg (Zapier Webhooks, Make HTTP or n8n HTTP Request). Change the URL to https://api.nukebg.com/v1.0/removebg and the X-Api-Key value to your new key. Leave every other field as it is.

Migration checklist

Migration checklist: 1. Get a key, 2. Change one line, 3. Test one image, 4. Deploy before 1 December 2026, 09:00 CET

  1. Get a key. New accounts get 50 free credits, no watermark.
  2. Change one line. Base URL plus the X-Api-Key value.
  3. Test one image. Compare it with what you get today.
  4. Deploy before 1 December 2026, 09:00 CET.

What it costs

  • Per image: one successful image is one credit (two for size=50mp), and failed images are free.
  • Monthly plans: from $9 for 1,500 credits.
  • One-off packs: from $25, and those credits never expire.

FAQ

Will my remove.bg API key keep working?
No. Self-serve keys stop working on 1 December 2026. Check remove.bg's own FAQ for what happens to unused credits.

Do I have to rewrite my integration?
Not with a compatible API. With Leonardo.Ai or a self-hosted model, yes.

Is NukeBG affiliated with remove.bg?
No. It's an independent product and not affiliated with remove.bg, Canva or Leonardo.Ai.


The full parameter table, error codes and a countdown are on the migration guide, and the API reference is at nukebg.com/docs.

Migrating some other way, self-hosted or onto Leonardo.Ai? I'd like to hear how it went in the comments.

Top comments (1)

Collapse
 
taimur_khan_441354c7efc16 profile image
Taimur Khan •

been using nukebg for a week, ty for making it free