Skip to main content
POST
Generate a black-and-white mask of the subject (white = subject). Returns the mask as a PNG directly in the response body.
Choose the AI model with the optional model parameter: falcon (default), aurora or ghost.
Image requirements: upload the image as multipart/form-data in the image field (image URLs aren’t supported). Formats: JPG, PNG, WEBP, BMP, GIF. Size: 1 KB to 10 MB. Content type: image/jpeg, image/png, image/webp, image/bmp or image/gif. Other files return 400 invalid_image. See Errors.

Result

Image
Image

Authorizations

ApiKey
string
header
required

Your API key (looks like bg_live_sk_…). Create one in the dashboard at https://fapihub.com/dashboard/.

Body

multipart/form-data
image
file
required

The image to process, uploaded as a file. Supported formats: JPG, PNG, WEBP, BMP, GIF. Size: 1 KB to 10 MB. The upload's content type must be image/jpeg, image/png, image/webp, image/bmp or image/gif. Image URLs are not supported.

model
enum<string>
default:falcon

AI model used to separate the subject from the background. Accepted only on /rembg/ and /rembg/mask/; any other value returns 400 invalid_parameter.

Available options:
falcon,
aurora,
ghost
Example:

"falcon"

Response

Black-and-white mask (white = subject). Returned as binary image data with Content-Type: image/png.

The response is of type file.