Skip to main content

Face Embedding for Identity Verification: A How-To for 2026

Face Match compares a selfie to an ID portrait for $0.05 per check and returns a 0 to 100 score. Face Search finds duplicates at $0.05 per search. We publish the threshold and retry behavior;

Face Embedding for Identity Verification: A How-To for 2026

Contents

In this guide

Jump to the part you need.

Face embedding turns a face into a numeric vector so software can compare it with another face. Use it for two jobs: 1:1 matching of a live selfie against an ID portrait, and 1:N search against users you already verified. On Didit, Face Match costs $0.05 per check and Face Search $0.05 per search. We supply the documented thresholds and retry behavior; you set the review policy and handle the legal notices.

Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.

Face embedding checks on Didit and the published unit price
CheckPublished priceUnit
Face Match 1:1$0.05per check
Face Search 1:N$0.05per search
Passive Liveness$0.10per check
ID document verification$0.15per check
Full ID check, which is ID document plus passive liveness plus face match plus device and IP$0.33per check
Biometric Authentication$0.10per authentication
Biometric template retentionNo separate line in the published price bookper template

Start free in the sandbox at business.didit.me; there is no sales call. If you would rather have an AI assistant or a coding agent make the calls, connect the Didit MCP server. Every number in this post is published on the pricing page and in the pricing documentation.

What a face embedding is

A face embedding is the numeric output of a face model. Detection finds the face, the model converts the cropped face into a vector, and comparison happens in that vector space instead of on pixels. Two photos of the same person land close together; two different people land further apart.

Didit handles the vector for you and returns a score from 0 to 100 plus a status. The standalone Face Match API approves only when the score is strictly above the decline threshold, which defaults to 30. You never touch the embedding itself.

A retained biometric template keeps the numeric face template and retention metadata only. It is image-free and excludes the face image, the liveness video, the document data, the extracted identity fields and the decision, which is why duplicate detection can keep working after the source session is deleted.

The outcome you get, and the route we recommend

The outcome is a decision per check: a similarity score, a status, and warnings that explain anything unusual. The route is decided by one question: does a user go through a hosted flow, or do you already hold the two images? Pick one route per step.

  • Session based, for onboarding. Add the FACE_MATCH feature to a workflow that already runs ID_VERIFICATION and LIVENESS. The document portrait becomes the reference image, the liveness selfie becomes the user image, and the user gets an attempt budget with coaching messages instead of a hard fail on a bad photo. See the Face Match overview.
  • Standalone API, for server to server. Use POST /v3/face-match/ when you already hold two images and want a one-shot score, for example re-checking a stored portrait against a new selfie. The standalone call is one-shot and has no retry budget. With save_api_request=true, it persists an API session and stores the request. See the Face Match API reference.
  • Face Search 1:N, for duplicates and blocklists. Use POST /v3/face-search/ when the question is who else in your base this face matches, not whether two photos show the same person. See the Face Search overview.

One thing to avoid: sessions already run a 1:N search automatically during the liveness check, against your blocklist and your approved users. That happens without a separate Face Search call, so add the call only when you need the ranked match list inside your own systems.

Prerequisites

  • A Didit organization and an API key from the Business Console. Sandbox keys cost nothing and skip processing and billing.
  • Credit on a live account. A call the balance cannot cover returns HTTP 403 before any image processing.
  • Two images for a 1:1 check: user_image for the live capture and ref_image for the reference portrait. JPEG, PNG, WebP or TIFF, 5 MB maximum each.
  • A workflow containing ID_VERIFICATION, LIVENESS and FACE_MATCH if you use sessions, built in the Business Console or with POST /v3/workflows/.
  • A documented consent step if you serve Illinois, Texas or Colorado, where a notice and an explicit release are required before you collect face geometry, whether from a selfie or from the photo on an ID.
  • A review policy: who handles In Review, and what your team does with a possible blocklist match.

Step by step

  1. Create a sandbox key. Sign up at business.didit.me and copy an API key from the console. Malformed requests still return HTTP 400 in sandbox, so you can test your error handling before you pay for anything.
  2. Choose the delivery mode. Session based if a human goes through a flow, standalone if two images already exist. Do not build both for the same step.
  3. Build the workflow. Add FACE_MATCH next to ID_VERIFICATION and LIVENESS. The reference image is the document portrait and the user image is the live selfie, so the two inputs arrive from the flow rather than from your server.
  4. Create a session. Call POST /v3/session/ with workflow_id, vendor_data and callback, then open the returned session.url for the user or mount the Web or Mobile SDK.
  5. Read the decision. Fetch GET /v3/session/{sessionId}/decision/ or subscribe to the session.status.updated webhook. The face matching result sits in the face_matches[] array on the decision payload.
  6. Or call Face Match directly. The standalone call takes two files and returns a score in one response.
curl -X POST 'https://verification.didit.me/v3/face-match/' \
-H 'x-api-key: YOUR_API_KEY' \
-F 'user_image=@./selfie.jpg' \
-F 'ref_image=@./id_portrait.jpg' \
-F 'save_api_request=true' \
-F 'vendor_data=user-123'
The face capture step in a Didit verification flow, with the selfie being taken
The selfie taken here becomes user_image in a session based face match.
  1. Set the threshold. Pass face_match_score_decline_threshold if a default of 30 is not right for you. A score strictly above it returns Approved; a score at or below it returns Declined with a LOW_FACE_MATCH_SIMILARITY warning.
  2. Decide retries. In a session, face_match_max_attempts sets the total submissions per session. The default is 3, one initial attempt plus two retries, and the range is 1 to 3 per workflow node. The user sees coaching messages driven by feedback_codes while attempts remain.
  3. Add duplicate detection. Send the same face to Face Search to see who else in your base it matches.
curl -X POST 'https://verification.didit.me/v3/face-search/' \
-H 'x-api-key: YOUR_API_KEY' \
-F 'user_image=@./selfie.jpg' \
-F 'search_type=most_similar' \
-F 'save_api_request=true' \
-F 'vendor_data=user-123'
  1. Decide what happens on deletion. By default, deleting a session deletes the face embedding that powered Face Search for it. If you need duplicate detection to keep working, opt in to retention with retain_face_embeddings and face_retention_days, or send deletion_instruction: privacy_erasure to purge every retained template for that person.

Expected output

Face Match returns one object with a status and a score. A score of null with a NO_REFERENCE_IMAGE warning means no face pair could be scored at all; the call still returns HTTP 200. With save_api_request=false the score is 0 instead of null, nothing is stored, and the request_id is a one-off correlation UUID you cannot look up later.

The liveness section of a session in the Didit Business Console
The liveness and face match evidence for one session, as your reviewers see it in the console.

In a session, retryable failures return a body like this one, which the Web and Mobile SDKs turn into coaching text:

{
  "detail": "Make sure your face matches your document photo, improve lighting and try again.",
  "error": "LOW_FACE_MATCH_SIMILARITY",
  "feedback_codes": ["LOW_FACE_MATCH_SIMILARITY"],
  "attempts_used": 1,
  "max_attempts": 3
}
Inputs and outputs of the Didit face APIs
FieldCallDirectionNotes
user_imageFace Match, Face SearchInputLive or candidate face, one front-facing face per image, 5 MB maximum
ref_imageFace MatchInputReference portrait, usually the ID document photo
face_match_score_decline_thresholdFace MatchInputFloat, default 30, approved only when the score is strictly above it
rotate_imageFace MatchInputSet true when captures may be sideways or upside down
save_api_requestFace Match, Face SearchInputDefault true; persists an API session, stores the images and enrolls the searched face
search_typeFace SearchInputmost_similar by default, or blocklisted_or_approved for blocklist screening
request_idBothOutputA real session id when the call is persisted, otherwise a one-off correlation UUID
face_match.status and face_match.scoreFace MatchOutputStatus enum and a score from 0 to 100
face_matches[]Session decisionOutputPer-feature array carrying the same status and score for the session flow
warnings[]BothOutputRisk codes such as LOW_FACE_MATCH_SIMILARITY or MULTIPLE_FACES_DETECTED
face_search.total_matches and matches[]Face SearchOutputUp to 5 ranked matches, each with similarity_percentage and is_blocklisted

Failure cases and recovery

What each failure means and what to do next
SignalCauseRecovery
HTTP 400Missing user_image or ref_image, file over 5 MB, unsupported extensionFix the request; nothing is processed or billed
HTTP 403No credits on the balance, or a missing or invalid keyTop up or rotate the key; this API never returns 401
HTTP 429More than 300 write requests a minute on one keyBack off and retry; the budget is shared across all write endpoints
Declined with LOW_FACE_MATCH_SIMILARITYThe two faces do not matchDo not approve; follow your review policy
NO_FACE_DETECTED or MULTIPLE_FACES_DETECTEDA capture problem, not an identity problemAsk the user to retake; the session flow does this with coaching text
NO_REFERENCE_IMAGENo usable face in the reference fileResend a clean ID portrait
Face Search HTTP 400No detectable face in user_imageRetake the photo
FACE_IN_BLOCKLISTA definitive blocklist hitReject automatically
POSSIBLE_FACE_IN_BLOCKLISTA borderline match below the hard thresholdRoute to a human reviewer
DUPLICATED_FACEThe person is already verified under another vendor_dataMerge or block according to your own policy

A Face Match response with HTTP 200 consumes one credit at $0.05. A Face Search response with HTTP 200 consumes one credit at $0.05. Requests rejected with 400 or 403 return before image processing, and sandbox calls consume nothing. Deleting a session does not refund credits already used, and the workflow orchestrator, SDKs and MCP server carry no fee.

The model does not decide your risk appetite. We supply the documented threshold, the published retry budget through face_match_max_attempts with its default of 3, and the warning codes. You set everything above that line: whether a borderline score goes to review, whether a duplicate account is merged or blocked, how long an In Review case may sit, and which notices you serve. Assign an owner for each path before you go live.

Didit serves 4,000+ active companies.

In Illinois (BIPA), Texas (CUBI) and Colorado the law is generally read to require a notice and an explicit release before a business collects face geometry, whether it comes from a selfie or from the photo on an ID. That summary is not legal advice, and the rules differ by market. Didit ships a consent step for those triggers inside the verification flow, and the biometric consent documentation lists the triggers, the native SDK version that carries the step, and the decision fields that record the consent outcome.

Those fields are evidence, not the obligation itself. As the controller you own the notice text, the lawful basis under GDPR Article 9, the retention window you configure, the answer to an erasure request, and the record that ties one person's consent to one check. Write the notice before you turn on template retention, and route an erasure request to deletion_instruction: privacy_erasure, which purges every retained template for that person. This is a product description, not legal advice: confirm the obligations that apply in each market you serve.

Worked cost example

The totals below are usage at published unit prices, before any plan fee. Plan fees and the monthly credit each plan includes are shown separately.

Take 10,000 new users in a month, each going through the full ID check, with a duplicate screen at signup. At list price the full ID check is $0.15 for the ID document, $0.10 for passive liveness, $0.05 for face match and $0.03 for device and IP, which is $0.33. So 10,000 x $0.33 = $3,300. Face Search adds 10,000 x $0.05 = $500. Total $3,800 for the month, which is $0.38 per user.

On Growth every Didit price drops 4 percent: $0.33 x 0.96 = $0.3168, so 10,000 x $0.3168 = $3,168, and $0.05 x 0.96 = $0.048, so 10,000 x $0.048 = $480. Usage total $3,648. Plan credit is applied to usage first: the $115 included with Growth reduces that bill and expires at the end of the plan month, and the $99 monthly fee is charged on top.

On Scale the same maths runs at 10 percent off: $0.33 x 0.90 = $0.297, so 10,000 x $0.297 = $2,970, and $0.05 x 0.90 = $0.045, so 10,000 x $0.045 = $450. Usage total $3,420. The $350 of credit included with Scale is applied to usage first and expires at the end of the plan month, and the $299 monthly fee is charged on top.

If you only need the 1:1 comparison on images you already hold, the standalone call is 10,000 x $0.05 = $500, with no document or liveness step.

Sources

The next step is a sandbox key: open business.didit.me, run one Face Match call against two test images, then raise face_match_score_decline_threshold until the outcome matches your risk policy. No sales call is needed to start.

Try it

Try this in the sandbox

Run the check this guide describes, free.

ID Verification

The product this post is about, taken from its topic. Run it free in the sandbox.

$0.15 per checkStart free

Author

Alberto Rosas

Co-founder and CEO

Alberto Rosas

Alberto Rosas

Co-founder and CEO

About Didit

Questions

Frequently asked questions

What is a face embedding in identity verification?

A face embedding is a numeric representation produced by a face model from a face image. Photos of the same person produce vectors that sit close together in that space, so matching becomes a distance calculation instead of a pixel comparison. Didit uses this to score a selfie against an ID portrait and to search a face across your verified users.

How much does face matching cost on Didit?

Face Match costs $0.05 per check and Face Search costs $0.05 per search on the published price list. Inside a full ID check, face match is one of four lines that add up to $0.33. Sandbox calls are not billed and consume no credits.

What similarity score counts as a match?

The standalone Face Match API returns a score from 0 to 100 and approves only when the score is strictly above face_match_score_decline_threshold, which defaults to 30. A score at or below the threshold returns Declined with a LOW_FACE_MATCH_SIMILARITY warning. Raise the threshold for higher-assurance flows and expect more retries and more reviews.

Can face embedding stop duplicate accounts?

Yes, with 1:N search. Face Search compares the largest face in an uploaded image against faces enrolled from your sessions, saved API calls, user profile uploads and your lists, and returns up to five ranked matches with a similarity_percentage. Faces enrolled by a Face Search call are excluded from later Face Search results, so repeated searches never match each other. Sessions also run this check automatically during liveness.

Does Didit keep the face image when I delete a session?

By default, no. Deleting a session deletes the face embedding with it. If you opt in to biometric-template retention, Didit keeps one image-free template anchored to the User with a finite expiry, and you can list, inspect or purge it through the Biometric Templates API. A retained template is biometric data, so enable it only when your privacy notice covers it.

Do I need separate consent for face matching?

Illinois, Texas and Colorado require a notice and an explicit release before a business collects face geometry, whether from a selfie or from the photo on an ID. Didit runs a documented consent step for those triggers and records the outcome on the decision. The notice text, the lawful basis and the record keeping are yours as the controller, and you should check every market you serve.

What happens when the selfie does not match the ID photo?

In a session, a retryable failure such as a dark or blurred selfie, or a borderline similarity, keeps the user on the step and returns feedback_codes, up to face_match_max_attempts, which defaults to 3. When the attempt budget is exhausted, the computed status applies: Declined or In Review. The standalone API is single-shot and returns the score directly.

Which files does the face API accept?

JPEG, PNG, WebP and TIFF, up to 5 MB per image. Images are compressed to about 0.5 MB before processing, so a higher resolution file does not improve accuracy. Submit one clear front-facing face per image, and set rotate_image to true if a capture may be sideways.

How fast is a face match?

Didit documents the Face Match API as a sub-2-second match score, and inference latency across the platform is a sub-2-second p99. Your end-to-end time also depends on upload size and network path. Sandbox keys return a static Approved mock payload without processing.

Can I use face matching for login instead of onboarding?

Logins are a separate line on the price list. Biometric Authentication is $0.10 per authentication, and the first 50,000 active users each month are free. That is billed apart from Face Match at $0.05 per check, so keep the two lines separate in your cost model.

Compliance built in

Audited, certified and attested.

We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center

  • Regulation encoded into your flows

    Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.

  • Ready for AMLR

    Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.

  • Tested in Spain's Treasury sandbox

    Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.

  • Audited, not self-declared

    iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.

Compliance assistant

Your obligations · 3 regions

EU · AMLRCustomer due diligence, human reviewCovered
Illinois, Texas, ColoradoExplicit biometric consentCovered
Germany · Youth protectionVerified adults only (JMStV)Covered
Workflow checked. Every obligation is met
  • SOC 2 Type 2
  • ISO 27001
  • iBeta Level 1 and Level 2
  • EU regulator attestation
  • FSM youth protection
  • GDPR
  • EBA remote onboarding
  • MiCA compatible
  • FIDO Alliance member
  • AMLREU AML Regulation ready

Integration · Didit MCP

Run Didit from your own AI agent

Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.

Add to ClaudeChatGPT
Didit Academy · Lesson 04 · Use Didit with MCP
  • Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
  • Run investigationsAsk why a session was declined, review cases, search people and companies.
  • Change rulesCreate payment rules, test them on past data and switch them on.
  • Pull reportsAsk for numbers, exports or the audit log.

Verify your first user today.

Start free

Free sandbox. Credit applies to work-email sign-ups.