Skip to main content
POST
/
api
/
cutout
/
general
/
universal-background-removal
Universal Background Removal
curl --request POST \
  --url https://www.ailabapi.com/api/cutout/general/universal-background-removal \
  --header 'Content-Type: multipart/form-data' \
  --header 'ailabapi-api-key: <api-key>' \
  --form 'return_form=<string>' \
  --form image=@example-file
{
  "request_id": "",
  "log_id": "",
  "error_code": 0,
  "error_code_str": "",
  "error_msg": "",
  "error_detail": {
    "status_code": 200,
    "code": "",
    "code_message": "",
    "message": ""
  },
  "data": {
    "image_url": ""
  }
}

Authorizations

ailabapi-api-key
string
header
required

API Key for authentication

Body

multipart/form-data
image
file
return_form
string

Specifies the form of the returned image. <li>If not set, the four-channel PNG map is returned.</li> <li>mask: Returns a single channel mask.</li> <li>whiteBK: Return to white background image.</li> <li>crop: Returns the four-channel PNG image after cropping (cropping out the blank areas around the edges).</li>

Response

200 - application/json

Success

The response is of type object.