API

Migrating from the Photoroom API to bgclear: Field Mapping, Auth, Pricing

September 6, 20265 min readBy BG Clear Editorial

Photoroom's Remove Background API is good and, at $0.02 per image on the $20-a-month Basic plan, cheap at volume. The reasons people leave are the subscription itself — a shop doing 200 images a month pays $0.10 each — and wanting a plain per-image account with credits that do not reset. bgclear sells exactly that. This guide maps the Photoroom request to bgclear's so the switch is a small diff, and is honest about what Photoroom does that bgclear does not.

In this guide

Side by side

Endpoint: Photoroom POST https://sdk.photoroom.com/v1/segment → bgclear POST https://www.bgclear.ai/api/v1/remove.

Auth: Photoroom header x-api-key: KEY → bgclear Authorization: Bearer bgc_live_KEY.

Image: Photoroom multipart image_file → bgclear image_file (same name); bgclear also accepts image_url or image_file_b64 in a JSON body.

Output format: Photoroom format png/jpg/webp → bgclear format png/jpg/webp (same).

Background: Photoroom bg_color → bgclear bg_color (hex; transparent default).

Crop: Photoroom crop=true → bgclear crop=true.

Size: Photoroom size=preview|medium|hd|full → bgclear size=preview|full|auto. preview is free on bgclear (≤800 px); full is native resolution for one credit; auto chooses full up to 4 MP.

Channels: Photoroom channels=rgba|alpha → not available; bgclear returns the composited RGBA (or the colour-filled image). If you need the matte alone, derive it from the PNG's alpha channel.

Response: both return image bytes by default. bgclear adds X-Credits-Charged, X-Credits-Remaining and X-RateLimit-* headers, and with Accept: application/json returns {id, url, width, height, credits_charged, credits_remaining, processing_ms} with a hosted result URL (24 h).

Errors: Photoroom returns {"detail": …}; bgclear returns {"error": {"code", "message", "docs"}} with stable codes (insufficient_credits on 402, rate_limited on 429).

The diff in code

import requests

# Photoroom
# r = requests.post("https://sdk.photoroom.com/v1/segment",
#                   headers={"x-api-key": KEY},
#                   files={"image_file": open("photo.jpg", "rb")},
#                   data={"format": "png", "size": "full"})

# bgclear
r = requests.post("https://www.bgclear.ai/api/v1/remove",
                  headers={"Authorization": f"Bearer {KEY}"},
                  files={"image_file": open("photo.jpg", "rb")},
                  data={"format": "png", "size": "full"})
r.raise_for_status()
open("photo-no-bg.png", "wb").write(r.content)
// Photoroom: fetch("https://sdk.photoroom.com/v1/segment", { headers: { "x-api-key": KEY }, body: form })
const res = await fetch("https://www.bgclear.ai/api/v1/remove", {
  method: "POST",
  headers: { Authorization: `Bearer ${KEY}` },
  body: form, // same FormData: image_file, size, format, bg_color
});

Add an Idempotency-Key header per image so retries never double-charge, and route images over 4 megapixels to /api/v1/jobs (Photoroom's full on large images maps to a bgclear job with a callback — see the bulk guide).

What changes in cost

Photoroom's listed pricing (photoroom.com/api/pricing, September 2026): Basic $20 per month for 1,000 images ($0.02 each), Plus $100 per month for 1,000 images ($0.10 each) with the generative features, and a free tier of 10 production calls plus a 1,000-call watermarked sandbox. Unused monthly volume does not roll over.

bgclear: $9 for 100 credits ($0.09), $39 for 500 ($0.078), $129 for 2,000 ($0.065); no subscription; credits never expire; previews free; failed requests never charged (pricing).

The honest arithmetic: at a steady 1,000+ images every month, Photoroom Basic is cheaper per image. Below roughly 250 images a month, or with bursty volume (a catalogue refresh every quarter), bgclear costs less because you only buy what you use and nothing expires. Run the numbers on your last three months of usage before switching.

What you give up, and what you gain

Photoroom's Plus plan bundles AI backgrounds, shadows, relighting and "product beautifier" behind the same key; bgclear's API does background removal only (its web editor has gradients, studio backdrops and shadows, but those are not exposed via the API today). If your pipeline uses Photoroom's generative endpoints, keep Photoroom for those.

You gain: no monthly fee, credits that never expire, remove.bg-compatible field names (useful if you run both or are consolidating after remove.bg's 1 December 2026 shutdown — details), a free web tool your non-developers can use, async jobs to 50 MP, batches of 50 with callbacks, and a RapidAPI listing with a free plan if you prefer marketplace billing.

Frequently asked questions

Is the cutout quality the same as Photoroom's?

We have not published a head-to-head benchmark. Preview-size results are free and unlimited on bgclear, so run your own 20 hardest images through both before switching.

Does bgclear have a sandbox like Photoroom's?

The equivalent is size=preview: free, unlimited, not watermarked, up to 800 px. Your first key also includes 10 full-resolution credits.

Can I keep both keys during migration?

Yes — the request shapes are close enough that a feature flag choosing the base URL and header is the usual approach; run both for a week and compare failure rates.

What about Photoroom's channels=alpha output?

Not available. Request a PNG and read its alpha channel in your image library (Pillow, sharp, ImageMagick) to get the matte.

Ship it with the bgclear API

remove.bg-compatible endpoints, credits from $9 for 100 images, no subscription. Pay, get a key, make your first call in under two minutes.

Get API credits →

Tools for this guide

Photoroom Alternative

photoroom alternative

Background Removal API Free

background removal api free

BG Clear vs remove.bg

bgclear vs remove.bg

Keep reading

API

7 remove.bg API Alternatives Compared (2026): Price per Image, Free Tier, Drop-in Compatibility

With remove.bg closing on 1 Dec 2026, here is what the alternatives actually charge per image, what you get free, and which ones let you keep your existing request code.

API

remove.bg Is Shutting Down on 1 December 2026: Migrate Your API Integration in 10 Minutes

remove.bg's standalone site and API close on 1 Dec 2026 (9:00 CET) as it folds into Canva's Leonardo.Ai, and unused credits expire the same day. A field-by-field migration to a drop-in compatible API, with code.

API

Remove Image Backgrounds in Python with an API (requests, 20 Lines)

A complete Python walkthrough: single image, URL input, JSON responses, a folder script with safe retries, and async jobs for large files — no ML libraries, just requests.

API

Background Removal API Pricing Guide (2026)

Practical 2026 guide to background removal api pricing for tech buyers working on building a budget. Free tool, HD output, no signup.