# remove.bg API

Category: [Speech, image and audio](https://free-web-services.com/web-services/ai/media/)  
Page: https://free-web-services.com/web-services/ai/media/remove-bg-api.html  
Documentation: https://www.remove.bg/api

The remove.bg API removes the background from photos of people, products, animals or cars, for example to cut out product shots for a web shop automatically. Send a POST request with an image URL, an uploaded file or Base64 data, and get back a PNG, JPG, WebP or ZIP image, or JSON-encoded data. The key goes in the X-Api-Key header. Free with a free API key for the first 50 calls each month; paid plans for more.

- API key: Needed, free
- Pricing: Free with a free API key for the first 50 calls each month; paid plans for more.
- From the browser: Yes (CORS)
- Formats: JSON
- Interface: REST
- Provider: remove.bg

Example request:

```sh
curl -X POST 'https://api.remove.bg/v1.0/removebg' \
  -H 'X-Api-Key: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"image_url":"https://www.remove.bg/example.jpg","size":"auto"}'
```

Replace YOUR_API_KEY with your own key. The JavaScript works in a web page as well as in Node.js 18 or newer.

