Request
- URL:
https://www.ailabapi.com/api/cutout/portrait/avatar-extraction - Method:
POST - Content-Type:
multipart/form-data
Image requirements
- Image format:
JPEGJPGBMPPNG - Image size: No more than 3 MB.
- Image resolution: Larger than 32x32px, smaller than 2000x2000px.
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 | Specifies the form of the returned image. If not set, the four-channel PNG map is returned. “mask: Returns a single channel mask. |
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. |
+elements | array | The keying result of each child element. |
++image_url | string | Resulting image URL address. |
++width | integer | The width of the result map. |
++height | integer | The height of the resultant graph. |
++x | integer | Top left x-coordinate. |
++y | integer | Top left y-coordinate. |
Response Example
Sample Code
Authorizations
API Key for authentication
Body
multipart/form-data
Response
200 - application/json
Success
The response is of type object.

