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-Keyheader — 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:
- Create a free account at /signup — just an email and a password, and accept the terms. No card required.
- Verify your email by entering the 6-digit code we send you.
- 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.
- Already have an account? Sign in. Forgot your password? Reset it here.
- Make your first call: put the key in the
X-API-Keyheader andPOST /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
| Plan | Price | Images / month | Rate limit | Max output | Max upload |
|---|---|---|---|---|---|
free | $0 | 50 | 5 requests / minute | 256 px | 3 MB |
starter | $5/mo | 500 | 15 requests / minute | 1024 px | 5 MB |
pro | $19/mo | 3,500 | 25 requests / minute | 4096 px | 8 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
| API | Plan | Price per image |
|---|---|---|
| BG-API | pro — $19/mo, 3,500 images | ~$0.005 |
| BG-API | starter — $5/mo, 500 images | $0.01 |
| remove.bg | subscription 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
Provide the image one of two ways:
| Input | How |
|---|---|
| Multipart | multipart/form-data with the image in a file field. |
| JSON | application/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
{
"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
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.
| Option | Type | Default | Notes |
|---|---|---|---|
format | string | png | Output format: png or webp. |
bg_color | string | transparent | Flatten the cutout onto a solid 6-digit hex color, e.g. ffffff. |
size | integer | original | Fit the result inside a size×size box (16–8192). Never enlarges. |
response | string | bytes | json → 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 size | Per 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 formats | JPG, PNG, WebP (detected by decoding — extensions and headers are not trusted) |
| Hosted URLs | Expire 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": "…" } }
| Status | Code | Meaning |
|---|---|---|
| 401 | invalid_key | Missing, unknown, or disabled API key. |
| 429 | rate_limited | Per-minute plan rate limit hit — see Retry-After. |
| 429 | quota_exceeded | Monthly image quota used up. |
| 429 | busy | Processing queue is full — retry in a few seconds. |
| 400 | no_image | No file field and no image_base64 in the body. |
| 400 | invalid_image | Bytes could not be decoded as an image. |
| 400 | unsupported_format | Decoded, but not JPG / PNG / WebP. |
| 413 | too_large | Image over your plan's upload limit (3 / 5 / 8 MB), or request body over the 12 MB ceiling. |
| 413 | too_many_pixels | Image over the 25 megapixel limit. |
| 400 | bad_format | format must be png or webp. |
| 400 | bad_bg_color | bg_color must be a 6-digit hex color. |
| 400 | bad_size | size must be an integer between 16 and 8192. |
| 400 | bad_json | Request body is not valid JSON. |
| 400 | upload_error | Malformed multipart upload (e.g. wrong field name — use file). |
| 429 | ip_rate_limited | Per-IP request ceiling hit, across all routes — see Retry-After. |
| 504 | inference_timeout | Processing took too long — try a smaller image. |
| 503 | processing_unavailable | Processing backend is restarting — retry shortly. |
| 502 | processing_failed | Background 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:
| Images | 50 / month |
| Max output | 256 px |
| Max upload | 3 MB |
| Rate limit | 5 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?
- Create a free account at /signup (email + password).
- Enter the 6-digit code we email you to verify.
- Copy your API key — shown once, regenerate anytime from the dashboard.
- Send it as the
X-API-Keyheader onPOST /v1/remove.
The whole flow takes under a minute.
What image formats does BG-API support?
| Input | JPG, PNG, WebP (detected by decoding, not the extension) |
| Output | Transparent 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:
| Service | Price / 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:
| Plan | Price | Images / mo | ~ / image |
|---|---|---|---|
| Free | $0 | 50 | — |
| Starter | $5/mo | 500 | $0.01 |
| Pro | $19/mo | 3,500 | ~$0.005 |
What are BG-API's rate limits?
| Plan | Rate limit | Monthly quota |
|---|---|---|
| Free | 5 req/min | 50 |
| Starter | 15 req/min | 500 |
| Pro | 25 req/min | 3,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?
| Plan | Max upload | Max output |
|---|---|---|
| Free | 3 MB | 256 px |
| Starter | 5 MB | 1024 px |
| Pro | 8 MB | 4096 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.
Questions? support@sikasio.com