Detects faces in the uploaded image, picks the most prominent one (highest score × area), aligns it, and returns a 512-dimensional embedding.

Request

file
required
The image file, as multipart/form-data. JPEG/PNG and anything else OpenCV’s imdecode supports. Must decode to between 20px and 4096px on both axes, and be under 10 MB.

Response

float[512]
L2-normalized 512-dimensional face embedding. Any two embeddings from this service can be compared with a plain dot product (equivalent to cosine similarity, since both are unit-length) — see /v1/compare for the service’s own comparison endpoint, or compute it yourself if you’re storing embeddings for later lookup.
float
The detector’s confidence score for the face that was picked (YuNet output, roughly 0–1).
float[4]
[x, y, width, height] of the detected face, in original-image pixel coordinates (already scaled back up if internal detection ran on a downscaled copy — see Models → YuNet).

Errors

All decode/validation errors from the shared error table apply here, without a field key (there’s only one image). The face-detection-specific case:
422
The image decoded fine, but YuNet found no face above detectorScoreThreshold (0.8, not currently configurable — see Configuration).