Remove Background
https://removebgapi.com/api/v1/removeRemove 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_.... Get your API key from the dashboard.
Body
multipart/form-dataimage_file * binary
The image file to process.
Max file size: 15MB. Max dimension: 6000px. Supports JPG, PNG, WebP.
format string
The format of the resulting image.
Allowed values: png | jpg | webp.
Default: png.
channels string
The channels of the resulting image.
Allowed values: rgba | alpha. alpha returns a grayscale alpha mask instead of a full-color image.
Default: rgba.
bg_color string
The background color of the resulting image. Can be a hex code (e.g., #FFFFFF), RGB values (e.g., rgb(30, 200, 111)), or a HTML color name (e.g., red, blue). If not provided, the background will be transparent (for PNGs).
size string
Resize the output to a specified size. Useful for mobile apps that need smaller images.
Allowed values: preview (0.25MP), medium (1.5MP), hd (4MP), full (original size, up to 16MP).
Default: full.
crop boolean
If true, the image is cropped to the detected subject, removing transparent border pixels.
Allowed values: true | false. Default: false.
Responses
Content-Type: image/png (or requested format)
Body
[binary image data]
The processed image data.