Background removal API

POST /api/v1/remove accepts one image and spends one HD credit per successful request. Repeating a request spends another credit. Create your API key in the dashboard.

Input and authentication

Send Authorization: Bearer with your key, or x-api-key. Upload multipart image (file also works), or send JSON with url. Model is fast or quality (default quality). Format is png only. Images must be JPG, PNG or WebP, at most 22 MB and 25 megapixels. Animated images are rejected. URL inputs must resolve to public IPv4 addresses and return HTTP 200 directly on a standard HTTP or HTTPS port. Redirects are rejected.

Examples

Create a key under Dashboard, API keys, then upload a file or send a public image URL. Each successful request spends one HD credit.

export API_ORIGIN=https://backgroundremover.tools
export API_KEY="your key from the dashboard"
curl --fail-with-body "$API_ORIGIN/api/v1/remove" \
  -H "Authorization: Bearer $API_KEY" \
  -F "[email protected]" \
  -F "model=fast" -F "format=png" --output removed.png
curl --fail-with-body "$API_ORIGIN/api/v1/remove" \
  -H "x-api-key: $API_KEY" -H "Content-Type: application/json" \
  --data '{"url":"https://www.w3.org/assets/logos/w3c-2025-transitional/w3c-72x48.png","model":"quality","format":"png"}' \
  --output removed.png

Responses and limits

A successful request returns 200 image/png at the original dimensions. Outputs larger than 5 MiB return 200 JSON with url, expiresIn (900 seconds), and format. Check Content-Type before saving the response; download the signed URL if it is JSON. Stored uploads and results follow the shared retention policy.

Each key allows 30 requests per 60 seconds. A 429 response includes Retry-After: 60 and never spends a credit. Invalid input returns 400, unsupported formats 415, oversized files 413, invalid keys 401, suspended accounts 403 and exhausted credits 402. Worker failures return 502 and timeouts 504 without spending credits.