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

Selfie-to-ID Match API

Reads an ID photo, compares its face with a selfie and returns a pass, review or fail verdict with the match score, extracted ID fields and reasons.

ID photo Live selfie 92 score Same person Liveness passed
Source
Our OCR and face recognition models, run on the images you send
Turnaround
Real time, a few seconds
Endpoint
POST /v1/face/selfie-id
Who can use it
Any business with the user's consent to process their selfie and ID image.

Overview

For many products, a selfie plus a photo of an ID is enough KYC. This API does the whole step in one call: it reads the ID with OCR, compares the face on the ID with the selfie and gives you a single verdict with reasons. It's a quick start for self-serve sign-ups, and you can add government verification of the ID number later.

Good to know

It doesn't check the ID number with the issuing authority. A good-quality fake ID with the fraudster's own photo can pass, so add source verification for risky products.

What you get

  • One call, one verdictOCR and face match combined, with a clear pass, review or fail.
  • Reasons you can act onLow face score, unreadable ID, wrong document type or photocopy, so your app can tell the user what to fix.
  • Fields for your recordsThe ID number, name and date of birth come back ready to store or verify further.
  • Pass mark you controlSet a face-match threshold per product or risk level.

Request

POST https://api.ampletrails.com/v1/face/selfie-id

FieldTypeStatusDescription
selfiestringRequiredSelfie image as base64 or HTTPS URL
id_imagestringRequiredFront of the ID document as base64 or HTTPS URL
doc_typestringOptionalExpected document type; auto-detected if omitted
thresholdnumberOptionalFace match pass threshold (0–100)

Response

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

FieldMeaningExample
verdictOverall result: pass, review or failpass
doc_typeDetected document typedl
id_numberDocument number read from the IDDL0420190012345
nameName read from the IDRAVI KUMAR
dobDate of birth read from the ID1990-05-14
match_scoreSelfie vs ID photo similarity from 0 to 10088.7
reasonsWhy a review or fail verdict was given[]

Example

curl -X POST https://api.ampletrails.com/v1/face/selfie-id \
  -H "Authorization: Bearer $AMPLE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"selfie": "data:image/jpeg;base64,…", "id_image": "data:image/jpeg;base64,…", "doc_type": "dl", "threshold": 80, "consent": "Y"}'
Response · 200 OK
{
  "status": "success",
  "request_id": "req_7f3a9c21e4",
  "data": {
    "verdict": "pass",
    "doc_type": "dl",
    "id_number": "DL0420190012345",
    "name": "RAVI KUMAR",
    "dob": "1990-05-14",
    "match_score": 88.7,
    "reasons": "[]"
  }
}

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

Use cases

Marketplace and rental sign-ups

Verify buyers, sellers or tenants in under a minute without a video call.

Gig worker onboarding

Check that the person signing up holds the DL they uploaded.

Age-gated services

Read the date of birth and match the face in one step.

Questions about this API

When does a result go to review?

When the face score is near your threshold, the ID is partly unreadable or quality flags are raised. Reviews are a small share of traffic for most teams.

Should I still verify the ID number?

For regulated or higher-risk products, yes. Run the number through PAN, DL or Voter ID verification after this step.

Which ID types work?

Aadhaar, PAN, Voter ID, DL and passport. PAN and DL photos tend to give the best face match results.

Can users upload from the gallery?

You decide. Our SDK can force a live camera capture, which makes it much harder to reuse someone else's photos.

Try the Selfie-to-ID Match API

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