Costume background removal API uses advanced AI to intelligently detect and isolate clothing items, erasing backgrounds to highlight garment details effortlessly. Ideal for e-commerce and display.
https://www.ailabapi.com/api/cutout/general/apparel-background-removalPOSTmultipart/form-dataJPEG JPG BMP PNG| Field | Required | Type | Description |
|---|---|---|---|
ailabapi-api-key | YES | string | Application API KEY. Get API KEY |
| Field | Required | Type | Scope | Example | Default | Description |
|---|---|---|---|---|---|---|
image | YES | file | ||||
out_mode | NO | integer | 0, 1 | 0 | 0 | 0`: Default segmentation result of the main clothing.`, 1: Combined segmentation result based on the category specified by cloth_class. |
cloth_class | NO | string | tops, coat, skirt, pants, bag, shoes, hat | tops,coat | tops`: Tops.`, coat: Coat., skirt`: Skirt.`, pants: Pants., bag`: Bag.`, shoes: Shoes., “hat: Hat. | |
return_form | NO | string | mask, whiteBK | whiteBK`: Returns an image with a white background.`, mask: Returns a single-channel mask., If not specified, a four-channel PNG image will be returned. |
| Field | Type | Description |
|---|---|---|
data | object | The content of the result data returned. |
+elements | array | Returns an array of elements. |
++0 | object | |
+++image_url | string | Returns the keying result image URL address. |
++1 | object | |
+++class_url | object | Return the URL corresponding to the clothing category based on the input cloth_class. |
++++tops | string | Tops URL. |
++++coat | string | Coat URL. |
++++skirt | string | Skirt URL. |
++++pants | string | Pants URL. |
++++bag | string | Bag URL. |
++++shoes | string | Shoes URL. |
++++hat | string | Hat URL. |
API Key for authentication
Specifies the type of segmentation result to return, which affects the content of the image_url field.
0: Default segmentation result of the main clothing.1: Combined segmentation result based on the category specified by cloth_class.Clothing categories. Multiple values can be submitted at once, separated by commas (,).
tops: Tops.coat: Coat.skirt: Skirt.pants: Pants.bag: Bag.shoes: Shoes.hat: Hat.Specify the desired image format for the output.
whiteBK: Returns an image with a white background.mask: Returns a single-channel mask.Success
The response is of type object.