Face Recognition API
Detect faces, compare two faces, extract 512-dimension face embeddings, or match an ID photo to a selfie. One HTTP call each, paid per call. No account, no API key, no monthly plan.
4 endpoints
face-detect
$0.0030 per callFind faces in an image. Use when an agent counts people, checks a photo contains exactly one face before a match, or estimates age and gender.
face-compare
$0.0110 per callSend two images and get back a similarity score, a match flag and the threshold it was judged against.
face-embed
$0.0060 per callTurn every face in an image into a 512-d ArcFace vector.
kyc-verify
$0.0150 per callOne request takes an identity document and a selfie and returns the fields it read from the document alongside a face-similarity score between the two.
Call it
The first response is 402 with the exact price and every way to pay. Pay,
repeat the request with the proof, and you get the result.
curl -X POST https://api.glianalabs.com/v1/tools/face-compare \
-H 'content-type: application/json' \
-d '{"a":{"image_url":"https://example.com/a.jpg"},"b":{"image_url":"https://example.com/b.jpg"}}'How it works
A RetinaFace detector finds each face and an ArcFace ResNet-100 model (InsightFace buffalo_l) turns it into a 512-dimension vector. Two faces are compared by the cosine of their vectors. You get the score and the threshold it was measured against, not a pass/fail verdict, because the threshold that matters is yours: a bank may want 0.6, a marketplace 0.4.
Limits worth knowing
There is no liveness detection, so a photo of a photo can match. There is no face database: nothing is enrolled or searched on our side, and embeddings go back to you only. Faces are biometric personal data under Indonesia's UU PDP and the GDPR, so collect them only with the person's consent.
Questions
Which face recognition model does it use?
InsightFace buffalo_l: a RetinaFace detector and an ArcFace ResNet-100 recogniser producing 512-dimension embeddings. Similarity is the cosine of two embeddings; the default match threshold is 0.35.
Does it check liveness?
No. A photograph of a photograph can match. Treat the score as one signal in your own decision, not proof that a live person is present.
Do you store the images or the faces?
No face database is kept and embeddings are returned to you only. Send the image as image_base64 and nothing is written anywhere. Files uploaded to /v1/media expire after 7 days; kyc-verify deletes its upload as soon as it has read it.
Which image formats and sizes are accepted?
JPEG, PNG and WebP, by URL or base64. Up to 15 MB per image for detect, compare and embed, and 6 MB per image for kyc-verify.
Is there a free tier?
No. Every call is paid individually, with no plan or minimum. A request that fails validation is refused before it runs, so it is never charged.
Do I need an account or an API key?
No. The first response is HTTP 402 with the exact price; pay it with USDC from your own wallet and repeat the request. To prepay instead, top up a balance in rupiah and send a gk_ key.