Universal Background Removal
Universal Background Removal
Universal Background Removal API
Universal Background Removal API uses advanced AI to intelligently detect and isolate subjects, automatically erasing backgrounds. Suitable for people, animals, food, and objects in various scenes.
POST
Universal Background Removal
Request
- URL:
https://www.ailabapi.com/api/cutout/general/universal-background-removal - Method:
POST - Content-Type:
multipart/form-data
Image requirements
- Image format:
JPEGJPGBMPWEBPPNG(8-bit, 16-bit, 64-bit PNG not supported) - Image size: No more than 3 MB.
- Image resolution: Greater than 32x32px, less than 2000x2000px, with the longest side equal to or less than 1999px.
Headers
| Field | Required | Type | Description |
|---|---|---|---|
ailabapi-api-key | YES | string | Application API KEY. Get API KEY |
Body
| Field | Required | Type | Scope | Description |
|---|---|---|---|---|
image | YES | file | ||
return_form | NO | string | mask, whiteBK, crop | Specifies the form of the returned image. If not set, the four-channel PNG map is returned. mask`: Returns a single channel mask.` whiteBK: Return to white background image. “crop: Returns the four-channel PNG image after cropping (cropping out the blank areas around the edges). |
Response
Public Response Fields
Viewing Public Response Fields and Error CodesBusiness Response Fields
| Field | Type | Description |
|---|---|---|
data | object | The content of the result data returned. |
+image_url | string | Resulting image URL address. |
Response Example
Sample Code
Authorizations
API Key for authentication
Body
multipart/form-data
Specifies the form of the returned image.
mask: Returns a single channel mask.whiteBK: Return to white background image.crop: Returns the four-channel PNG image after cropping (cropping out the blank areas around the edges).Response
200 - application/json
Success
The response is of type object.

