About this endpoint
What it does
Detects frontal faces in an uploaded image file and returns bounding boxes for each face found. The response also includes the number of faces detected and the input image size.
Request Body
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| file | String | Yes | Image file to analyze. Binary upload (format: binary). |
Response
Returns a JSON object with faces as an array of face bounding-box objects, face_count as an integer, and image_size as an object containing the image dimensions.
| Parameter | Type | Mandatory | Description |
|---|---|---|---|
| faces | Object Array | No | Array of detected face bounding boxes. Each item contains h, w, x, and y integer fields. |
| faces[].h | Integer | No | Height of the detected face bounding box. |
| faces[].w | Integer | No | Width of the detected face bounding box. |
| faces[].x | Integer | No | X-coordinate of the bounding box. |
| faces[].y | Integer | No | Y-coordinate of the bounding box. |
| face_count | Integer | No | Number of faces detected in the image. |
| image_size | Object | No | Dimensions of the input image. Contains h and w integer fields. |
| image_size.h | Integer | No | Height of the image. |
| image_size.w | Integer | No | Width of the image. |