REST API

BG Remover API

Integrate AI background removal into your app. Simple REST API with 50 free requests per day. No credit card required.

Quick Start

1

Get your API key

Click below to generate a free API key instantly.

2

Make your first request

Send an image to the API and get back a transparent PNG.

API Reference

POST/api/remove-bg

Remove the background from an image.

Headers

NameRequiredDescription
x-api-keyYesYour API key
Content-TypeAutomultipart/form-data or application/json

Request Body

Three ways to send an image:

Option 1: File upload (multipart/form-data)

imageImage file (PNG, JPG, WebP). Max 20MB.
formatOptional. Output format: png (default), jpg, webp

Option 2: Image URL (application/json)

image_urlURL of the image to process
formatOptional. Output format: png (default), jpg, webp

Option 3: Raw image bytes

Send raw image binary as request body. Output: PNG.

Response

200Image binary with transparent background
401Missing or invalid API key
429Rate limit exceeded
500Processing error

Response headers include:

  • X-RateLimit-Remaining - Requests remaining today
  • X-RateLimit-Limit - Total daily limit

Code Examples

# Upload a file
curl -X POST https://yourdomain.com/api/remove-bg \
  -H "x-api-key: YOUR_API_KEY" \
  -F "image=@photo.jpg" \
  -o result.png

# From URL
curl -X POST https://yourdomain.com/api/remove-bg \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"image_url": "https://example.com/photo.jpg"}' \
  -o result.png

# With format option
curl -X POST https://yourdomain.com/api/remove-bg \
  -H "x-api-key: YOUR_API_KEY" \
  -F "image=@photo.jpg" \
  -F "format=webp" \
  -o result.webp

API Pricing

Start free. Scale when you need it.

Free

$0forever
  • 50 requests/day
  • Max 20MB per image
  • PNG, JPG, WebP output
  • URL & file upload
  • Community support
MOST POPULAR

Pro

$19/month
  • 1,000 requests/day
  • Max 50MB per image
  • All output formats
  • Priority processing
  • HD output quality
  • Email support
  • Batch endpoint

Enterprise

Custom
  • Unlimited requests
  • No size limits
  • Dedicated infrastructure
  • 99.9% SLA uptime
  • Custom integrations
  • On-premise option
  • 24/7 priority support

Rate Limits

  • Free tier: 50 requests per day, resets at midnight UTC
  • Max file size: 20MB per image
  • Supported formats: PNG, JPG, JPEG, WebP
  • Rate limit info is included in response headers