Migrating from remove.bg Before December 1, 2026: Background Removal APIs on API.market

remove.bg's API page says background removal moves to Leonardo.Ai on Dec 1, 2026. Here is how to switch to async API.market listings: code, costs and gotchas.
Migrating from remove.bg Before December 1, 2026: Background Removal APIs on API.market
Migrating from remove.bg Before December 1, 2026: Background Removal APIs on API.market

If your product calls api.remove.bg, you probably have a date to plan around. The API page on remove.bg currently carries this line: "Starting December 1, 2026, background removal moves to Leonardo.Ai, also part of Canva." The remove.bg FAQ is headed "remove.bg is moving to Canva" and says the team is "migrating remove.bg's background removal functionality into the Canva platform." Neither page spells out what happens to existing API keys, pricing or endpoints after that date. We read both pages on 2026-11-24, and the wording may change, so check them yourself before you build a schedule around them.

This guide is for developers who would rather not wait to find out. It shows how to move a remove.bg integration onto background removal listings on API.market, what changes in the request and response shape, what it costs, and where the migration can bite you. The biggest change is not the URL. remove.bg answers synchronously with the image in the response. The API.market listings covered here are asynchronous: you create a prediction, poll it, then download a file from a short-lived link.

What you are migrating from

The remove.bg API is one HTTP call. You POST to https://api.remove.bg/v1.0/removebg with either an image_file upload or an image_url, send your key in an X-Api-Key header, and the response body is the processed image. According to the remove.bg API page we read on 2026-11-24, the first 50 API calls each month are free, rate limits are up to 500 images per minute (scaled by megapixels), PNG output is capped at 10 megapixels, and JPG, WebP and ZIP go up to 50 megapixels. That page also says 429 responses are not charged.

A typical integration therefore looks like this: take a file, POST it, write the response bytes to disk or object storage, done. No job ids, no polling, no cleanup. That simplicity is what you lose, and it is worth being honest about. You gain choice of model and price, but you take on a small amount of plumbing.

What changes on API.market

Three differences matter in practice.

1. The calls are asynchronous. The listings below follow a create, poll, download pattern. A POST /predictions returns HTTP 201 with an id and a status of starting. You then GET /predictions/{id} until the status is succeeded, failed or canceled. Polling itself costs nothing, but it counts toward the rate limit.

2. Input is an image URL, not a multipart upload. The two listings we tested take a publicly reachable image URL in input.image. If your photos live on a private bucket, generate a signed URL with a lifetime of a few minutes, or host a temporary copy.

3. Output links expire. The result is a URL, not bytes in the response. In an earlier test on 2026-11-17, an output link had been purged within about 20 hours. Download the file as soon as the job succeeds and store it yourself. Never save the output URL in your database as if it were permanent.

Everything goes through one gateway with one key. Requests use the base https://prod.api.market/api/v1/<workspace>/<product> and an x-api-market-key header. You also need an active subscription to each listing you call, and each listing is its own subscription.

Which listing replaces what

remove.bg is a general photo tool, so the closest match is a general photo model. Three listings are worth looking at, and they cover different jobs.

Job Listing Model Price as listed in product docs (checked 2026-11-24)
Photos and product shots Bria Remove Background bria/remove-background $0.023 per output image
Cheaper photo cutouts codeplugtech Background Remover codeplugtech/background-remover $0.0044 per started 4 seconds of processing
Anime, cartoons, illustration Sprited BiRefNet ToonOut sprited/birefnet-toonout $0.0032 per started 2 seconds of processing
Featured API from this guide
Background Removal API (codeplugtech Background Remover)Remove the background from an image by sending a single image URL.
Background removalBy MagicAPI
Lowest plan: $0.0044 per API unit

For a broader comparison that also covers plan-based listings and portrait-only models, see our roundup of the best background removal APIs. This guide stays narrow on purpose: it is about getting off remove.bg without surprises.

One caution on the unit pricing. The Bria listing bills per output image, which is easy to budget. The other two bill by processing time, rounded up to a started block. For ToonOut one unit covers up to 2 seconds, and for codeplugtech one unit covers up to 4 seconds, so a slow image costs more than a fast one. A 2.1 second job on ToonOut is two started blocks, and a 4.5 second job on codeplugtech is two as well. Those unit definitions come from the current product docs, and the public listing page can show placeholder pricing, so confirm the plan and unit on the listing before you subscribe and check your wallet history after your first calls. We have not measured typical processing time for codeplugtech on photos, so its per-image cost on your traffic is a number to measure.

What we ran, and what we did not

Plain labels, since this matters for a migration guide.

  • Executed: On 2026-11-23 a teammate called the Bria listing and the ToonOut listing through the API.market MCP call_api path, with one sample image each. Bria returned an id with status starting, and the poll read succeeded about 6 seconds after creation. ToonOut sat in starting for roughly 30 seconds (a cold start), then processed for 2.1 seconds and succeeded. The ToonOut output was still readable about 4 minutes after completion. The codeplugtech listing was called once on 2026-11-18; we have no processing time from that call.
  • Not executed: The curl, Python and Node blocks in this post were written from those calls and from each listing's own examples. They were not run from a shell with a real key. Treat them as a starting point and run them against your own account before you ship.
  • Not checked: We did not open the two output images and judge edge quality. Quality on your photos is a test you have to run, and a section below shows how.

Step 1: subscribe and get a key

Open the listing page, pick a plan and subscribe, then copy your key from your API.market account. PAYG listings such as Bria have no monthly fee, but "no monthly fee" is not the same as free. Every call is billed from your wallet, so check your balance before you run a batch. If a listing offers a finite free plan, remember it is a one-time trial for that product, not an allowance that refills every month.

Step 2: the first request with curl

This is the Bria photo request. The version string is part of the body, and content_moderation is off in this example.

curl -X POST "https://prod.api.market/api/v1/magicapi/remove-background-bria-remove-background/predictions" \
  -H "Content-Type: application/json" \
  -H "x-api-market-key: YOUR_API_MARKET_KEY" \
  -d '{"version":"bria/remove-background","input":{"image":"https://example.com/photo.jpg","content_moderation":false}}'

A successful create returns HTTP 201 and a body shaped like this (an id and status from the 2026-11-23 call, nothing else added):

{"id":"fkeetmqz39rmt0d217wabdyyx4","model":"bria/remove-background","status":"starting","output":null,"error":null}

Keep that id. Then poll:

curl "https://prod.api.market/api/v1/magicapi/remove-background-bria-remove-background/predictions/PREDICTION_ID" \
  -H "x-api-market-key: YOUR_API_MARKET_KEY"

When the job is done, the response has "status":"succeeded" and output holds a URL to a PNG with a transparent background. In the tested call that arrived about 6 seconds after the create. Do not assume that speed. The ToonOut example above waited about 30 seconds on a cold start, so size your timeouts for worst cases, not the best one.

Step 3: a Python client that survives bad days

A direct port of the remove.bg call would be four lines. The async version needs more, and most of the extra lines exist to avoid double billing and endless loops. Here is a helper that creates a job, polls with a hard ceiling, and returns the PNG bytes.

import time
import requests

KEY = "YOUR_API_MARKET_KEY"
BASE = "https://prod.api.market/api/v1/magicapi/remove-background-bria-remove-background"
HEADERS = {"x-api-market-key": KEY, "Content-Type": "application/json"}


def create_job(image_url: str) -> str:
    r = requests.post(
        f"{BASE}/predictions",
        headers=HEADERS,
        json={"version": "bria/remove-background", "input": {"image": image_url}},
        timeout=30,
    )
    if r.status_code != 201:
        # Do not blindly retry. If the request reached the server,
        # a second create may be billed as a second job.
        raise RuntimeError(f"create failed: HTTP {r.status_code} {r.text[:200]}")
    return r.json()["id"]


def wait_for_output(job_id: str, ceiling: int = 120) -> str:
    deadline = time.monotonic() + ceiling
    while time.monotonic() < deadline:
        r = requests.get(f"{BASE}/predictions/{job_id}", headers=HEADERS, timeout=30)
        r.raise_for_status()
        p = r.json()
        status = (p.get("status") or "").lower()
        if status == "succeeded":
            out = p.get("output")
            url = out[0] if isinstance(out, list) and out else out
            if not isinstance(url, str) or not url.startswith("http"):
                raise RuntimeError(f"job {job_id} succeeded but has no output URL")
            return url
        if status in ("failed", "canceled"):
            raise RuntimeError(f"job {job_id} {status}: {p.get('error')}")
        time.sleep(2)
    raise TimeoutError(f"job {job_id} still running; keep the id and poll later")


def remove_background(image_url: str) -> bytes:
    job_id = create_job(image_url)
    url = wait_for_output(job_id)
    png = requests.get(url, timeout=60)
    png.raise_for_status()
    return png.content  # store this now; the link expires

Three habits in that code are worth copying even if you rewrite everything else. The status check is case-insensitive, because documentation across listings is not consistent about casing. A succeeded job with an empty output is treated as a failure, not a success. And a timeout raises an error that carries the job id, so you can resume polling the same job instead of creating a second one.

Step 4: the same flow in Node

Node 18 and later has fetch built in, so no extra packages are needed.

const KEY = "YOUR_API_MARKET_KEY";
const BASE = "https://prod.api.market/api/v1/magicapi/remove-background-bria-remove-background";
const HEADERS = { "x-api-market-key": KEY, "Content-Type": "application/json" };

async function createJob(imageUrl) {
  const r = await fetch(`${BASE}/predictions`, {
    method: "POST",
    headers: HEADERS,
    signal: AbortSignal.timeout(30000),
    body: JSON.stringify({ version: "bria/remove-background", input: { image: imageUrl } }),
  });
  if (r.status !== 201) throw new Error(`create failed: HTTP ${r.status}`);
  return (await r.json()).id;
}

async function waitForOutput(id, ceilingMs = 120000) {
  const deadline = Date.now() + ceilingMs;
  while (Date.now() < deadline) {
    const r = await fetch(`${BASE}/predictions/${id}`, {
      headers: HEADERS,
      signal: AbortSignal.timeout(30000),
    });
    if (!r.ok) throw new Error(`poll ${id}: HTTP ${r.status}; keep the id, do not resubmit`);
    const p = await r.json();
    const status = String(p.status || "").toLowerCase();
    if (status === "succeeded") {
      const url = Array.isArray(p.output) ? p.output[0] : p.output;
      if (typeof url !== "string" || !url.startsWith("http")) {
        throw new Error(`job ${id} succeeded with no output URL`);
      }
      return url;
    }
    if (status === "failed" || status === "canceled") throw new Error(`job ${id} ${status}: ${p.error}`);
    await new Promise((res) => setTimeout(res, 2000));
  }
  throw new Error(`job ${id} still running; keep the id and poll later`);
}

export async function removeBackground(imageUrl) {
  const id = await createJob(imageUrl);
  const url = await waitForOutput(id);
  const res = await fetch(url, { signal: AbortSignal.timeout(60000) });
  if (!res.ok) throw new Error(`download failed: HTTP ${res.status}`);
  return Buffer.from(await res.arrayBuffer());
}

Step 5: cartoon and anime images

remove.bg was never great at flat illustration, and general photo models can struggle with it too. The ToonOut listing exists for that case. Its request takes a pinned version hash and a resolution. The listing's FAQ says it does not suit photos, so route by content type.

curl -X POST "https://prod.api.market/api/v1/magicapi/anime-background-removal-sprited-birefnet-toonout/predictions" \
  -H "Content-Type: application/json" \
  -H "x-api-market-key: YOUR_API_MARKET_KEY" \
  -d '{"version":"35f7c78ef6338bf4cb94b41a83407ab44e2de7b436b8feafba547235d366a2bb","input":{"image":"https://example.com/character.png","resolution":512}}'

Poll it exactly like the Bria job. In the tested call, the poll response carried created_at, started_at and completed_at timestamps. The gap between the first two was about 29 seconds (the cold start), and the gap between the last two was 2.1 seconds, which is the number that billing cares about. If you use the Python helper above, change BASE, set version to the hash shown, and put {"image": ..., "resolution": 512} in input.

Processing was 2.1 seconds, which is just over one 2-second block. Under the "per started two seconds" rule that is two units ($0.0064) instead of one. We could not confirm the billed amount from the response, so check your wallet history after your first few calls. Using resolution 512 keeps jobs short. Larger values take longer and can cost more.

Mapping remove.bg parameters

If you use more than the basic call, check each option before you flip the switch. This table lists the remove.bg options we could confirm and what we know about the equivalent here. "Not documented" means we did not find it in the listings we read, not that it cannot be done.

remove.bg What to do on API.market
image_file (multipart upload) Send a public image URL instead
image_url input.image
X-Api-Key header x-api-market-key header
size options up to 50MP Not documented for these listings; test your largest images
Output formats PNG, JPG, WebP, ZIP Bria returns a PNG with transparency in the tested call; other formats not documented
add_shadow, shadow_type, shadow_opacity Not documented; add shadows yourself after the cutout
50 free calls per month Not available here. Free plans on API.market are one-time trials per product
Synchronous response Create, poll, download

The practical advice: if you only ever send a URL or file and want a transparent PNG back, the migration is a few hours of work. If you depend on shadow options, background colors or size presets, plan to rebuild those on your side with an image library.

What it costs

Take three illustrative monthly volumes and run the listed prices through them. These are straight multiplications of listing prices, not measured bills, and the time-billed listings depend on how long your images take to process. They assume exactly one started block per image, which is the best case.

Images per month Bria ($0.023 per image) codeplugtech, 1 unit each ($0.0044) ToonOut, 1 unit each ($0.0032)
1,000 $23.00 $4.40 $3.20
10,000 $230.00 $44.00 $32.00
100,000 $2,300.00 $440.00 $320.00

The per-unit columns are lower bounds. If your images need more than one started block, the cost rises in step: ToonOut at two units is $0.0064 per image, and codeplugtech at two units (anything over 4 seconds) is $0.0088. Bria's number does not move: it is $0.023 per output image whatever the processing time, which is why it is the easiest one to forecast. Failed predictions are not billed, according to the listings, but that does not make retries free. A retry that succeeds is a new billed job.

Compare that with what you pay remove.bg today before you decide. We did not read remove.bg's current price list for this post, so we are not putting its numbers next to ours. Pull your last three invoices and compute your own cost per image, because remove.bg's credit bundles and your mix of resolutions both change the answer.

Test quality on your own images first

Marketing samples show the best case, and your catalog has the worst one. Before you cut over, assemble 30 images that include your hardest cases: dark objects on dark floors, glass, white products on white tables, hair, fur, mesh and thin straps. Run each candidate listing on all of them and look at the results on three backgrounds: white, black and mid gray. Halos and leftover fringes that disappear on white show up at once on black.

A cheap automated pass catches the silent failures. Read each result's alpha channel and flag images where almost nothing was kept or almost everything was.

import numpy as np
from PIL import Image


def alpha_report(path):
    a = np.array(Image.open(path).convert("RGBA"))[:, :, 3] / 255.0
    return {
        "kept": float((a > 0.5).mean()),
        "soft_edge": float(((a > 0.05) & (a < 0.95)).mean()),
        "empty": bool((a > 0.5).sum() < 50),
    }

An empty result means the model found no subject. A kept share near 1.0 means the background survived. A very low soft-edge share suggests hard, jagged edges. These numbers tell you which images to inspect by eye; they do not replace looking.

Decide your bar before you start. A sensible one is: the cheapest listing that is acceptable on at least 90 percent of the set, with the failures routed to a second model or a person. Many teams run a two-tier setup, sending everything to the cheaper model and re-running only the flagged images through the more expensive one.

Rollout plan that does not break production

Do not swap endpoints on the last week of November. A safer sequence looks like this.

  1. Wrap the call. Put your remove.bg call behind one function, remove_background(source) -> bytes. Your product code should not know which provider answered.
  2. Add the new provider behind a flag. Implement the async client above as a second backend. Keep remove.bg as the default for now.
  3. Shadow test. For a few days, send a small share of real traffic to both and compare outputs and latency. Log job ids, status, processing time and cost for every new-provider call.
  4. Cut over by content type. Photos to Bria or the codeplugtech listing depending on your test results, illustrations to ToonOut. Keep the old path as a fallback until the date passes and you have seen how remove.bg behaves after it.
  5. Make the job queue idempotent. Because the new path is asynchronous, store the job id before you start polling. After a crash, resume polling the stored id instead of creating a new job.
  6. Alert on wallet balance. PAYG listings stop working when the wallet is empty, which will look like a sudden outage on a Saturday.

Latency deserves its own note. A synchronous remove.bg call blocks for as long as processing takes. The async flow adds at least one poll interval, and the cold start we saw on ToonOut added about half a minute on a single call. If a user is waiting on the page, show progress and poll from the server rather than holding a request open, or run the job in a background worker and notify the client when it finishes.

Error handling reference

Symptom Likely cause What to do
Create returns something other than 201 Bad input, missing subscription, empty wallet or a gateway error Read the body, fix the cause, and only then resubmit. If the response was lost, check usage before creating again
Job stays in starting for 30 seconds or more Cold start Keep polling the same id up to your ceiling
succeeded but output is null or empty Not a usable result Treat as failed, log the id, do not loop
failed status Unreachable image URL, unsupported file or upstream error Read error, check the URL is public and the file is a normal image
Output link returns 404 The link expired Download right after success and store the file
429 Too many requests, polls included (Bria and ToonOut list 10 requests per second) Poll every 2 seconds, back off on 429, respect any Retry-After header as a number of seconds
Wallet or quota error PAYG balance used up or a hard plan limit reached Top up at the billing page or change plans

A word about retries, because billing makes them dangerous. Never automatically repeat a create call after a timeout or a dropped connection. The first request may have been accepted and billed. Check the job list or your usage first, and when in doubt, wait. A short polling ceiling with a clear error message beats a loop that quietly creates ten paid jobs.

Which listing should you pick?

  • Product photos and general photos, with a simple budget: Bria. One price per output image and no time-based surprises.
  • High volume photos where price matters most: run the codeplugtech listing on your test set, and keep it if the edges pass your bar. Measure how many 4-second blocks your images really use.
  • Anime, cartoons, game art, flat illustration: ToonOut with resolution 512 to start.
  • Mixed catalogs: route by content type, since no one model wins everywhere.

FAQ

Is remove.bg really shutting down on December 1, 2026?

We can only say what the sites say. The remove.bg API page says that starting December 1, 2026, background removal moves to Leonardo.Ai, which is also part of Canva. The FAQ says remove.bg is moving to Canva. Neither page states what happens to API keys or pricing. Contact remove.bg support or read the current documentation for the details that affect you.

Can I keep using the same request format?

No. The request is a JSON body with version and input, not a multipart form, and the response is a job, not an image. A wrapper function hides the difference from the rest of your code.

How long does a job take?

In the calls we ran on 2026-11-23, Bria finished in about 6 seconds end to end, and ToonOut took about 30 seconds including a cold start and then 2.1 seconds of processing. Those are single samples. Measure your own.

Do I have to download the result right away?

Yes. Treat the output link as temporary. In an earlier test a link was gone after about 20 hours, and the listings do not promise a retention period.

Is there a monthly free allowance like remove.bg's 50 calls?

Not in the listings covered here. Where a listing has a finite free plan it is a one-time trial per product. PAYG listings charge for every call.

Which one handles hair best?

We did not test hair, so we will not claim a winner. Put your own portraits in the 30-image test set and compare the edges at full zoom.

Can I run this from an AI agent?

The listings can be called through the API.market MCP server with the same key. If an agent will run batches, give it a hard cap on the number of images per run, because a loop on a PAYG listing spends real money.

What if I need more than one model?

Use the same key for all of them and route by content type. Switching listings changes the URL path, the version value and the input fields, and nothing else about your account.

Ready to try it? Subscribe to Bria Remove Background, send the curl call above with one of your own photos, and compare the result with what remove.bg gives you today. If you also process illustrations, add the ToonOut listing to the same test, and look at the codeplugtech listing if cost per photo is your main concern.