AILabTools API - Image Composition Aesthetics Score - API
Request
- URL:
https://www.ailabapi.com/api/image/rating/image-composition-aesthetics-scoring - Method:
POST - Content-Type:
multipart/form-data
Image requirements
- Image format:
JPGJPEGBMPPNGWEBP - Image size: No more than 3 MB.
- Image resolution: Larger than 32x32px, smaller than 4096x4096px.
Headers
| Field | Required | Type | Description |
|---|---|---|---|
ailabapi-api-key | YES | string | Application API KEY. Get API KEY |
Body
| Field | Required | Type |
|---|---|---|
image | YES | file |
Response
Response Field Handling Flow
-
Handle
Public Response FieldsParse and validate the
Public Response Fields, checking the status code or response message to ensure the request is successful and error-free. -
Handle
Business Response FieldsIf the
Public 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. |
+score | float | The higher the score, the better the composition, with a recommended score of 3.8 or higher being the better composition score. |
Response Example
{
"request_id": "",
"log_id": "",
"error_code": 0,
"error_msg": "",
"error_detail": {
"status_code": 200,
"code": "",
"code_message": "",
"message": ""
},
"data": {
"score": 0
}
}