PixMiller PixMiller
Home / API / Background Remover API
Developer API

Background Removal API REST API · v1

Bring PixMiller's background remover into your own stack: one POST request removes the background in about 5 seconds and returns a transparent PNG. Precise edges, billed per image.

Endpoint
POST api.pixmiller.com/v1/remove
curl -X POST \
  api.pixmiller.com/v1/remove \
  -H "X-Api-Key: YOUR_API_KEY" \
  -F "[email protected]"
Background Remover API
PixMiller REST API · v1
full = 1 credit · preview is free

Upload an image; the AI removes the background and returns a transparent PNG. Synchronous — usually a few seconds.

POST https://api.pixmiller.com/v1/remove
1

Authentication & request

Send your secret key in the X-Api-Key: YOUR_API_KEY request header. Create and manage keys on your account page.
Parameter Type Required Description
image_file file required* Image to process, multipart upload. JPG / PNG / WebP, up to 20MB
image_url string required* Or a public image URL (provide one of image_file / image_url)
size string optional preview (free, watermarked) / full (HD, 1 credit) / auto. Default preview
format string optional auto (PNG if transparent, otherwise JPG — default) / png / jpg
bg_color string optional Result background: transparent (default) / white / any #RRGGBB
* Provide at least one of image_file or image_url.
2

Code samples

Pick a language and copy — runs as-is.
1curl -X POST "https://api.pixmiller.com/v1/remove" \2  -H "X-Api-Key: YOUR_API_KEY" \3  -F "[email protected]" \4  -F "size=full"
3

Response

201 Created · JSON
1{2  "url": "https://cdn.pixmiller.com/result/8Kd2pQ.png"3}
url Temporary URL of the processed image (the underlying image is auto-deleted after 3 days).
4

Errors

Errors return the matching status code and a JSON body shaped like {"errors":{"code":"…","message":"…"}}.

400 validation error Missing or invalid image_file, file too large, or conflicting image sources.
401 authentication_failed The X-Api-Key header is missing or invalid.
402 not_enough_credit size=full was requested but the account has no HD credits left.
422 invalid_image The image could not be processed — too small, unsupported, or failed to decode.
429 throttled Rate limit exceeded. Slow down and retry after the Retry-After header.
5

Migrating from remove.bg

Change the base URL — your existing request keeps working.
remove.bg stops accepting self-serve API requests on 2026-12-01. PixMiller mirrors its main path at POST /v1.0/removebg — same X-Api-Key header, same parameter names, HTTP 200 with the image bytes in the body. A matching GET /v1.0/account returns your credit balance.
Before · remove.bg
1curl -H "X-Api-Key: REMOVEBG_KEY" \2  -F "[email protected]" \3  -F "size=auto" \4  -o out.png \5  https://api.remove.bg/v1.0/removebg
After · PixMiller
1curl -H "X-Api-Key: PIXMILLER_KEY" \2  -F "[email protected]" \3  -F "size=auto" \4  -o out.png \5  https://api.pixmiller.com/v1.0/removebg
size mapping
remove.bg value PixMiller tier Description
preview / small / regular preview Watermarked preview, up to 640 px. Free — no credit charged. This is the default, as on remove.bg.
medium / hd / 4k / full / 50MP full Full-resolution, watermark-free result, downscaled to the tier's megapixel cap (1.5 / 4 / 25 / 25 / 50 MP; PNG output is capped at 10 MP). 1 credit per image.
auto auto Full resolution when credits are available, free watermarked preview otherwise.
Response headers
X-Credits-Charged Credits actually deducted by this call (0 for the free preview tier).
X-Width / X-Height Pixel dimensions of the returned image.
X-Type Detected foreground class: person, product, animal, car or other (omitted with type_level=none).
X-Foreground-Top / -Left / -Width / -Height Bounding box of the subject in the returned image.
X-RateLimit-Limit / -Remaining / -Reset Rate limit state for your key, counted per image — one call uses one unit; Retry-After is added on 429.
Parameters without effect

Every remove.bg parameter is accepted and validated — size, type, type_level, format, roi, crop, crop_margin, scale, position, channels, bg_color, bg_image_url and bg_image_file behave as documented by remove.bg. These are accepted but never change the output, as on remove.bg for non-car subjects: shadow_type, shadow_opacity, add_shadow, semitransparency

Known differences
  • size=preview (and its aliases small / regular — the default, as on remove.bg) returns our free, watermarked preview at up to 640 px and costs no credit; remove.bg returns a 0.25-megapixel image without watermark for 0.25 credits.
  • medium, hd, 4k, full and 50MP all cost 1 credit, as on remove.bg. There is no free monthly preview quota, so /v1.0/account always reports free_calls = 0.
  • X-Type is a coarse class (person / product / animal / car / other) derived from the segmentation model that was used; type_level = 2 and latest return the same coarse classes.
  • Shadows (shadow_type / shadow_opacity / add_shadow) and car-window semitransparency are accepted but never rendered — as on remove.bg for non-car subjects.
  • Input files are limited to 20 MB (remove.bg: 22 MB).

Errors on this endpoint use the remove.bg JSON:API envelope {"errors":[{"title":"…","code":"…"}]} with 400 invalid_parameter / 402 insufficient_credits / 403 auth_failed / 429 rate_limit_exceeded.

This is a compatibility layer for the main HTTP path, not a certified drop-in for the official SDKs or CLI.

Why build on the Background Remover API

PNG/JPG Output
~5s Per image
40/min Batch throughput
3d Auto-deleted
Hair-level edges Hair, fur and semi-transparent edges are handled automatically with a clean alpha channel — no halos, no hard cutoffs.
Sub-5s response A single image usually returns a result URL within 5 seconds, synchronously.
Built for batch Steady throughput for high volume; pair with concurrency and retries to slot into your pipeline.
Minutes to integrate Plain REST with copy-paste samples; new accounts get a free HD credit for testing.

Where developers use the Background Remover API

E-commerce bulk listing

Turn seller-uploaded product shots into marketplace-compliant white or transparent main images, with no manual editing.

In-app background removal

Embed one-click background removal into your design, gallery or site-builder product — call the API, get the result.

Automated workflows

Hook into ERP / DAM / scripts so new images are cut out and filed automatically on ingest.

1 Create an API key Create a key on the API keys page. New accounts get a free HD credit for testing.
2 Make a request Copy any sample above, swap in your key and image, and run your first call.
3 Go to production Tune concurrency and retries, then ship — billed per image, volume pricing available.

Developer FAQ

What images are supported?

JPG / PNG / WebP / BMP up to 20MB, under 50 megapixels (longest edge 32–10000px). Output is a transparent PNG at the source resolution, up to 4096×4096.

How is it billed?

Per successfully processed image — full size = 1 credit; preview size (watermarked) is free for testing. New accounts get a free HD credit.

What does the size parameter do?

preview and auto return a watermarked preview; full returns the Full HD result and uses 1 credit.

What is the rate limit?

Up to 40 images per minute per key by default; contact us to raise it.

Other tools' APIs

Interactive reference

The full OpenAPI schema — try requests live against your account below.

Build with the PixMiller API Get your API key