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;

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.
| Check | What it proves | Price (USD) | How to run it |
|---|---|---|---|
| Passive liveness, inside a session | A single frame is likely a live face, not a print or a screen | $0.10 per check | Workflow with LIVENESS and face_liveness_method set to PASSIVE |
| Active liveness, inside a session | A live person follows a random action while light patterns read depth | $0.15 per check | Same feature, face_liveness_method set to ACTIVE_3D |
| Face match 1:1 | The live face matches the portrait on the ID document | $0.05 per check | FACE_MATCH feature or POST /v3/face-match/ |
| Full KYC bundle | Document, biometrics, device and IP in one decision | $0.33 per check | ID 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.
Outcome and recommended method
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.

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.
| Method | User action | What the model reads | Best for |
|---|---|---|---|
| Passive | None | Artifacts, texture and single-frame features | High-volume onboarding and repeated logins |
| 3D flash | None | A depth map built from light reflections | Financial services and account access |
| 3D action | Randomized blink or nod | Micro-expressions plus the light response | Banking, 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
- Create the workflow. Send the request below with your sandbox key and persist
workflow.idfrom the response. Setface_liveness_methodtoPASSIVEfor a first pass; move toACTIVE_3Dlater 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"} ] }' - Create a session. One call per user attempt.
vendor_datais 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"}' - 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 returnsfeedback_codesand keeps the user on the step up toface_match_max_attempts, default 3. The standalone API is single-shot. - Register a webhook destination with
POST /v3/webhook/destinations/and subscribe tostatus.updated. Verify theX-Signature-V2header and de-duplicate onevent_id. Answer within 5 seconds; slower answers and 5xx responses are retried twice, then dropped. Details are in the webhooks docs. - 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 andface_matches[]holds the comparison to the document portrait. The shape is documented in the data models reference. - Route on status. Approve only when the liveness entry is
Approved. SendDeclinedwithLIVENESS_FACE_ATTACKorLOW_LIVENESS_SCOREto 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. - Test the outcome in sandbox. Sandbox runs the real capture but returns simulated results from scenarios and magic values, so you can reproduce
Approved,DeclinedandIn Reviewwithout real PII or billing. The sandbox testing page lists the scenarios. - Switch to the live key once the organization has credit. Nothing else changes: same endpoint, same payload, same decision shape.

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
| Field | Direction | Notes |
|---|---|---|
x-api-key | Request header | Application API key. Missing or invalid credentials return 403; this endpoint never returns 401. |
user_image | Request, required | Front-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_request | Request, optional | Default true. Persists the session, stores the images and enrolls the face; false makes the call one-shot. |
vendor_data | Request, optional | Your user id. Faces with the same vendor_data are excluded from duplicate and blocklist matches. |
status | Response | Decision for this check. Declined fires when any error-severity warning is present. |
score | Response | Liveness score 0 to 100. On the standalone API, at or below the configured decline threshold, default 30, the check declines. |
warnings[] | Response | Named risk codes such as LIVENESS_FACE_ATTACK or MULTIPLE_FACES_DETECTED, catalogued on the liveness warnings page. |
face_quality, face_luminance | Response | 0 to 100 capture quality signals, useful for retry messages. |
Failure cases and recovery
| Symptom | Meaning | Recovery |
|---|---|---|
403 | Out of credits, or missing or invalid API key | Top up, or use the sandbox key while testing, since sandbox bypasses the balance check. |
400 | Missing user_image, file over 5 MB, unsupported extension, or a PDF | Convert to jpg or png, resize below 5 MB, resend. Malformed input returns 400 in sandbox too. |
429 | Shared write budget of 300 requests per minute per API key exceeded | Slow the caller or spread load, then retry after the window. |
Declined with LIVENESS_FACE_ATTACK | The model detected a presentation attack | Do not approve. Offer a second attempt on another device, then route to human review. |
Declined with LOW_LIVENESS_SCORE | Score at or below the threshold, often from bad light or a partial face | Ask for a retry with guidance, and read face_luminance and face_quality to see why. |
NO_FACE_DETECTED or MULTIPLE_FACES_DETECTED | No usable face, or more than one person in frame | Ask for a retry with a single, well-framed face. MULTIPLE_FACES_DETECTED is warning severity and does not decline on its own. |
FACE_IN_BLOCKLIST | The face matches an entry on your blocklist | Block or route to review per your policy. Same vendor_data faces are exempt from this screen. |
DUPLICATED_FACE | The same face already appeared in another approved session | Information 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.
Paid steps and review boundaries
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
- Didit liveness detection overview: methods, accuracy and the integration prompt.
- Passive liveness API reference: request fields, billing and sandbox behaviour.
- Liveness warnings catalogue: risk codes and severity.
- ISO/IEC 30107-3, the standard for presentation attack detection testing, and iBeta, the lab that runs those tests: the basis for the iBeta Level 1 PAD and Level 2 listings in our liveness docs.
- Face match 1:1 overview: thresholds and retry behaviour.
- Data models reference:
liveness_checks[]andface_matches[]. - Sandbox testing: scenarios, magic values and quotas.
- Webhooks: signature verification and retries.
- Quick start: account, workflow, session and decision path.
- Pricing in the docs and the Didit pricing page, read November 26, 2026.
- Didit identity verification product page, read November 26, 2026.
- Didit authentication product page, read November 26, 2026.
- Didit switching guide, read November 26, 2026.
- Didit MCP server: connecting Didit to an AI assistant.
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.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alejandro Rosas
Co-founder and CTO

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.
Your obligations · 3 regions
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.
- 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.
Didit Academy


