API reference

Search a collection

Find the enrolled faces that match a query photo.

POST /v1/face-search/query1 operation per search, however large the collection

Request

multipart/form-data, with your key as a bearer token.

FieldTypeDefaultDescription
imagerequiredfileA photo containing the face to look for.
modelstringarcfaceEmbedding model.
thresholdnumber0.85Minimum match score 0–1. Raise it to cut false positives.
top_kinteger10Maximum matches to return.
collectionstringRestrict the search to one collection. Omit to search all of them.

Example

curl -X POST https://api.quantilence.com/v1/face-search/query \
  -H "Authorization: Bearer $QUANTILENCE_API_KEY" \
  -F "image=@photo.jpg" \
  -F "model=arcface" \
  -F "threshold=0.85" \
  -F "top_k=10" \
  -F "collection=staff"

Response

200 OK with this shape. Values below are illustrative; the keys and types are not.

{
  "success": true,
  "query_faces": 1,
  "matches": [
    {
      "ml_face_id": 4127,
      "collection": "staff",
      "sim_score": 91.6,
      "det_score": 0.938
    },
    {
      "ml_face_id": 3980,
      "collection": "staff",
      "sim_score": 86.2,
      "det_score": 0.902
    }
  ],
  "threshold": 0.85,
  "model": "arcface",
  "detail": {}
}
FieldTypeDescription
successbooleanAlways true on a 200.
query_facesintegerFaces found in the query image.
matchesMatch[]Best matches, highest score first.
matches[].ml_face_idintegerThe enrolled face's id.
matches[].collectionstringCollection it lives in.
matches[].sim_scorefloat0–100, not 0–1.
matches[].det_scorefloat | nullDetector score at enrolment.
thresholdfloatThreshold applied, 0–1.
modelstringModel used.
detailobjectDiagnostic strings; do not parse.

Worth knowing

  • An empty `matches` array is a successful search that found nobody — not an error.
  • `sim_score` is 0–100 while `threshold` is 0–1, the same as Compare faces.