API for Background Removal

A REST endpoint that strips the background from any image with hair-level alpha. $0.009 per image — 23× cheaper than remove.bg. Drop-in compatible.

$0.009 / image
No credit card · Works in production · Used by ecommerce, marketplaces, creator tools

Built for production teams

Replace remove.bg without rewriting your pipeline — same parameters, same output shape, a fraction of the cost.

0.6–1.2 s typical

Sub-second median latency on 1024px inputs. p95 stays under 2 s under load.

💇

Hair-level alpha

Preserves individual strands, fur edges, semi-transparent fabric, jewelry chains.

📐

Up to 4K output

Returns a transparent PNG at the input resolution. Bulk endpoint accepts 50 images per call.

🔌

Drop-in for remove.bg

Same image_file / image_url params. Migrate by changing the base URL and key.

💸

$0.009 per image

Pay-as-you-go from $0.009. Pro plan brings it to $0.005. No surprise per-credit math.

🌐

One account, web + app + API

Same credits across pixelapi.dev, the Lensora mobile app, and the REST API. Switch channels freely.

Quickstart

Strip the background from one image with a single POST. Output is a PNG with a transparent channel.

curl Python Node
# curl — multipart upload
curl -X POST https://api.pixelapi.dev/v1/remove-background \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "[email protected]" \
  -o output.png

# curl — by URL
curl -X POST https://api.pixelapi.dev/v1/remove-background \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"image_url":"https://example.com/photo.jpg"}' \
  -o output.png
# Python — requests
import requests

with open("input.jpg", "rb") as f:
    r = requests.post(
        "https://api.pixelapi.dev/v1/remove-background",
        headers={"Authorization": "Bearer YOUR_API_KEY"},
        files={"image_file": f},
        timeout=30,
    )
    r.raise_for_status()
    open("output.png", "wb").write(r.content)
// Node — fetch
const fs = require("fs");
const form = new FormData();
form.append("image_file", fs.createReadStream("input.jpg"));

const r = await fetch("https://api.pixelapi.dev/v1/remove-background", {
  method: "POST",
  headers: { "Authorization": "Bearer YOUR_API_KEY" },
  body: form,
});
fs.writeFileSync("output.png", Buffer.from(await r.arrayBuffer()));

PixelAPI vs remove.bg

Same job, two prices. Independent benchmark on 100 mixed images (hair, fur, fabric, transparent glass, jewelry).

PixelAPI remove.bg
Price per image (PAYG)$0.009$0.21
Price per image (subscription floor)$0.005$0.11
Free credits on signup100 (no card)50 (card required after)
Max resolution4K (4096²)4K (4096²)
Hair / fur alpha quality (100-image benchmark)9.1 / 109.0 / 10
Bulk endpointYes — 50 images / callNo batch endpoint
Drop-in compatible paramsYes — image_file / image_url
Other tools in the same API14 (upscale, restore, face-detect, 3D, video…)1

remove.bg pricing reference: remove.bg/pricing (checked 2026-05-17).

FAQ

The questions we answer most often when teams move over from remove.bg.

How much does the background removal API cost?

$0.009 per image on pay-as-you-go, or as low as $0.005 per image on the Pro plan. remove.bg charges around $0.21 per image PAYG and ~$0.11 on subscription, making PixelAPI roughly 23× cheaper.

Do I need a credit card to try the API?

No. Every new account gets 100 free credits — enough to test the background removal endpoint on 100 images. No card required at signup.

What input formats and resolutions are supported?

JPEG, PNG, and WebP up to 4K (4096×4096). Inputs can be multipart upload, direct URL, or base64. Output is always a PNG with a transparent alpha channel.

How is the alpha quality on hair and fur?

PixelAPI uses high-accuracy alpha matting that preserves individual hair strands, fur edges, and semi-transparent fabric. On our 100-image benchmark across hair, fur, fabric, and jewelry it matches or beats remove.bg on 9 of 10 hard cases.

Can I run this in production?

Yes. The API is rate-limited per plan (Starter 60 req/min, Pro 300 req/min, Scale 1500 req/min) and runs on autoscaling infrastructure with a 99.9% monthly uptime target. The bulk endpoint accepts up to 50 images per request.

Is there a remove.bg-compatible drop-in?

Yes. POST /v1/remove-background accepts the same image_file / image_url parameters as remove.bg, so most teams migrate in under 30 minutes by changing the base URL and the API key.

How is billing handled across web, mobile, and API?

One account, one credit balance. Whether you call the API directly, use the Lensora mobile app, or run the same workflow in the web dashboard, the same credits are debited. Plans bill via Razorpay (India), PayPal (international), or Google Play (mobile).

Try the background removal API free

100 credits on signup. No card. Same key works on web, mobile, and the REST API.

Get 100 free credits