BG-API — Background Removal API

BG-API is a developer REST API that removes image backgrounds using advanced AI — send an image, get back a transparent PNG or WebP, commercial-use safe.

Base URL: https://bg-api.sikasio.com

The API is synchronous: POST /v1/remove processes your image and returns the cutout in the same response — either as raw image bytes (default) or, with response=json, as a hosted URL that stays live for 24 hours.

Quick facts

Base URL
https://bg-api.sikasio.com
Endpoint
POST /v1/remove
Auth
X-API-Key header — instant free key at /signup
Input
JPG, PNG, WebP
Output
Transparent PNG or WebP (or flattened onto a solid bg_color)
Pricing
Free $0 (50 img/mo) · Starter $5/mo (500) · Pro $19/mo (3,500)
Provider
Sikasio · support@sikasio.com

Getting your API key

New here? You can be making your first request in under a minute:

  1. Create a free account at /signup — just an email and a password, and accept the terms. No card required.
  2. Verify your email by entering the 6-digit code we send you.
  3. Copy your API key — it's shown once, right after verification, so save it somewhere safe. You can always see its prefix or regenerate a fresh key from your account dashboard.
  4. Already have an account? Sign in. Forgot your password? Reset it here.
  5. Make your first call: put the key in the X-API-Key header and POST /v1/remove — see the quick start below.

Authentication

Every /v1 request must include your API key in the X-API-Key header:

X-API-Key: bg_live_YOUR_KEY

An Authorization: Bearer bg_live_YOUR_KEY header works as an alternative to X-API-Key if that's a better fit for your HTTP client.

Missing, wrong, or disabled keys return 401 with code invalid_key. Each successful removal costs one credit from your monthly quota — failed requests are never charged.

Plans & quotas

PlanPriceImages / monthRate limitMax outputMax upload
free$0505 requests / minute256 px3 MB
starter$5/mo50015 requests / minute1024 px5 MB
pro$19/mo3,50025 requests / minute4096 px8 MB

Quotas reset on the 1st of each month (UTC). Every successful response includes an X-Credits-Remaining header; check GET /v1/account any time.

Price per image vs remove.bg

APIPlanPrice per image
BG-APIpro — $19/mo, 3,500 images~$0.005
BG-APIstarter — $5/mo, 500 images$0.01
remove.bgsubscription credits~$0.09–$0.20+

That works out to roughly 10–25× cheaper per image: BG-API runs its own AI, so there is no per-image licensing cost passed on — and your images are never sent to third-party AI providers.

Quick start

Multipart upload (returns the PNG directly)

curl -X POST "https://bg-api.sikasio.com/v1/remove" \
  -H "X-API-Key: bg_live_YOUR_KEY" \
  -F "file=@photo.jpg" \
  -o cutout.png

Base64 JSON body with options

curl -X POST "https://bg-api.sikasio.com/v1/remove?format=webp&bg_color=ffffff&size=1024" \
  -H "X-API-Key: bg_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d "{\"image_base64\": \"$(base64 -w0 photo.jpg)\"}" \
  -o cutout.webp

Hosted URL instead of bytes (response=json)

curl -X POST "https://bg-api.sikasio.com/v1/remove?response=json" \
  -H "X-API-Key: bg_live_YOUR_KEY" \
  -F "file=@photo.jpg"
{
  "url": "https://bg-api.sikasio.com/files/3f9c…a1.png",
  "width": 1200,
  "height": 800,
  "format": "png",
  "credits_remaining": 3499,
  "expires_in_hours": 24
}

Remove a background

POST/v1/removerequires X-API-Key

Provide the image one of two ways:

InputHow
Multipartmultipart/form-data with the image in a file field.
JSONapplication/json body with image_base64 (raw base64 or a data:image/…;base64, URL).

Options (see Options) go in the query string or the JSON body — query wins. Default response is the processed image bytes (image/png or image/webp) plus X-Credits-Remaining and X-RateLimit-Limit headers. With response=json the image is stored and a hosted URL is returned instead (expires after 24 hours).

Check your account

GET/v1/accountrequires X-API-Key
{
  "name": "my-app",
  "plan": "pro",
  "monthly_quota": 3500,
  "used_this_month": 132,
  "remaining": 3368,
  "resets_at": "2026-08-01T00:00:00.000Z",
  "rate_limit_per_minute": 25,
  "max_output_px": 4096,
  "max_upload_mb": 8
}

Fetch a hosted result

GET/files/:namepublic

Serves images created with response=json. Hosted files are deleted after 24 hours — download anything you need to keep. Hosted storage also has a total capacity cap; if it's full, the oldest files are evicted first, so a URL may expire earlier than 24 hours during heavy usage.

Options

All optional. Pass as query parameters (?format=webp&size=1024) or JSON body fields.

OptionTypeDefaultNotes
formatstringpngOutput format: png or webp.
bg_colorstringtransparentFlatten the cutout onto a solid 6-digit hex color, e.g. ffffff.
sizeintegeroriginalFit the result inside a size×size box (16–8192). Never enlarges.
responsestringbytesjson → store the result and return a hosted URL instead of image bytes.

Whatever size you request, the output's longest side is always clamped to your plan's max dimension (see the X-Max-Output-Px response header).

Limits

Upload sizePer plan: 3 MB (free), 5 MB (starter), 8 MB (pro); requests are hard-capped at 12 MB (base64 bodies may be up to ~17 MB of text)
Resolution≤ 25 megapixels
Input formatsJPG, PNG, WebP (detected by decoding — extensions and headers are not trusted)
Hosted URLsExpire 24 hours after creation, or sooner if the hosted-storage capacity cap is reached (oldest files are evicted first)

If the server is momentarily saturated you get 429 busy with a Retry-After header — retry after a few seconds. Only successful removals consume credits.

Errors

All errors are JSON with a stable machine-readable code:

{ "error": { "code": "…", "message": "…" } }
StatusCodeMeaning
401invalid_keyMissing, unknown, or disabled API key.
429rate_limitedPer-minute plan rate limit hit — see Retry-After.
429quota_exceededMonthly image quota used up.
429busyProcessing queue is full — retry in a few seconds.
400no_imageNo file field and no image_base64 in the body.
400invalid_imageBytes could not be decoded as an image.
400unsupported_formatDecoded, but not JPG / PNG / WebP.
413too_largeImage over your plan's upload limit (3 / 5 / 8 MB), or request body over the 12 MB ceiling.
413too_many_pixelsImage over the 25 megapixel limit.
400bad_formatformat must be png or webp.
400bad_bg_colorbg_color must be a 6-digit hex color.
400bad_sizesize must be an integer between 16 and 8192.
400bad_jsonRequest body is not valid JSON.
400upload_errorMalformed multipart upload (e.g. wrong field name — use file).
429ip_rate_limitedPer-IP request ceiling hit, across all routes — see Retry-After.
504inference_timeoutProcessing took too long — try a smaller image.
503processing_unavailableProcessing backend is restarting — retry shortly.
502processing_failedBackground removal failed for this image.

FAQ

What is BG-API?

BG-API is a developer REST API that removes image backgrounds using advanced AI. You send an image to POST https://bg-api.sikasio.com/v1/remove with an X-API-Key header and get back a transparent PNG or WebP in the same response. It is built by Sikasio and is commercial-use safe.

Is there a free background removal API?

Yes — a permanent free plan, no card required:

Images50 / month
Max output256 px
Max upload3 MB
Rate limit5 req / min

Sign up — your API key is issued instantly.

How do I remove an image background with an API?

POST the image to https://bg-api.sikasio.com/v1/remove with your key in the X-API-Key header — as multipart/form-data in a file field or as JSON with image_base64. The response is the cutout as transparent PNG (or WebP with format=webp):

curl -X POST "https://bg-api.sikasio.com/v1/remove" \
  -H "X-API-Key: bg_live_YOUR_KEY" \
  -F "file=@photo.jpg" -o cutout.png
How do I get a BG-API key?
  1. Create a free account at /signup (email + password).
  2. Enter the 6-digit code we email you to verify.
  3. Copy your API key — shown once, regenerate anytime from the dashboard.
  4. Send it as the X-API-Key header on POST /v1/remove.

The whole flow takes under a minute.

What image formats does BG-API support?
InputJPG, PNG, WebP (detected by decoding, not the extension)
OutputTransparent PNG (default) or WebP

Optionally flatten onto a solid color with bg_color and resize with size. With response=json you get a hosted URL that stays live for 24 hours instead of raw bytes.

Can I use BG-API commercially?

Yes. BG-API runs advanced AI that is safe for commercial use, so cutouts produced on any plan — including the free tier — can be used in commercial products, stores, and apps.

How does BG-API compare to remove.bg?

Roughly 10–25× cheaper per image:

ServicePrice / image
BG-API — Pro ($19/mo)~$0.005
BG-API — Starter ($5/mo)~$0.01
remove.bg~$0.09–0.20+

No per-image licensing cost is passed on, and your images are never sent to third-party AI providers.

What is the cheapest background removal API?

BG-API is one of the cheapest — a permanent free tier plus low-cost paid plans:

PlanPriceImages / mo~ / image
Free$050
Starter$5/mo500$0.01
Pro$19/mo3,500~$0.005
What are BG-API's rate limits?
PlanRate limitMonthly quota
Free5 req/min50
Starter15 req/min500
Pro25 req/min3,500

Exceeding a limit returns 429 rate_limited with a Retry-After header. Quotas reset on the 1st of each month (UTC); only successful removals consume credits.

What is the maximum image size BG-API accepts?
PlanMax uploadMax output
Free3 MB256 px
Starter5 MB1024 px
Pro8 MB4096 px

Hard ceilings apply to every plan: 12 MB per request and 25 megapixels. Output is clamped to the plan's longest-side limit.

Does BG-API store my images?

Images are processed in memory on BG-API's own infrastructure — never sent to third-party AI providers. By default the result is returned directly and not stored; only when you request response=json is the result hosted, and that file is deleted after 24 hours.

Get an API key

Sign up and get a free key instantly — 50 images a month, no card required. Upgrade to starter or pro from your account whenever you need more.

Get your free API key →

Questions? support@sikasio.com