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 Search API (1:N)

Searches a face against your private gallery and returns any existing users above your similarity threshold, with their IDs and scores. It can also enrol the new face.

ID photo Live selfie 92 score Same person Liveness passed
Source
Our face recognition model, searching a gallery of faces you have enrolled
Turnaround
Real time, usually one to two seconds
Endpoint
POST /v1/face/search
Who can use it
Businesses with a clear fraud-prevention purpose and user notice and consent covering face storage.

Overview

Fraudsters change names, PANs and phone numbers. Their face stays the same. Face search (1:N) compares a new user's face with a private gallery of your existing users and returns any close matches. It's how lenders catch repeat defaulters under a new identity and how gaming apps stop one person running twenty accounts.

Good to know

It only finds people already in your gallery. A match score is evidence for a review, not proof of identity.

What you get

  • Your own galleryFaces are stored in a gallery that belongs to you. We don't search across clients.
  • Search and enrol in one callSearch for duplicates and add the new face to the gallery in the same request.
  • Your IDs backMatches come back with your own user IDs, so you can open the old account straight away.
  • Delete on requestRemove a face from the gallery when a user closes their account or withdraws consent.

Request

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

FieldTypeStatusDescription
imagestringRequiredFace image as base64 or HTTPS URL
gallery_idstringRequiredYour face gallery to search in
top_knumberOptionalMaximum number of candidates to return
thresholdnumberOptionalMinimum similarity to include a candidate (0–100)
enrollbooleanOptionalAdd this face to the gallery after searching
external_idstringOptionalYour user ID to attach to the enrolled face

Response

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

FieldMeaningExample
duplicate_foundWhether any candidate met the thresholdtrue
candidatesMatching faces sorted by score[…]
candidates[].external_idYour user ID for the matched faceuser_88412
candidates[].scoreSimilarity score from 0 to 10096.1
enrolled_face_idID of the newly enrolled face, if enroll was truefc_7d1e9a

Example

curl -X POST https://api.ampletrails.com/v1/face/search \
  -H "Authorization: Bearer $AMPLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"image": "data:image/jpeg;base64,…", "gallery_id": "customers-prod", "top_k": 5, "threshold": 85, "enroll": true, "external_id": "user_102938", "consent": "Y"}'
Response · 200 OK
{
  "status": "success",
  "request_id": "req_7f3a9c21e4",
  "data": {
    "duplicate_found": true,
    "candidates": {
      "external_id": "user_88412",
      "score": 96.1
    },
    "enrolled_face_id": "fc_7d1e9a"
  }
}

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

Use cases

Repeat defaulters

Flag an applicant whose face matches a written-off borrower, even if every document is new.

Bonus abuse in gaming

Spot one person behind many accounts claiming sign-up bonuses.

Blacklists

Keep a gallery of known fraudsters and check every new sign-up against it.

Questions about this API

How large can a gallery be?

Galleries can hold millions of faces. Search time grows slowly with size; tell us your expected volume and we'll size it.

Is storing faces allowed?

Face images are personal data under the DPDP Act. Tell users why you keep them, keep them only as long as you need them and delete them on request. We can help with the notice text.

What should we do with a match?

Treat it as a lead for review, not an automatic rejection. Twins and lookalikes exist, and a human should look before you act.

Can we search without enrolling?

Yes. Set enroll to false to search only, for example when checking a user against a blacklist.

Try the Face Search API (1:N) API

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