Home / API Documentation
REST API v1.0 • Wire-Compatible

Background Remover API Documentation

A high-performance, drop-in replacement API for remove.bg®. Send an image via multipart form upload or URL, and receive an instant, crisp transparent PNG with zero background in under 200ms.

# Base URL & Authentication

All requests must be made over HTTPS. Pass your API key in the X-Api-Key header.

# Base URL
https://backgroundremoverapi.com
# Authentication Header
X-Api-Key: YOUR_API_KEY
* For testing and evaluation, the live demo endpoint allows free sandbox calls without an API key.
POST /v1.0/removebg
Returns: image/png (binary)

Removes the background from an uploaded image file or a public image URL. Returns raw binary PNG bytes containing the isolated foreground with an alpha transparency channel.

Request Body (multipart/form-data)

Field Type Required Description
image_file binary Optional* Raw image file (JPEG, PNG, WEBP). *Either image_file or image_url is required.
image_url string Optional* Publicly accessible HTTPS URL of the image to process.
size string No auto (default), preview, or full. Maintains compatibility with remove.bg size filters.
format string No auto or png (default). Returns standard 32-bit RGBA PNG.

Response Headers

Compatible with all official remove.bg SDK telemetry checks:

Content-Type: image/png
X-Width: 1200
X-Height: 800
X-Credits-Charged: 1
X-Processing-Time-Ms: 142
X-Dropin-Provider: bgremoverapi

# Implementation Code Recipes

curl -X POST \
  -H "X-Api-Key: YOUR_API_KEY" \
  -F "[email protected]" \
  -F "size=auto" \
  https://backgroundremoverapi.com/v1.0/removebg \
  -o no-bg.png

# Status Codes & Error Handling

HTTP Status Meaning Response format
200 OK Foreground segmentation succeeded. Body contains raw PNG. image/png
400 Bad Request Missing image file/URL or unparseable image. application/json
402 Payment Required Credit balance depleted. application/json
403 Forbidden Invalid, revoked, or missing X-Api-Key. application/json
429 Too Many Requests Concurrency rate limit exceeded. application/json
GET /v1.0/account

Checks remaining credit balance and rate quota. Matches standard remove.bg account payload schema.

{
  "data": {
    "attributes": {
      "credits": {
        "total": 500,
        "subscription": 500,
        "payg": 0
      },
      "api": {
        "free_calls": 50,
        "sizes": "all"
      }
    }
  }
}