API Documentation

Integrate EraseBG's powerful background removal directly into your applications with our simple REST API.

API Endpoint

POST https://api.erasebg.co/remove-bg/

Authentication

Headers

Include your API token in the request header:

Authorization: Bearer YOUR_API_TOKEN

Request Body

Send a multipart/form-data request with the image file:

Content-Type: multipart/form-data

image: [binary file data]

Supported formats: JPEG, PNG, WebP

Max file size: 20MB

Code Examples

curl -X POST https://api.erasebg.co/remove-bg/ \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -F "image=@/path/to/image.jpg" \
  -o output.png

Rate Limits

API requests are rate-limited based on your subscription plan:

  • Pro Plan: 250 API requests per month
  • Enterprise Plan: 1000 API requests per month

Rate limit headers are included in each response:

X-RateLimit-Limit: 250
X-RateLimit-Remaining: 247
X-RateLimit-Reset: 1704067200

Ready to Get Started?

Sign up for a Pro or Enterprise plan to get your API key.

Get API Key