Background removal API

One endpoint: an image goes in, a transparent PNG comes out. Prepaid credits, self-serve keys, no sales call — start in a minute.

Get running in three steps

Create a key

Sign in, then create one under Settings → API keys. The key is shown once and stored only as a hash — copy it into your secret manager right away.

Get an API key

Top up API credits

API credits are a separate balance from website credits. From $10, never expiring, $0.020–$0.033 per image depending on the top-up size.

See API pricing

Call the endpoint

POST multipart/form-data with the field image_file. One credit is charged per successful call; a failed call is never charged.

Endpoint

Endpoint

POSThttps://backgone.com/api/v1/remove

Authentication

Send the key as a bearer token. Requests without a valid key return 401 — session cookies are not accepted here.

Request

image_file

Type
file
Description
The image to process: PNG, JPEG or WebP, up to 10 MB. There is no image_url field — send the bytes.

Response

A successful call returns the transparent PNG itself, not JSON — content-type image/png. Write the response body straight to a file. Errors return JSON with a numeric code and a human-readable message.

Response headers

x-backgone-credits-charged

Description
Credits charged for this call — 1 on success.

x-backgone-credits-remaining

Description
API credits left on the account after this call.

Code examples

Replace sk_YOUR_KEY with the key you created. Each example writes the result to no-bg.png.

curl

curl -X POST https://backgone.com/api/v1/remove \
  -H "Authorization: Bearer sk_YOUR_KEY" \
  -F "image_file=@/path/to/photo.jpg" \
  -o no-bg.png

Node.js

import fs from 'node:fs/promises';

const form = new FormData();
form.append('image_file', new Blob([await fs.readFile('photo.jpg')]), 'photo.jpg');

const res = await fetch('https://backgone.com/api/v1/remove', {
  method: 'POST',
  headers: { Authorization: 'Bearer sk_YOUR_KEY' },
  body: form,
});

if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
await fs.writeFile('no-bg.png', Buffer.from(await res.arrayBuffer()));

Python

import requests

res = requests.post(
    "https://backgone.com/api/v1/remove",
    headers={"Authorization": "Bearer sk_YOUR_KEY"},
    files={"image_file": open("photo.jpg", "rb")},
    timeout=60,
)
res.raise_for_status()
open("no-bg.png", "wb").write(res.content)

Migrating from the remove.bg API

The remove.bg API shuts down on December 1, 2026, together with their website. For most integrations the whole migration is this table.

Endpoint

remove.bg
POST https://api.remove.bg/v1.0/removebg
BackGone
POST https://backgone.com/api/v1/remove

Authentication

remove.bg
Header X-Api-Key
BackGone
Header Authorization: Bearer sk_…

Request body

remove.bg
multipart/form-data, field image_file or image_url
BackGone
multipart/form-data, field image_file only

Parameters

remove.bg
size, format, bg_color, crop, scale, position, type, shadow_type and more
BackGone
None. Always a transparent PNG at the resolution you send — background colours, presets and print sheets stay on the website.

Response

remove.bg
Image bytes; format picks PNG, JPG, WebP or ZIP
BackGone
Image bytes; always PNG with transparency

Billing unit

remove.bg
Credits, scaled by resolution; subscription credits reset every month
BackGone
1 credit per successful image; prepaid top-ups never expire

Price

remove.bg
Not listed on their API page
BackGone
$0.020–$0.033 per image

Rate limit

remove.bg
500 megapixel-images per minute; 429 with Retry-After
BackGone
One request per 200 ms per account (about 5 per second); 429 with Retry-After
Create an API key

The remove.bg column is taken from their public API documentation, checked on 2026-09-20. Their parameters change — diff it against your own integration before you cut over.

Limits and error codes

Every response uses one of these status codes. Retry 429 and 503 with backoff; a 4xx means the request itself needs fixing.

400

Meaning
Bad request
What to do
The body is not multipart/form-data, image_file is missing, or the type is not PNG, JPEG or WebP.

401

Meaning
Missing or invalid key
What to do
Check the Authorization header and that the key is still active. Not charged.

402

Meaning
Out of API credits
What to do
Top up API credits. Website credits cannot be used here. Not charged.

413

Meaning
Image too large
What to do
Resize below 10 MB before upload. Not charged.

429

Meaning
Too many requests
What to do
Wait for the Retry-After header, then retry. Not charged.

502

Meaning
Engine error
What to do
The model failed, or found no subject in the image. Retry later. Not charged.

503

Meaning
API paused or daily budget spent
What to do
The operator paused the API, or this UTC day's global budget is used up. Retry after 00:00 UTC or email us. Not charged.

Before you build on it

Three things worth knowing, stated plainly:

  • No idempotency key yet. A retry after a network timeout is a new call and can be charged again — keep your own request id.
  • No SLA and no queue. Calls are processed synchronously; API traffic has no priority lane.
  • We do not store your images. They are processed in memory and never used to train models; per-call metadata (key, status, elapsed time, credits) is kept for billing and abuse prevention.

Unused API credits are refundable within 14 days of purchase; consumed credits are not.

Ready to migrate before December 1?

Create a key, top up $10 and run one call. Most remove.bg integrations are a two-line change.

support@backgone.com·Privacy policy·Terms of service