RemoveBG API

API Reference

Removebg API
Remove Background

Support

Error Codes Guide
Docs
Navigation
RemoveBG API

API Reference

Removebg API
Remove Background

Support

Error Codes Guide

Remove Background

POSThttps://removebgapi.com/api/v1/remove

Remove background from an image. This is a synchronous endpoint that returns the processed image directly in the response body.

Request

Headers

Authorization *

Your API key, provided as a Bearer token. Example: Bearer rb-sk_....

Body

image_file*binary

The image file to process. Max 20MB.

formatstring

Resulting image format: png | jpg | webp.

bg_colorstring

Background color (hex, rgb, or name).

Responses

Response Headers

  • Content-Type: image/png
  • X-Request-ID:req_abc123... // Support Trace ID
  • X-Processing-Time-Ms: 450
  • X-Image-Width: 1920
  • X-Image-Height: 1080

Body

[binary image data]

cURL Command
curl -X POST https://removebgapi.com/api/v1/remove \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: multipart/form-data" \
  -F "image_file=@image.jpg" \
  -F "format=png" \
  --output result.png