Unlimited Open Source Models

Get Plan
Skip to main content
Imagen

AI Background Remover API: Remove BG for $0.0047/Image

Last updated · By ModelsLab Engineering

The ModelsLab background remover API takes one image per call — a URL or base64 — and returns a PNG with the background removed, or only the mask. It costs $0.0047 per image on plans from $21/month, and each image takes under 5 seconds of GPU time.

  • $0.0047 per image
  • PNG with transparency, or the mask only
  • Plans from $21/month

Background Remover API Spec

What the endpoint accepts and returns, read from the running API.

SpecModelsLab background remover API
EndpointPOST /api/v6/image_editing/removebg_mask
Price$0.0047 per image, on plans from $21/month
Inputimage: one image URL, or base64 with base64: true (up to 10 MB)
OutputPNG with the background removed; only_mask: true returns the mask; inverse_mask flips it
Edge optionsalpha_matting, with foreground (0–240), background (0–20) and erode (0–5) thresholds; post_process_mask
Images per callOne
DeliveryFile URL in the response, fetch by id, or webhook

Read on October 15, 2026. The model is the open-source rembg library on ModelsLab GPUs; the alpha matting thresholds are rembg's own.

Remove a background with one request

Send an image URL. The response carries the PNG URL, or an id to fetch while the job is queued.

cURL

bash
1curl -X POST 'https://modelslab.com/api/v6/image_editing/removebg_mask' \
2 -H 'Content-Type: application/json' \
3 -d '{
4 "key": "YOUR_MODELSLAB_API_KEY",
5 "image": "https://example.com/product.jpg",
6 "alpha_matting": true
7 }'
8# The PNG URL is in "output". While the job is queued, "output" is empty:
9# POST the "fetch_result" URL with your key until "status" is "success".

Python

python
1import time
2
3import requests
4
5KEY = "YOUR_MODELSLAB_API_KEY"
6
7result = requests.post(
8 "https://modelslab.com/api/v6/image_editing/removebg_mask",
9 json={"key": KEY, "image": "https://example.com/product.jpg"},
10 timeout=60,
11).json()
12fetch_url = result.get("fetch_result")
13
14while result.get("status") == "processing":
15 time.sleep(2)
16 result = requests.post(fetch_url, json={"key": KEY}, timeout=60).json()
17
18print(result["output"][0] if result.get("status") == "success" else result)

Background Removal API Prices

Price per image at the smallest paid option each provider sells, from each provider's own pricing page.

ProviderAPI accessPrice per image
ModelsLabPublic REST API, plans from $21/month$0.0047; no per-image charge on the $149/month plan
PhotoroomPublic API, 10 free calls for new accounts$0.02 (Basic: $20 for 1,000 images)
Stability AIPrepaid credits, $0.01 each$0.05 (5 credits)
remove.bgSelf-serve API moves to Leonardo.Ai on December 1, 2026; 50 free calls a month until then1 credit per full-resolution image; dollar price not readable without a browser session
ClipdropPart of Jasper; pricing page redirects to a sales formNot published

Read on each provider's own page on October 15, 2026, in the unit the provider publishes. remove.bg's API page says that from December 1, 2026 background removal moves to Leonardo.Ai, and Leonardo says remove.bg credentials do not carry over, so remove.bg integrations need a new key and a code change either way.

Moving Off the remove.bg API?

remove.bg’s self-serve API moves to Leonardo.Ai on December 1, 2026

remove.bg’s API page says background removal moves to Leonardo.Ai, also part of Canva, from December 1, 2026, and Leonardo says remove.bg credentials do not carry over. Every remove.bg integration needs a new key and a code change either way. If you are making that change, compare the price per image first: $0.0047 here, $0.02 on Photoroom’s Basic plan and $0.05 on Stability AI.

The same cutout on remove.bg and on ModelsLab

Send an image URL and read the PNG URL from output instead of PNG bytes from the response body. A file sent as base64 (base64: true) comes back as a base64 file to decode.

Before — remove.bg

bash
1curl -H 'X-Api-Key: YOUR_REMOVE_BG_KEY' \
2 -F 'image_file=@product.jpg' \
3 -F 'size=auto' \
4 -f https://api.remove.bg/v1.0/removebg -o no-bg.png

After — ModelsLab

bash
1# Same local file, sent as base64 in a JSON body built by jq
2base64 < product.jpg | tr -d '\n' > product.b64
3jq -n --rawfile image product.b64 \
4 '{key: "YOUR_MODELSLAB_API_KEY", image: $image, base64: true}' |
5 curl -X POST 'https://modelslab.com/api/v6/image_editing/removebg_mask' \
6 -H 'Content-Type: application/json' --data-binary @-
7# With base64: true, "output" links to a .base64 file: download it and
8# base64-decode it to get the PNG. Send an image URL instead to get a PNG URL.

When the ModelsLab Background Remover Fits

Choose it for volume and one bill

At $0.0047 an image, 10,000 cutouts cost $47. If your product already calls ModelsLab for image generation, editing or upscaling, background removal runs on the same key and the same plan, and the output URL can go straight into the next request.

Choose a specialist for the hardest edges

remove.bg and Photoroom train their own segmentation models and sell features this endpoint does not have: hair-level refinement presets, shadows, and automatic product framing. ModelsLab runs the open-source rembg model. Test it on your own images — hair, glass and fur are where the models differ most — before you move a production workload.

How to Use Our AI Background Remover: A Step-by-Step Guide

Learn how our AI background remover can give you clean, transparent images in just three easy steps.

STEP 01

Upload Your Image

Simply drag & drop or use the upload button to add your photo to our AI background remover. Works with selfies, product shots, art, or any image. You can also upload via URL.

STEP 02

AI Removes the Background

Our AI gets to work! The background remover AI intelligently detects and erases the background, making your subject stand out with clean, transparent edges.

STEP 03

Download Your Clean Image

Preview the image with the background removed and download it as a PNG with a transparent background, at the size you uploaded.

Our Popular Use Cases

Where teams call the background remover API.

Cut products out of supplier photos and place them on white or brand backgrounds for marketplaces and storefronts.

E-commerce product photos

Sources

Every competitor price on this page, with the page we read it on and the date.

Plans from $21 a month

Basic is $21/month and Standard $47/month; self-hosted image models cost $0.0047 per image from that allowance. Open Source Unlimited is $149/month with no per-image charge on self-hosted models. Every plan covers Flux, SDXL and 10,000+ community models. Cancel anytime.

100% refund policy on monthly & yearly plans — cancel anytime

Contact Sales
Best Value

Open Source Unlimited

Mission-Critical

$149/month

100% refund policy · cancel anytime

Unlimited Open Source Models
100% refund policy
24x7 Support
15 parallel generations
Access to all APIs
Unlimited generations on all open-source models
For mission critical workloads
Add Team Members
Priority GPU Clusters
Most Popular

Standard

Production

$47/month

100% refund policy · cancel anytime

Moderate Traffic
100% refund policy
Priority Developer Support
10 concurrent API requests
For Production workloads
API access to all models
Prototype

Basic

Prototype

$21/month

100% refund policy · cancel anytime

Moderate Traffic
100% refund policy
Developer Support via Discord/Email
5 concurrent API requests
API access to all models
Shared GPU

Get Expert Support in Seconds

We're Here to Help.

Want to know more? You can email us anytime at support@modelslab.com

View Docs

It costs $0.0047 per image on plans from $21/month, so 10,000 images cost $47, and nothing per image on the $149/month Open Source Unlimited plan. On October 15, 2026, Photoroom's Basic API cost $0.02 per image and Stability AI's Remove Background $0.05.

POST https://modelslab.com/api/v6/image_editing/removebg_mask with your key and image — a public image URL, or base64 with base64 set to true (up to 10 MB). The response carries the PNG URL in output (with base64: true, a base64 file to decode); while the job is queued, POST the fetch_result URL with your key until status is success.

Yes. Set only_mask to true to get the subject mask instead of the cutout, and inverse_mask to true to flip it. The mask can go straight into an inpainting or object removal request.

Set alpha_matting to true and tune alpha_matting_foreground_threshold (0–240), alpha_matting_background_threshold (0–20) and alpha_matting_erode_size (0–5); post_process_mask smooths the mask. The model is the open-source rembg library, so test it on your own images: hair, fur and glass are where background removal models differ most.

remove.bg's API page says that from December 1, 2026 background removal moves to Leonardo.Ai, also part of Canva, and Leonardo says remove.bg credentials do not carry over. To move to ModelsLab instead, send the image URL as image, put your key in the JSON body, and read the PNG URL from output instead of PNG bytes. A file sent as base64 (base64: true) comes back as a base64 file to decode.

Each request takes one image. Send requests in parallel up to your plan's limit — 5 at a time on Basic, 10 on Standard and 15 on Open Source Unlimited — and use a webhook to collect results as they finish.
Plugins

Explore Plugins for Pro

Our plugins are designed to work with the most popular content creation software.

API

Build Apps with
ML
API

Use our API to build apps, generate AI art, create videos, and produce audio with ease.