API reference
Detect faces
Find every face in an image and get boxes plus aligned crops.
POST /v1/face-recognition/detect1 operation per image, however many faces it finds
The programmatic form of Detect faces in the dashboard — same models, same allowance.
Request
multipart/form-data, with your key as a bearer token.
| Field | Type | Default | Description |
|---|---|---|---|
| imagerequired | file | — | JPEG, PNG or WebP. |
| model | string | scrfd | Detection model variant. |
Example
curl -X POST https://api.quantilence.com/v1/face-recognition/detect \
-H "Authorization: Bearer $QUANTILENCE_API_KEY" \
-F "image=@photo.jpg" \
-F "model=scrfd"Response
200 OK with this shape. Values below are illustrative; the keys and types are not.
{
"success": true,
"faces_detected": 2,
"faces": [
{
"face_index": 0,
"bbox_px": [
412,
188,
523,
361
],
"bbox_norm": [
0.402,
0.245,
0.511,
0.47
],
"det_score": 0.914,
"crop_b64": "/9j/4AAQSkZJRg…"
}
],
"image_width": 1024,
"image_height": 768,
"model": "scrfd",
"processing_time_ms": 143.8
}| Field | Type | Description |
|---|---|---|
| success | boolean | Always true on a 200. |
| faces_detected | integer | How many were found. |
| faces | Face[] | One entry per detected face. |
| faces[].face_index | integer | Position in this response. |
| faces[].bbox_px | int[4] | [x1, y1, x2, y2] in image pixels. |
| faces[].bbox_norm | float[4] | The same box, normalised 0–1. |
| faces[].det_score | float | Detector confidence, 0–1. |
| faces[].crop_b64 | string | Aligned face crop, base64 JPEG. |
| image_width | integer | Decoded width in pixels. |
| image_height | integer | Decoded height in pixels. |
| model | string | Model used. |
| processing_time_ms | float | Model time. |
Worth knowing
- One operation regardless of how many faces come back.
- Both box forms are returned so you never have to multiply by the frame yourself.