[Important: API Service Retirement Notice]Dear Developers,Thank you for your continued trust and support of the AILabTools API.To better focus on delivering more efficient, stable, and future-ready solutions, we are announcing the retirement of this API.Due to its outdated architecture and limitations in performance and scalability, this API will be permanently discontinued and will no longer be available starting from the date of this announcement. Any applications or integrations that still rely on this API may experience service interruptions if no action is taken.We strongly recommend that you evaluate alternative solutions and plan your migration as soon as possible to ensure a smooth transition and uninterrupted service for your users.If you have any questions or need assistance during this transition, our support team is ready to help:
📧 support@ailabtools.comWe sincerely appreciate your understanding and cooperation. Thank you for being part of AILabTools. We remain committed to providing you with more powerful and reliable services.Best regards,AILabTools Support Team
Request
- URL:
https://www.ailabapi.com/api/cutout/general/apparel-background-removal - Method:
POST - Content-Type:
multipart/form-data
Image requirements
- Image format:
JPEGJPGBMPPNG - Image size: No more than 5 MB.
- Image resolution: Larger than 50x50px, smaller than 3000x3000px.
Headers
| Field | Required | Type | Description |
|---|---|---|---|
ailabapi-api-key | YES | string | Application API KEY. Get API KEY |
Body
| Field | Required | Type | Scope | Example | Description |
|---|---|---|---|---|---|
image | YES | file | |||
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. |
Response
Response Field Handling Flow-
Handle
Public Response FieldsParse and validate thePublic Response Fields, checking the status code or response message to ensure the request is successful and error-free. -
Handle
Business Response FieldsIf thePublic Response Fieldsare valid and error-free, proceed with processing the business logic in theBusiness Response Fields.
Public Response Fields
Viewing Public Response Fields and Error CodesBusiness Response Fields
| 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. |

