AmpleTrails, Gurugram · since 2012 +91 93154 41053 WhatsApp info@ampletrails.com Developer guide · Guides
Products
Identity verificationBusiness verification (KYB)Bank, income & creditFace match & OCRVideo KYC, eSign & flowsCompliance & riskPayouts & messagingAll 52 APIs
Use cases
Customer onboarding (KYC)Merchant & seller onboarding (KYB)Vendor & supplier verificationEmployee background checksGig and field worker onboardingLoan underwritingPayout and refund validationDuplicate and synthetic identity detection
Industries
Fintech & Digital LendingBanks & NBFCsInsuranceBroking, Mutual Funds & WealthCrypto & VDA PlatformsReal-money GamingE-commerce & MarketplacesStaffing, Gig & HRTelecomMobility & LogisticsReal Estate & RentalsB2B & Procurement
Resources
GuidesGlossaryFAQSecurity & data
DevelopersPricingAbout
Theme
Get API keysCall +91 93154 41053

Face Match API

Compares a selfie with a reference face photo and returns a similarity score, whether it passes your threshold, and quality flags for the selfie.

ID photo Live selfie 92 score Same person Liveness passed
Source
Our face recognition model, comparing the two images you send
Turnaround
Real time, usually about a second
Endpoint
POST /v1/face/match
Who can use it
Any business with the user's consent to process their photo for verification.

Overview

Face match answers one question: is the person in this selfie the same person as in this reference photo? The reference can be a PAN or DL photo, the Aadhaar eKYC photo or a DigiLocker document. You get a 0 to 100 score, plus a quality check on the selfie so you can ask for a retake instead of failing someone over a blurry photo.

Good to know

It compares photos only. On its own it does not detect spoofs like printed photos or screens, and old or poor ID photos lower the score.

What you get

  • Your thresholdSet a strict pass mark for high-value loans and a softer one for low-risk sign-ups. The response tells you which threshold was used.
  • Quality check firstBlur, poor lighting, a tiny face or two faces in frame come back as quality flags, so the user can retake.
  • Works with old ID photosPAN and Aadhaar photos are often years old and low resolution. The model is tuned for Indian ID photos, not studio shots.
  • Images not keptImages are processed for the request and not retained unless you ask us to store them.

Request

POST https://api.ampletrails.com/v1/face/match

FieldTypeStatusDescription
selfiestringRequiredSelfie image as base64 or HTTPS URL
referencestringRequiredReference face (ID photo, eKYC photo) as base64 or URL
thresholdnumberOptionalYour pass threshold (0–100); defaults to a recommended value

Response

Fields inside data. Every response also carries status, request_id and, on errors, message. See error codes.

FieldMeaningExample
match_scoreSimilarity score from 0 to 10092.4
is_matchWhether the score meets your thresholdtrue
threshold_usedThreshold applied to this request80
selfie_qualityQuality check on the selfie (blur, lighting, face size)good
faces_detectedNumber of faces found in the selfie1

Example

curl -X POST https://api.ampletrails.com/v1/face/match \
  -H "Authorization: Bearer $AMPLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"selfie": "data:image/jpeg;base64,…", "reference": "data:image/jpeg;base64,…", "threshold": 80, "consent": "Y"}'
Response · 200 OK
{
  "status": "success",
  "request_id": "req_7f3a9c21e4",
  "data": {
    "match_score": 92.4,
    "is_match": true,
    "threshold_used": 80,
    "selfie_quality": "good",
    "faces_detected": 1
  }
}

Example data. The exact field list for your account comes with your sandbox documentation.

Use cases

Selfie step in KYC

Match the selfie to the eKYC or DigiLocker photo as the last step of digital onboarding.

Payout and login re-checks

Ask for a quick selfie before a large withdrawal or a change of bank account.

Field agent visits

Confirm the customer the agent visited is the applicant on file.

Questions about this API

What threshold should we use?

Start with our recommended default and look at your own data for a few weeks. Most teams send scores just below the pass mark to manual review rather than rejecting them.

Is face match the same as liveness?

No. Face match compares two photos. It doesn't prove the selfie was taken live; someone could hold up a printed photo. Pair it with liveness in our SDK or Video KYC for higher-risk flows.

Does it work with masks, glasses or beards?

Glasses are usually fine. Masks, heavy filters and strong backlight lower the score. The quality flags tell you why.

How big should the images be?

A face of at least 200 pixels across is enough. Very large images slow the call; resize to around 1000 pixels on the long side.

Try the Face Match API

Sandbox keys, the full field reference and a Postman collection, usually within a working day.