Best Background Removal APIs 2026: Pricing & Code Examples

Compare 5 background removal APIs on pricing, free trials and output options. Includes curl, Python and Node examples for each, all on API.market.
Best Background Removal APIs 2026: Pricing & Code Examples
Best Background Removal APIs 2026: Pricing & Code Examples

Background removal is one of those jobs that looks small until you ship it. Product photos for a catalog, avatars for a team page, cutouts for a design tool. You need a transparent PNG back, fast, and you do not want to host a segmentation model yourself.

A search for "background removal" in the API.market catalog returned 99 listings on 2026-11-17, a few of them video. Most are variations on a handful of models, so here is a short list of five that are meaningfully different, with real prices and the catches in their docs. This post covers API.market listings only. Plans, prices and limits below were re-read from each listing and its plan table on 2026-11-17. After the reviews you will find what each plan costs per image at real volumes, a complete catalog pipeline that standardizes product photos onto white squares, a way to test cutout quality on your own images, a list of the other listings worth knowing about, and a troubleshooting section for the problems that actually show up.

Quick comparison

API Model / approach Pricing Input Output options
Instant Background Removal (avanger) Rembg (U-2-Net) Free trial of 1,000 calls (hard limit); Pro $5 (5,000); Mega $10 (12,000) URL or file upload, max 5 MB Transparent PNG
Universal Background Removal (AILabTools) AILabTools cutout model Basic trial of 10 calls; Pro $9.9 (7,920), Ultra $39.9, Mega $99.9 File upload, max 3 MB Transparent PNG, mask, white background, cropped
Background Removal API (Sprited BiRefNet) BiRefNet, 11 variants PAYG, $0.0022 per 2 seconds of processing Image URL (GIF and WebP too) Cutout or mask
Background Removal API (Bria Remove Background) Bria AI PAYG, $0.023 per image Image URL Cutout
Portrait Background Removal API (pollinations MODNet) MODNet portrait matting PAYG, $0.0012 per request up to 4 seconds Image URL Person cutout (PNG)

Pricing and limits are as listed on each API.market page. Check the listing before you commit, sellers change plans. The two plan-based listings show their price and call allowance in the plan table but not the billing period, so confirm that on the plan card before you budget a month.

1. Instant Background Removal (avanger): best for trying it for free

Instant Background Removal is the easiest one to start with. It comes with a free plan of 1,000 calls. That plan is a hard limit and, as with other finite public free plans on API.market, it is a one-time trial per account for this product, not a monthly allowance that refills. It takes either a public image URL (GET /image/url?url=...) or a file upload (POST /image/file), and returns JSON with a download_url to a transparent PNG.

Paid plans are small and have soft limits: Pro is $5 for 5,000 calls and Mega is $10 for 12,000. A soft limit means going over is not blocked, but the plan data does not state the overage rate, so ask the seller before you count on it.

The catches: images are capped at 5 MB, and the result file is deleted after one hour. So download it right away, don't store the link in your database.

The examples below follow each listing's documented request format and were not run for this post. For this listing, requests go through the API.market gateway at https://prod.api.market/api/v1/avanger/backremove, followed by the endpoint path.

curl -G "https://prod.api.market/api/v1/avanger/backremove/image/url" \
  -H "x-api-market-key: YOUR_API_MARKET_KEY" \
  --data-urlencode "url=https://example.com/product.jpg"
import requests

API_KEY = "YOUR_API_MARKET_KEY"
BASE_URL = "https://prod.api.market/api/v1/avanger/backremove"
r = requests.get(
    f"{BASE_URL}/image/url",
    headers={"x-api-market-key": API_KEY},
    params={"url": "https://example.com/product.jpg"},
)
r.raise_for_status()
body = r.json()
if body.get("status") != "success" or not body.get("download_url"):
    raise RuntimeError(f"no usable result: {body}")
png = requests.get(body["download_url"]).content
open("cutout.png", "wb").write(png)
const BASE_URL = "https://prod.api.market/api/v1/avanger/backremove";
const res = await fetch(
  `${BASE_URL}/image/url?` +
    new URLSearchParams({ url: "https://example.com/product.jpg" }),
  { headers: { "x-api-market-key": "YOUR_API_MARKET_KEY" } }
);
const { status, download_url } = await res.json();
if (status !== "success" || !download_url) throw new Error("no usable result");
console.log(download_url);

A successful response is JSON with status, message, view_url, download_url and a timestamp. The listing also has a GET /ping health check you can use to confirm your key and subscription work before you send real images.

The listing says it uses Rembg (U-2-Net) and calls the output high accuracy. It does not publish test results, so judge edges on your own photos, hair and fine edges especially.

2. Universal Background Removal (AILabTools): best for output flexibility

Universal Background Removal is the one to pick when you need more than a plain cutout. One parameter, return_form, switches the output:

Most popular in this guide
Universal Background RemovalUniversal Background Removal is a powerful api that effortlessly removes backgrounds from images, perfect for creating professional-looking photos and designs.
Background removalBy AILabTools
15subscribers
4.7KAPI calls
Lowest plan: 10 FREE API units
  • default: four-channel transparent PNG
  • mask: single-channel mask
  • whiteBK: subject on a white background (handy for marketplace listings that demand white)
  • crop: transparent PNG trimmed to the subject

Plans: Basic is free with 10 calls (a trial, not a monthly refill), Pro is $9.9 for 7,920 calls, Ultra is $39.9 for 39,900 and Mega is $99.9 for 114,170. All four are hard limits, so a plan that runs out stops instead of billing overage. It is also the most used of the five on API.market, with 4,721 calls and 15 subscribers in the catalog on 2026-11-17.

Limits to know: files only (no URL input), 3 MB max, resolution between 32x32 and 2000x2000 with the longest side at most 1999 px. Accepted formats are JPEG, JPG, BMP, WEBP and PNG, and a PNG must be 8-bit (16-bit and 64-bit PNGs are not supported).

curl -X POST \
  "https://prod.api.market/api/v1/ailabtools/universal-background-removal/cutout/universal/common-image" \
  -H "accept: application/json" \
  -H "x-api-market-key: YOUR_API_MARKET_KEY" \
  -F "[email protected];type=image/jpeg" \
  -F "return_form=whiteBK"

The response includes data.image_url. A non-zero error_code means the request failed, so check that before reading the URL, and check that the URL is there.

import requests

url = ("https://prod.api.market/api/v1/ailabtools/universal-background-removal"
       "/cutout/universal/common-image")
with open("product.jpg", "rb") as f:
    r = requests.post(
        url,
        headers={"x-api-market-key": "YOUR_API_MARKET_KEY"},
        files={"image": ("product.jpg", f, "image/jpeg")},
        data={"return_form": "crop"},
    )
body = r.json()
if body.get("error_code") != 0:
    raise RuntimeError(body.get("error_detail"))
image_url = (body.get("data") or {}).get("image_url")
if not image_url:
    raise RuntimeError("success code but no image_url in the response")
print(image_url)

3. Sprited BiRefNet: best for control and odd image types

The Sprited BiRefNet listing exposes BiRefNet with 11 variants. That sounds like a lot, but it is practical: portrait and matting for people and hair, toonout for anime and illustrations, general-hr for big images, lite when you care about speed. Those are the uses the listing names for each variant. It also takes animated GIF and WebP and hands back an animated WebP with transparency, which the other four listings here do not document.

You can also soften or tighten edges (mask_blur, mask_offset) and turn on refine_fg to reduce colour bleed on soft edges.

Pricing is pay as you go at $0.0022 per API unit, where one unit is a request with up to 2 seconds of processing. A longer request uses one unit per started 2 seconds. The listing's own example (a portrait variant that took 10.6 seconds) cost $0.0132, which is 6 units. HR and 2K variants, larger resolution values and animated inputs take longer and can use more units. Failed predictions are not billed and there is no monthly fee.

It is asynchronous: you POST to /predictions, get a 201 and an id, then poll GET /predictions/{id} until status is succeeded. Then check that output really holds a URL.

import time, requests

API_KEY = "YOUR_API_MARKET_KEY"
BASE = "https://prod.api.market/api/v1/magicapi/background-removal-api-sprited-birefnet"
H = {"x-api-market-key": API_KEY, "Content-Type": "application/json"}

job = requests.post(f"{BASE}/predictions", headers=H, json={
    "version": "21f2c4a9159af128ab9b9126401eebe7f8c5310841ed628b74a4c462df00da67",
    "input": {"image": "https://example.com/portrait.png", "variant": "portrait"},
}, timeout=30)
if job.status_code != 201:
    raise RuntimeError(f"create HTTP {job.status_code}; investigate before resubmitting")
pid = job.json()["id"]

deadline = time.monotonic() + 120
while time.monotonic() < deadline:
    remaining = deadline - time.monotonic()
    r = requests.get(f"{BASE}/predictions/{pid}", headers=H, timeout=min(30, max(0.001, remaining)))
    r.raise_for_status()
    p = r.json()
    if p.get("status") == "succeeded":
        output = p.get("output")
        url = output[0] if isinstance(output, list) and output else output
        if not isinstance(url, str) or not url.startswith(("https://", "http://")):
            raise RuntimeError(f"prediction {pid} succeeded but has no output URL")
        print(url)
        break
    if p.get("status") in ("failed", "canceled"):
        raise RuntimeError(f"prediction {pid}: {p.get('error') or p['status']}")
    time.sleep(min(1, max(0, deadline - time.monotonic())))
else:
    raise TimeoutError(f"keep prediction {pid} and resume polling later; do not resubmit")
const BASE = "https://prod.api.market/api/v1/magicapi/background-removal-api-sprited-birefnet";
const headers = { "x-api-market-key": "YOUR_API_MARKET_KEY", "Content-Type": "application/json" };

const create = await fetch(`${BASE}/predictions`, {
  method: "POST", headers, signal: AbortSignal.timeout(30000),
  body: JSON.stringify({
    version: "21f2c4a9159af128ab9b9126401eebe7f8c5310841ed628b74a4c462df00da67",
    input: { image: "https://example.com/portrait.png", variant: "portrait" },
  }),
});
if (create.status !== 201) throw new Error(`create HTTP ${create.status}; investigate before resubmitting`);
const { id } = await create.json();
if (typeof id !== "string" || !id) throw new Error("create response has no prediction id");

let finished = false;
const deadline = Date.now() + 120000;
while (Date.now() < deadline) {
  const poll = await fetch(`${BASE}/predictions/${id}`, {
    headers, signal: AbortSignal.timeout(Math.max(1, Math.min(30000, deadline - Date.now()))),
  });
  if (!poll.ok) throw new Error(`poll ${id}: HTTP ${poll.status}; keep id, do not resubmit`);
  const p = await poll.json();
  if (p.status === "succeeded") {
    const url = Array.isArray(p.output) ? p.output[0] : p.output;
    if (typeof url !== "string" || !/^https?:\/\//.test(url)) throw new Error(`prediction ${id} has no output URL`);
    console.log(url); finished = true; break;
  }
  if (p.status === "failed" || p.status === "canceled") throw new Error(p.error);
  await new Promise(r => setTimeout(r, Math.min(1000, Math.max(0, deadline - Date.now()))));
}
if (!finished) throw new Error(`keep prediction ${id} and resume polling later; do not resubmit`);

Rate limit on this one is 10 requests per second, and polling counts toward it, so poll every second or two, not in a tight loop.

4. Bria Remove Background: best when you want one simple price

Bria's listing is the plain option. Send an image URL, get one image back. It costs $0.023 per image, flat, whatever the settings. For a request that finishes inside one 2-second block on the BiRefNet listing ($0.0022), that is about ten times as much per image, so it only makes sense if you want Bria's model specifically or prefer billing per image instead of per second.

Same async flow as above, with version set to bria/remove-background. A few details from the docs: you can pass the image as image or image_url, preserve_alpha (default true) keeps any transparency already in your input, content_moderation is off by default, and preserve_partial_alpha is deprecated and does nothing.

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/product.png"}}'

Then poll GET /predictions/{id} the same way as in the BiRefNet example, including the check that output is present.

5. MODNet portrait matting: best for people only

Portrait Background Removal API (pollinations MODNet) is a portrait-specific listing that separates a person from the background without a trimap or any hand-drawn hints. The only input is image, a public URL (jpeg, png, gif or webp), and the result is one PNG URL where the person stays and the background is transparent. There is no field for a replacement background, so if you want a new one you composite it yourself.

It is pay as you go with no monthly fee: $0.0012 per request covering up to 4 seconds of processing, with one extra unit for each started 4-second block after that. The listing's example took 1.74 seconds and cost $0.0012. Failed predictions are not billed, and all plans allow 10 requests per second. Like the BiRefNet and Bria listings it is asynchronous, so you POST to /predictions, then poll GET /predictions/{id}.

curl -X POST "https://prod.api.market/api/v1/magicapi/background-removal-new-background-pollinations-modnet/predictions" \
  -H "Content-Type: application/json" \
  -H "x-api-market-key: YOUR_API_MARKET_KEY" \
  -d '{"version": "da7d45f3b836795f945f221fc0b01a6d3ab7f5e163f13208948ad436001e2255", "input": {"image": "https://example.com/portrait.png"}}'

The listing says plainly that MODNet is a portrait model and is not meant for products or scenes without people. If you also handle products or animals, start with one of the general models above.

What each plan costs per image

Background removal bills in three different ways: plan calls (AILabTools, avanger), processing time (BiRefNet, MODNet) and per image (Bria). To compare them, convert everything to cost per image. The plan-based rows assume you use the whole allowance, and that the plan price repeats each billing period (confirm the period on the plan card). The free plans are one-time trials, so they are left out of the recurring math.

Option Plan Price Included Cost per image
avanger Pro $5 5,000 $0.00100
avanger Mega $10 12,000 about $0.00083
AILabTools Pro $9.9 7,920 about $0.00125
AILabTools Ultra $39.9 39,900 $0.00100
AILabTools Mega $99.9 114,170 about $0.00088
Sprited BiRefNet PAYG none per 2 s of processing $0.0022 for a fast image, more for slow ones
MODNet PAYG none per 4 s of processing $0.0012 for a fast portrait
Bria PAYG none per image $0.023

Now run three monthly volumes through it.

1,000 images a month (a small shop refreshing a catalog). avanger's free 1,000 calls cover the first month only, because the free plan is a one-time trial. After that, avanger Pro at $5 is the cheapest plan route. AILabTools Pro at $9.9 costs about twice as much but gives you white background and crop outputs. BiRefNet at one unit per image would be $2.20, but a portrait that takes 10.6 seconds is six units ($0.0132), so a 1,000 image month with slower images could land closer to $13. Bria would be $23.

10,000 images a month (a marketplace seller onboarding products). avanger Mega at $10 covers 12,000. AILabTools Pro's 7,920 is not enough, so you move to Ultra at $39.9. BiRefNet at one unit per image is $22, and Bria is $230.

100,000 images a month (a platform with user uploads). AILabTools Mega at $99.9 covers 114,170. avanger Mega includes 12,000 and its overage rate is not stated in the plan data, so confirm that with the seller before relying on it at this volume. BiRefNet at one unit per image is $220, and Bria is $2,300.

The cost spread between the cheapest and priciest option is more than twenty times at volume, so the real question is how much cutout quality is worth to you. The next sections show how to measure that on your own images instead of guessing.

Build a product photo pipeline

Here is an illustrative catalog workflow: take a folder of raw product photos, remove the background, place the product centered on a white 1000 by 1000 square with padding, and save a JPEG ready for upload. We use AILabTools' crop output because it hands back a transparent PNG trimmed to the subject, which makes the centering step easy. Start on the free Basic plan with a handful of images before you point it at a whole catalog, and remember that its 10 calls are a one-time trial. The code below follows the listing docs and was not run for this post.

Plain picture frames with potted plants moving along a conveyor, the grey checkerboard backdrop giving way to clean white at the end, with a square white canvas waiting

Step 1: Pre-check the files

The API has hard input limits. Check them before spending a call.

from pathlib import Path
from PIL import Image

MAX_BYTES = 3 * 1024 * 1024
MAX_SIDE = 1999
MIN_SIDE = 33  # the listing wants more than 32x32


def prepare(path: Path) -> Path | None:
    img = Image.open(path)
    if min(img.size) < MIN_SIDE:
        return None  # too small for this listing; do not upscale it blindly
    if path.stat().st_size > MAX_BYTES or max(img.size) > MAX_SIDE:
        img = img.convert("RGB")
        img.thumbnail((MAX_SIDE, MAX_SIDE))
        out = path.with_suffix(".prep.jpg")
        quality = 90
        while True:
            img.save(out, "JPEG", quality=quality)
            if out.stat().st_size <= MAX_BYTES or quality <= 50:
                break
            quality -= 10
        return out if out.stat().st_size <= MAX_BYTES else None
    return path

Shrinking before upload also helps cost and speed on the time-billed listings. Do not shrink below the detail you need: a 600 pixel product cutout will look soft if you later place it on a 1000 pixel canvas.

Step 2: Call the API and download immediately

import io
import time
import requests

URL = ("https://prod.api.market/api/v1/ailabtools/universal-background-removal"
       "/cutout/universal/common-image")
HEADERS = {"x-api-market-key": "YOUR_API_MARKET_KEY"}


def cutout(path: Path, attempts: int = 3) -> Image.Image:
    # Only a 429 is retried. A 5xx or a timeout may or may not have used a
    # call from your plan, and the listing does not say, so we stop instead.
    delay = 2.0
    for _ in range(attempts):
        with open(path, "rb") as f:
            r = requests.post(
                URL,
                headers=HEADERS,
                files={"image": (path.name, f, "image/jpeg")},
                data={"return_form": "crop"},
                timeout=60,
            )
        if r.status_code == 429:
            time.sleep(delay)
            delay *= 2
            continue
        r.raise_for_status()
        body = r.json()
        if body.get("error_code", 0) != 0:
            raise ValueError(body.get("error_detail", "unknown error"))
        image_url = (body.get("data") or {}).get("image_url")
        if not image_url:
            raise ValueError("success code but no image_url")
        png = requests.get(image_url, timeout=60).content
        return Image.open(io.BytesIO(png)).convert("RGBA")
    raise RuntimeError(f"gave up on {path.name}")

Download the result inside the same function. Result links are temporary on avanger (deleted after an hour), and the other listings do not state how long a link lasts, so store the file, not the link. Storing a link is how catalogs end up with broken images a week later.

Step 3: Center on a white square

def to_square(cut: Image.Image, size: int = 1000, padding: float = 0.08) -> Image.Image:
    canvas = Image.new("RGB", (size, size), "white")
    box = int(size * (1 - 2 * padding))
    cut = cut.copy()
    cut.thumbnail((box, box))
    x = (size - cut.width) // 2
    y = (size - cut.height) // 2
    canvas.paste(cut, (x, y), cut)  # use the alpha channel as the mask
    return canvas

Pasting with the cutout as its own mask keeps soft edges blended onto the white instead of leaving a halo.

Step 4: Run the folder

src = Path("raw")
dst = Path("clean")
dst.mkdir(exist_ok=True)
failed = []

for p in sorted(src.glob("*.jpg")):
    out = dst / (p.stem + ".jpg")
    if out.exists():
        continue  # makes the job restartable and avoids paying twice
    try:
        prepped = prepare(p)
        if prepped is None:
            failed.append((p.name, "outside the listing's size limits"))
            continue
        to_square(cutout(prepped)).save(out, "JPEG", quality=92)
    except Exception as exc:
        failed.append((p.name, str(exc)))
    time.sleep(0.3)

print(f"done, {len(failed)} failed")
for name, why in failed:
    print(name, why)

The out.exists() check is the cheapest cost control in the whole script. Without it, a crash at image 800 means paying for the first 800 again.

The same idea in Node.js

If your stack is Node, sharp does the compositing. This sketch takes a cutout PNG buffer you already downloaded and places it on a white square.

import sharp from "sharp";

export async function toSquare(cutoutPng, size = 1000, padding = 0.08) {
  const box = Math.round(size * (1 - 2 * padding));
  const resized = await sharp(cutoutPng)
    .resize(box, box, { fit: "inside" })
    .toBuffer();
  return sharp({
    create: { width: size, height: size, channels: 3, background: "#ffffff" },
  })
    .composite([{ input: resized, gravity: "center" }])
    .jpeg({ quality: 92 })
    .toBuffer();
}

Testing cutout quality on your own images

Marketing pages show the best case. Your catalog has the worst case: black shoes on a dark floor, glass bottles, white mugs on white tables, fur, mesh and fine straps. Before you pick, build a small test set of 30 images that includes your hardest ones, and run each candidate on all of them.

A useful way to score the results without staring at 150 images:

import numpy as np
from PIL import Image


def alpha_stats(png_path):
    a = np.array(Image.open(png_path).convert("RGBA"))[:, :, 3] / 255.0
    return {
        "coverage": float((a > 0.5).mean()),       # share of image kept as subject
        "soft_edge": float(((a > 0.05) & (a < 0.95)).mean()),  # semi-transparent pixels
        "empty": bool((a > 0.5).sum() < 50),       # nothing detected
    }

Coverage that is wildly different between candidates on the same photo points to one of them cutting too much or leaving background behind. A very low soft-edge share usually means hard, jagged edges. An empty result means the model found no subject at all, and it is the check that catches a "succeeded" job that returned nothing usable. Use the numbers to find the images worth looking at, then look at them on three backgrounds: white, black and a mid gray. Halos and leftover fringes that vanish on white show up immediately on black.

What to check by eye:

  • Hair and fur: fine strands should be partly transparent, not chopped into a hard outline.
  • Transparent and reflective objects: glass, plastic bottles and chrome often lose their edges or become fully opaque.
  • Shadows: decide whether you want the shadow gone (usually yes for a catalog) or preserved. Some models leave a gray smear.
  • Holes: handles, straps and gaps between legs should show the new background through them.
  • Colour fringe: a green or colored edge from the old background. BiRefNet's refine_fg option exists for this.

Pick the cheapest candidate that passes your own bar on at least 90 percent of the set, and route the remaining failures to a second model or a human. A two-tier setup is common: send everything to the cheap option, flag images where empty is true or coverage looks off, and rerun only those through a better one.

Other background removal listings worth knowing

The same catalog search on 2026-11-17 surfaced the listings below. The descriptions come from each listing's catalog entry and pricing label only. Open the listing for its exact inputs, limits and prices before you build on one, and run it through the test set above.

Listing What the catalog says
AILabTools Product Background Removal Aimed at e-commerce product images, 10 free trial calls
AILabTools Human Background Removal Portraits for profiles and resumes, 10 free trial calls
AILabTools Food Background Removal Food images for menus and ads, 10 free trial calls
Bria Product Cutout Product photos to transparent PNG, PAYG per image returned
Recraft Remove Background Photos, product shots and AI-generated images, PAYG per image returned
smoretalk Rembg Enhance A rembg model enhanced for better matting, PAYG
lucataco Remove BG Any image to a PNG, PAYG
codeplugtech Background Remover Single image URL in, PAYG
Bria Video Remove Background Video with transparent or solid-color background, billed per second of output video
Segment GPU (SAM-2) Image segmentation and background removal with SAM-2, 100 free trial calls

If you cut a single category all day, such as food or products, a category-specific listing may beat a general model, and the way to find out is the test set above.

Error handling

Symptom Likely cause What to do
error_code non-zero in an AILabTools response Input outside limits (size, resolution, bit depth) or an unreadable image Read error_detail, resize or re-encode the image, do not retry unchanged
Upload rejected on a large file File over 3 MB (AILabTools) or 5 MB (avanger) Compress before upload
download_url returns 404 later avanger deletes results after one hour Download immediately and store the file
Success status but no output, download_url or image_url A result that is not usable Treat it as a failure. Log the request or prediction id and ask the seller. Do not resubmit in a loop
Prediction stuck in processing Large image or slow variant Keep polling the same id with a sensible ceiling, such as 120 seconds, then stop and log the id. Do not create a second job automatically, because the first may still be billed
failed status on a BiRefNet, Bria or MODNet prediction Bad URL, unsupported file or upstream error Read error; failed predictions are not billed per the listings
429 Over the request rate (10 per second on BiRefNet, Bria and MODNet, polls included) Slow down, poll every 1 to 5 seconds
An error saying you are not allowed or out of quota Plan allowance used up on a hard-limit plan, or no subscription to that listing Check usage and subscriptions; each listing is its own subscription. The listings do not document the exact status code

Troubleshooting

The edges have a white or colored halo on a dark page. The cutout was made against a light background and the fringe survived. Try a variant meant for matting, turn on refine_fg on BiRefNet, or erode the mask a pixel or two (mask_offset). Check on a black background, not white, before you decide it is fine.

Part of the product disappeared. Very common with thin straps, transparent plastic and objects the same color as the background. Retake the photo against a contrasting backdrop, or send those images to a model with a matting variant.

A shadow is left behind. Some models treat the shadow as part of the object. If you need a clean cutout, shoot with softer light, or run a mask cleanup that drops pixels with low alpha and gray color.

It works on 95 images and fails on the rest. Group the failures. Often they share one trait: all huge, all CMYK, all progressive JPEGs, all very dark. Convert to RGB, resize, and retry that group.

The result looks soft after compositing. You scaled a small cutout up. Keep the source resolution high enough that you only ever scale down.

Costs are higher than the math said. On time-billed BiRefNet and MODNet, a slow variant or a large image costs more than one unit. Log the processing time per call for a week and compare it to your bill. On hard-limit plans, check whether retries counted against your plan allowance.

Migration notes

Moving from a self-hosted model or another API takes a bit of care.

  1. List your inputs. Do you send URLs or files? AILabTools takes files only. avanger takes both. BiRefNet, Bria and MODNet take URLs, so your images need to be reachable by a public link.
  2. List your outputs. If your pipeline expects a PNG with alpha, all of these deliver it, but BiRefNet can return an animated WebP for GIF input, and AILabTools can return a mask or a white-background image directly.
  3. Handle sync versus async. avanger and AILabTools answer in one request. BiRefNet, Bria and MODNet use predictions you poll. Wrap both behind one remove_background(path) function so the rest of your code never knows the difference.
  4. Keep the old path as a fallback. Run both for a week on a sample, compare, then switch.
  5. Watch plan type. A hard-limit plan stops the day you hit the cap. If background removal is on your checkout path, either choose a soft-limit or PAYG listing or add monitoring and an alert at 80 percent of the plan allowance.

Which one should you pick?

  • Just testing an idea: avanger's free 1,000-call trial.
  • Ecommerce, need white backgrounds or cropped output: AILabTools.
  • Portraits, hair, anime, GIFs, or you want to tune edges: Sprited BiRefNet.
  • You specifically want Bria: the Bria listing.
  • Only people, nothing else: the MODNet listing, at about a tenth of a cent per portrait.

All of these go through the same gateway, so you use one API.market key and the same x-api-market-key header. Switching between them is a URL and a payload change, not a new account. That makes it cheap to run the same ten of your own images through two or three and compare edges before you pick.

FAQ

What is the cheapest background removal API on API.market?

Per image at plan volume, the avanger listing (about $0.0008 to $0.001 per image on its paid plans) and AILabTools (about $0.0009 to $0.00125) are the cheapest we found among the five reviewed, if you use the full allowance. MODNet is $0.0012 per fast portrait, and BiRefNet is cheap for fast images at $0.0022 per 2 seconds. Bria is the most expensive of the five at $0.023 per image.

Is there a free background removal API?

There are free trials, not free monthly allowances. avanger gives 1,000 free calls on a hard-limit plan, one trial per account for that product. AILabTools' Basic plan has 10 free calls, which is enough to test but not to run a project.

Which API handles hair best?

The BiRefNet listing has portrait and matting variants made for people and hair, and a refine_fg option for soft edges. MODNet is also built for portrait matting, including soft edges such as hair. Test them against AILabTools and Bria on your own photos, since results depend on the image and none of the listings publishes a comparison.

Can I get a white background directly?

Yes, with AILabTools' return_form=whiteBK. Otherwise cut out a transparent PNG and composite it yourself, as in the pipeline above.

Can I remove backgrounds from GIFs or video?

BiRefNet accepts animated GIF and WebP input and returns animated WebP with transparency, and its listing says video files are not supported. For video, there is a separate Bria video listing billed per second of output video.

Do I need to host the images myself?

For avanger, you can send a URL or upload a file. For AILabTools you upload a file. For BiRefNet, Bria and MODNet you send an image URL, so the image must be publicly reachable. Results from avanger expire after an hour, so download them right away.

How do I keep costs predictable?

Cache results by a hash of the input image so you never process the same photo twice, make your batch job restartable, size hard-limit plans for your busiest month, and alert before you reach the cap.

Is the output good enough for print?

It depends on the model and the image. Always test your hardest photos at the final output size and review the edges at full zoom. Do not assume a clean look at thumbnail size means a clean look at full resolution.

Can I use these from an AI agent?

The listings in this post can be read through the API.market MCP server with the same key. If an agent will call them, set a per-run limit on the number of images, since a loop can burn through a hard-limit plan quickly.

Want to try one? Start with Instant Background Removal, grab a key, and run your own images through it.