Skip to main content

Liveness Detection: Preventing Spoofing in Biometrics

Liveness detection proves a live person is at the camera, not a photo, replay or deepfake. On Didit passive liveness inside a session costs $0.10 per check and active liveness costs $0.15;

Liveness Detection: Preventing Spoofing in Biometrics

Contents

In this guide

Jump to the part you need.

Liveness detection decides whether a real person is in front of the camera or a print, a screen replay, a mask or a deepfake. It fits onboarding, step-up checks and re-authentication. On Didit, passive liveness inside a session costs $0.10 per check and active liveness costs $0.15. The caveat: a score only means something once your thresholds and review policy are set.

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

Liveness options on Didit and the published session price for each
CheckWhat it provesPrice (USD)How to run it
Passive liveness, inside a sessionA single frame is likely a live face, not a print or a screen$0.10 per checkWorkflow with LIVENESS and face_liveness_method set to PASSIVE
Active liveness, inside a sessionA live person follows a random action while light patterns read depth$0.15 per checkSame feature, face_liveness_method set to ACTIVE_3D
Face match 1:1The live face matches the portrait on the ID document$0.05 per checkFACE_MATCH feature or POST /v3/face-match/
Full KYC bundleDocument, biometrics, device and IP in one decision$0.33 per checkID verification plus passive liveness, face match, and device and IP analysis

Start free in the sandbox at business.didit.me (no sales call). For developers, connect Didit to an AI assistant through the Didit MCP server. The matching product page is identity verification, and the prices are on didit.me/pricing.

One important split: the standalone passive liveness API is passive only. Active 3D and flashing are session methods selected by face_liveness_method. Use the standalone API only when your app already owns the capture step and you want a one-shot verdict on an image. Use a session when you want the selfie that passed liveness to be the same selfie compared to the document.

What a liveness check has to prove

Spoofing at the camera step comes in three common shapes. A presentation attack holds a printed photo or a screen in front of the lens. A replay attack shows a recorded video of the real user. A deepfake synthesizes a face or swaps one face onto another person's head. ISO/IEC 30107-3 is the standard that defines how presentation attack detection is tested, and iBeta is one of the labs that runs those tests. Our liveness docs list iBeta Level 1 and Level 2 PAD, and that page is the source for the accuracy figures on this page.

Liveness is one check in a chain, not the whole chain. It answers whether there is a live human at the camera. It does not answer whether that person is the owner of the document, which is face match, or whether the document is genuine, which is ID verification. Keep the three separate in your decision logic or one weak signal can pass a user.

The outcome of this how-to is a flow where every camera capture returns a status, a liveness score and named warnings you can route on. The recommended method for most teams is a session with the LIVENESS and FACE_MATCH features, so the selfie that passed liveness is the same selfie compared to the document, in one decision you fetch or receive by webhook. Use the standalone passive API only when your own app already owns the capture step and you want a one-shot verdict on an image. We run these flows for 4,000+ companies across 220+ countries. If you are moving from another vendor, the switching guide covers migration.

The camera step of a Didit verification where the user's face is captured for the liveness check
The capture step a user sees. It runs the same way in sandbox and live; only the result is simulated in sandbox.

Passive, active and flashing: choosing the liveness method

Our docs describe three methods. Passive reads a single frame with a deep learning model and looks for the artifacts and texture that separate a real face from a spoof. 3D flash projects light patterns at over 30 frames per second and reads the reflections to build a depth map, with no user action. 3D action asks for a randomized action such as blinking or nodding and reads it together with the light response.

What active liveness detection adds

Active liveness adds an unpredictable action and light-response signal that can make presentation attacks harder to execute. The trade is time: the user spends a few more seconds on the step. Our docs grade passive as the standard security option and active 3D as the highest, and the price book lists passive at $0.10 and active at $0.15. Confirm the billing line that applies to flashing before you commit to a budget.

The three liveness methods in our docs
MethodUser actionWhat the model readsBest for
PassiveNoneArtifacts, texture and single-frame featuresHigh-volume onboarding and repeated logins
3D flashNoneA depth map built from light reflectionsFinancial services and account access
3D actionRandomized blink or nodMicro-expressions plus the light responseBanking, healthcare and government flows

Method selection is a workflow setting, not code. face_liveness_method accepts PASSIVE, ACTIVE_3D or FLASHING, so you can run different workflows for different risk tiers. A suggested policy is passive at signup, then active for password resets, payee changes or high-value accounts.

Before you start: prerequisites

  • A Didit organization. Sign up at business.didit.me. The sandbox is free on every plan: sandbox testing is free and unlimited.
  • An API key for the sandbox application and a second one for live. Sandbox keys skip processing and billing.
  • Credit on the organization before live checks run, since live calls are paid per completed check from prepaid credit. Prices are here.
  • A workflow with the liveness feature, built in the console or by API as shown below.
  • A place to receive the result: a webhook endpoint, or a call to the decision endpoint after the user returns.
  • A capture surface: the hosted session URL, the Web or Mobile SDK, or your own camera step if you call the standalone API.

Step by step: add liveness to a flow

  1. Create the workflow. Send the request below with your sandbox key and persist workflow.id from the response. Set face_liveness_method to PASSIVE for a first pass; move to ACTIVE_3D later if the risk tier needs it.
    curl -X POST https://verification.didit.me/v3/workflows/ \
    -H "x-api-key: $DIDIT_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "workflow_label": "Liveness KYC",
      "workflow_type": "kyc",
      "features": [
        {"feature": "OCR"},
        {"feature": "LIVENESS", "config": {"face_liveness_method": "PASSIVE"}},
        {"feature": "FACE_MATCH"}
      ]
    }'
  2. Create a session. One call per user attempt. vendor_data is your own user id and comes back on the decision, which is what you join against your database.
    curl -X POST https://verification.didit.me/v3/session/ \
    -H "x-api-key: $DIDIT_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{"workflow_id": "$WORKFLOW_ID", "vendor_data": "user-42", "callback": "https://myapp.com/kyc/return"}'
  3. Send the user to session.url. Open it in the browser, in a webview, or mount the Web or Mobile SDK. The hosted flow handles camera capture and framing guidance, so you do not build capture logic. Session retries are documented for face match: a fixable capture failure returns feedback_codes and keeps the user on the step up to face_match_max_attempts, default 3. The standalone API is single-shot.
  4. Register a webhook destination with POST /v3/webhook/destinations/ and subscribe to status.updated. Verify the X-Signature-V2 header and de-duplicate on event_id. Answer within 5 seconds; slower answers and 5xx responses are retried twice, then dropped. Details are in the webhooks docs.
  5. Read the decision with GET /v3/session/{session_id}/decision/ as the fallback for a missed webhook. The payload is plural: liveness_checks[] holds one entry per liveness node and face_matches[] holds the comparison to the document portrait. The shape is documented in the data models reference.
  6. Route on status. Approve only when the liveness entry is Approved. Send Declined with LIVENESS_FACE_ATTACK or LOW_LIVENESS_SCORE to review or a rejection screen, never to automatic approval. For face match, the session threshold is set in the workflow; do not copy the standalone default into every session.
  7. Test the outcome in sandbox. Sandbox runs the real capture but returns simulated results from scenarios and magic values, so you can reproduce Approved, Declined and In Review without real PII or billing. The sandbox testing page lists the scenarios.
  8. Switch to the live key once the organization has credit. Nothing else changes: same endpoint, same payload, same decision shape.
A liveness result in the Didit Business Console showing the method, score and warnings for one session
The liveness section of a session in the console. The method, score and warnings are the fields your policy should read.

Standalone example: check a selfie you already have

If your app already captures the selfie, one server-to-server call returns a liveness verdict. The endpoint is passive only. It accepts jpg, jpeg, png, tiff and webp up to 5 MB, rejects PDFs, and returns in sub-2 seconds per our docs.

curl -X POST 'https://verification.didit.me/v3/passive-liveness/' \
-H 'x-api-key: YOUR_API_KEY' \
-F 'user_image=@./selfie.jpg' \
-F 'save_api_request=true' \
-F 'vendor_data=user-123'

Keep save_api_request at its default true if you want the call persisted as an API-type session, with the reference image stored and the face enrolled in your face search index. Set it to false for a one-shot check that stores nothing and enrolls nothing; blocklist and duplicate screening still run. Each 200 response is billed as a standalone passive liveness call, and the live price feed lists that per-call price as its own line, separate from the $0.10 session price.

Expected output

A 200 response from the standalone endpoint comes back in this shape:

{
  "request_id": "...",
  "liveness": {
    "status": "Approved",
    "method": "PASSIVE",
    "score": 92,
    "user_image": {"entities": [...], "best_angle": "..."},
    "warnings": [],
    "face_quality": 88,
    "face_luminance": 74
  }
}

Inside a session the same data appears in liveness_checks[], with the status enum Not Started, In Progress, Approved, In Review, Declined, Abandoned or Kyc Expired. The score runs from 0 to 100. The standalone passive liveness API declines at or below its configured threshold, default 30. In a session, read the status and warnings, and set your review policy around those signals.

Inputs and outputs

Standalone passive liveness: what you send and what comes back
FieldDirectionNotes
x-api-keyRequest headerApplication API key. Missing or invalid credentials return 403; this endpoint never returns 401.
user_imageRequest, requiredFront-facing face image in jpg, jpeg, png, tiff or webp, max 5 MB. Images are compressed to about 0.5 MB before processing.
save_api_requestRequest, optionalDefault true. Persists the session, stores the images and enrolls the face; false makes the call one-shot.
vendor_dataRequest, optionalYour user id. Faces with the same vendor_data are excluded from duplicate and blocklist matches.
statusResponseDecision for this check. Declined fires when any error-severity warning is present.
scoreResponseLiveness score 0 to 100. On the standalone API, at or below the configured decline threshold, default 30, the check declines.
warnings[]ResponseNamed risk codes such as LIVENESS_FACE_ATTACK or MULTIPLE_FACES_DETECTED, catalogued on the liveness warnings page.
face_quality, face_luminanceResponse0 to 100 capture quality signals, useful for retry messages.

Failure cases and recovery

What goes wrong on a liveness call and what to do
SymptomMeaningRecovery
403Out of credits, or missing or invalid API keyTop up, or use the sandbox key while testing, since sandbox bypasses the balance check.
400Missing user_image, file over 5 MB, unsupported extension, or a PDFConvert to jpg or png, resize below 5 MB, resend. Malformed input returns 400 in sandbox too.
429Shared write budget of 300 requests per minute per API key exceededSlow the caller or spread load, then retry after the window.
Declined with LIVENESS_FACE_ATTACKThe model detected a presentation attackDo not approve. Offer a second attempt on another device, then route to human review.
Declined with LOW_LIVENESS_SCOREScore at or below the threshold, often from bad light or a partial faceAsk for a retry with guidance, and read face_luminance and face_quality to see why.
NO_FACE_DETECTED or MULTIPLE_FACES_DETECTEDNo usable face, or more than one person in frameAsk for a retry with a single, well-framed face. MULTIPLE_FACES_DETECTED is warning severity and does not decline on its own.
FACE_IN_BLOCKLISTThe face matches an entry on your blocklistBlock or route to review per your policy. Same vendor_data faces are exempt from this screen.
DUPLICATED_FACEThe same face already appeared in another approved sessionInformation only, never declines. Use it as a multi-account abuse signal.

Retry budgets belong to the session flow, not the standalone call. In a session, face match documents a retry budget: a fixable capture failure returns feedback_codes and keeps the user on the step up to face_match_max_attempts, default 3. The standalone endpoint is stateless and single-shot, so you build the retry yourself. Do not assume the same retry behaviour for every liveness method; route on the warnings and status you receive.

Billing starts when a check finishes with a result. In a session that runs ID, passive liveness, face match and IP analysis, the price is $0.33 for the whole check: $0.15 + $0.10 + $0.05 + $0.03. A liveness-only node is its own line at $0.10 passive or $0.15 active. The standalone passive API is a separate per-call line in the live price feed, not the $0.10 session price; check didit.me/pricing before you size that route.

Two review boundaries matter more than the price. First, liveness does not prove identity: a live human who is not the account holder can still pass liveness. Face match against the document runs next. In a session the face-match threshold is set in the workflow, so choose it from your own risk policy. The standalone face-match API declines a similarity score of 30 or below by default. Second, a model decision is not a policy decision: In Review exists so a person can look at LIVENESS_FACE_ATTACK, a blocklist hit or a duplicated face before you take an irreversible action. Set thresholds and review rules before you raise volume.

Worked cost example

Take 10,000 completed KYC checks in a month with passive liveness. Each check is $0.15 + $0.10 + $0.05 + $0.03 = $0.33, so 10,000 x $0.33 = $3,300.00 at list price. On Growth the 4% discount makes each check $0.3168, so 10,000 x $0.3168 = $3,168.00, and the $115 monthly credit covers the first $115 of it. On Scale the 10% discount makes each check $0.297, so 10,000 x $0.297 = $2,970.00, with $350 of monthly credit.

Now switch the same volume to active liveness: $0.15 ID + $0.15 active + $0.05 face match + $0.03 IP = $0.38 per check, so 10,000 x $0.38 = $3,800.00 at list price. If you run passive liveness as its own workflow step without ID or face match, 10,000 x $0.10 = $1,000.00 at list price. The standalone passive liveness API has its own per-call line in the live price feed; confirm that number on didit.me/pricing before you size that route.

Sources

Next step: open business.didit.me, create a sandbox application and run your first liveness session. No sales call, and the sandbox sessions are free.

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

Alejandro Rosas

Co-founder and CTO

Alejandro Rosas

Alejandro Rosas

Co-founder and CTO

About Didit

Questions

Frequently asked questions

What is active liveness detection?

Active liveness detection asks the user to perform something during capture, such as blinking or nodding, and confirms it happened in real time. Didit's 3D action method also projects light patterns and reads the reflections, so an attacker has to fake a movement and a depth response at once. It runs when a workflow sets face_liveness_method to ACTIVE_3D and costs $0.15 per check.

Is passive liveness less secure than active liveness?

Our docs grade passive as standard security and active 3D as the highest, because passive reads a single frame while active adds an unpredictable action and a depth response. Passive is the right choice for high-volume steps such as signup, and our liveness docs publish 99.9% accuracy with a false acceptance rate under 0.1%. Use active where the value at risk justifies a few extra seconds.

How much does liveness detection cost on Didit?

Passive liveness inside a session costs $0.10 per check and active liveness costs $0.15. A full KYC check at $0.33 already includes passive liveness along with ID document verification, face match and IP analysis. The standalone passive liveness API is a separate per-call line in the price book, and Growth takes 4% off every Didit price while Scale takes 10%.

Can a deepfake pass a liveness check?

No detection model should be sold as impossible to beat, so treat a liveness score as evidence rather than a guarantee. Didit's docs publish 99.9% accuracy with a false acceptance rate under 0.1%, and every error-severity signal such as LIVENESS_FACE_ATTACK returns Declined rather than Approved. Keep a review path for declines so a new attack pattern reaches a person.

What does a declined liveness check mean?

A check returns Declined when any error-severity warning fires: NO_FACE_DETECTED, LOW_LIVENESS_SCORE at or below the configured threshold, LIVENESS_FACE_ATTACK, or a blocklist match. The standalone passive liveness API uses a default decline threshold of 30; in a session, read the status and warnings together. The response also carries the score, face_quality and face_luminance, which tell you whether the cause was a bad capture or a suspected spoof.

Does Didit store the selfie it checks?

With save_api_request at its default true, the call is persisted as an API-type session, the reference image and face crop are stored, and the face is enrolled in your face search index. With false the call is one-shot: nothing is stored and nothing is enrolled, though blocklist and duplicate screening still run. In sandbox no session is persisted at all.

Can I test liveness without paying?

Yes. Sandbox testing is free and unlimited, and sandbox keys skip processing and billing. In a sandbox workflow the liveness capture runs for real, so you can hand a phone to a colleague and see the exact experience users get, while the result comes from a scenario or magic value. On the standalone endpoint a sandbox key returns a static approved mock payload.

What is the difference between liveness and face match?

Liveness proves a live human is at the camera. Face match compares that live face to the portrait on the ID document and returns a similarity score from 0 to 100. In a session the face-match threshold is set in the workflow; the standalone face-match API declines a score of 30 or below by default. They are separate invoice lines at $0.10 and $0.05.

What is iBeta Level 1 PAD?

iBeta is a lab that tests presentation attack detection against ISO/IEC 30107-3, the international standard for how those tests are run and reported. iBeta Level 1 PAD is in our certification list, and our liveness docs also list Level 2 for passive liveness. Ask any vendor for the level and the test report, not just the word certified.

Which method should I use for a login step?

For repeated logins, passive liveness keeps the interaction short at $0.10 per check; move to active when the account holds value or the action is sensitive, such as changing a payout account. The Authentication product prices biometric authentication at $0.10 per auth and gives the first 50,000 active users each month free. The authentication page covers the sign-in side.

Do I need to build my own camera interface?

No. The hosted session URL and the Web and Mobile SDKs handle camera capture and framing guidance, and the result arrives by webhook or through the decision endpoint. Session retries are documented for face match, where a fixable capture failure keeps the user on the step up to face_match_max_attempts, default 3; the standalone passive API is single-shot. The quick start walks the session route end to end.

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.