By evaluating the aesthetics of the input image, the bounding box is intelligently output, and according to these bounding boxes the original image can be cropped into a better image.
https://www.ailabapi.com/api/image/editing/intelligent-compositionPOSTmultipart/form-dataJPEG JPG PNG BMP WEBP| Field | Required | Type | Description |
|---|---|---|---|
ailabapi-api-key | YES | string | Application API KEY. Get API KEY |
| Field | Required | Type | Scope | Default | Description |
|---|---|---|---|---|---|
image | YES | file | |||
num_boxes | NO | integer | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 | 5 | The number of output boxes. |
| Field | Type | Description |
|---|---|---|
data | object | The content of the result data returned. |
+elements | array | Intelligent composition results. |
++min_x | integer | The horizontal coordinate of the upper-left corner of the output box. |
++max_x | integer | The horizontal coordinate of the lower-right corner of the output box. |
++min_y | integer | The vertical coordinate of the upper-left corner of the output box. |
++max_y | integer | The lower-right vertical coordinate of the output box. |
++score | float | The higher the score, the better the composition. 3.8 or above is recommended as a better composition score. |