Skip to main content

Remove Background

Remove Background API

The Remove background API consists of a single HTTP POST endpoint available on https://apis.clipdrop.co/remove-background/v1.
The body must be a multipart/form-data that has one image file:

  • image_file is the original image to process.
    • The original image should be a PNG, a JPG or a WEBP file, with a max resolution up to 25 megapixels.

In case of success:

  • the response mime-type will be either image/png, image/webp or image/jpeg, and the response image will be an image matching the accept header if provided, a PNG otherwise, with the same dimensions as the image_file.

  • the response headers will include a x-remaining-credits property to tell you how many credits you have left.

In case of an error:

  • the response mime-type is application/json, error type is indicated by the response status code and details are in the json body, ie
{ "error": "No api key provided" }

Authentication

Requests are authenticated with an API key. If you need one, please contact us at contact@clipdrop.co.

If your key has leaked, you can revoke it and request a new one in your account page.

Formats

Our API follows the accept header convention. For example, if you want a webp output rather than a PNG (our default), you can add a accept: image/webp header to your request and you will receive a response with content-type: image/webp and a webp binary image.

As of today, the API supports image/png, image/webp and image/jpg accept headers.

Credits

1 successful background removal API call = 1 credit.

Once logged in, you can claim 100 free ClipDrop APIs credits that you can use for development and debugging purposes.
Once the 100 images have been consumed, further calls will be rejected.

If you need more credits, you can purchase packs of 10 to 10 000 credits.

Quota / Rate limiting

By default, each API key has a limit of 50 requests per minute for the remove background API. Please let us know if you'd like higher values.

Examples

curl -X POST https://apis.clipdrop.co/remove-background/v1 \
-H 'x-api-key: YOUR_API_KEY' \
-F 'image_file=@car.jpg' \
-o result.png

Responses

The result image, e.g. 
Example result the car image where the background has been removed

Examples of input and outputs

image_file

photo.jpg

result

photo_cleanup.jpg

Sample integrations

Support

Any question ? Contact us at contact@clipdrop.co or join the Slack community.