Skip to main content

Document Liveness Detection: How Didit Stops Screen and Print Fraud

Document liveness detection inside Didit ID Verification flags screen replays, printed copies and portrait manipulation, at $0.20 per standalone API check or $0.15 as a workflow document check.

Document Liveness Detection: How Didit Stops Screen and Print Fraud

Contents

In this guide

Jump to the part you need.

We run document liveness inside ID Verification for teams that accept photos of identity documents. It screens for screenshots, photos of IDs displayed on screens, printed copies and altered portraits. ID Verification costs $0.20 per standalone API check or $0.15 per workflow document check. On the standalone API, a detected attack returns Declined. If the requested check produces no usable score, the result is In Review unless another warning already requires a decline.

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

Document liveness detection at a glance
ItemDetail
What the liveness screen flagsScreen replays, printed copies and portrait manipulation. Published document images, specimen documents, expiry and unknown document design are separate endpoint decline reasons listed below.
Where it runsInside ID Verification: POST /v3/id-verification/, or the ID_VERIFICATION step of a hosted session
Switchperform_document_liveness=true, which is the default on the standalone endpoint
Price, standalone API$0.20 per ID Verification API check
Price, workflow step$0.15 per ID document check
On a hit, standalone APIstatus: "Declined" with a terminal warning such as SCREEN_CAPTURE_DETECTED
When the check cannot runWhen enabled document liveness produces no usable score, an otherwise approvable HTTP 200 response returns In Review with DOCUMENT_LIVENESS_NOT_COMPUTED. Any existing Declined decision takes precedence.
ID Verification coverage14,000+ document types across 220+ countries and territories

Start free in the sandbox at https://business.didit.me/ with no sales call. For developers, connect Didit to an AI assistant through https://didit.me/developers/mcp/.

Capture screen asking the user to frame the whole identity document
The capture step wants the whole document with all four corners visible. The service detects, aligns and crops it, so a pre-cropped image is the wrong input.

Why a photograph of a document proves less than it looks

A screenshot or printed copy can preserve readable text and a valid MRZ. A replaced portrait can leave the text fields intact. OCR can read those fields without establishing how the image was produced.

That is the gap document liveness closes. It is a check on the image itself, not on the data inside it, which is why it runs alongside OCR rather than instead of it. Read a warning as a signal about the image rather than a finding of fact: the image was flagged as a possible screen photo, or a possible printed copy, or a portrait that may have been manipulated. On the standalone API that flag returns Declined, and your policy decides what happens to the account.

What document liveness detection checks

When perform_document_liveness=true, the submitted images are screened for screen replays, printed copies and portrait manipulation. Each type carries its own terminal warning code. These screens are one part of Didit ID Verification, which reads and authenticates government-issued documents across 14,000+ document types.

What the document liveness screen flags on the standalone API
What was submittedWarningDecision
A screenshot, or a camera photo of a document displayed on a phone or monitorSCREEN_CAPTURE_DETECTEDDeclined
A printed or photocopied document photographed with a phonePRINTED_COPY_DETECTEDDeclined
A real document with a swapped or generated portraitPORTRAIT_MANIPULATION_DETECTEDDeclined

Other codes come back from the same endpoint but are not established as controlled by the liveness switch. Treat them as separate endpoint decline reasons.

Other standalone ID Verification outcomes
What was submittedWarningDecision
A document image flagged as publicly available.PUBLIC_DOCUMENT_IMAGE_DETECTEDDeclined
A sample or specimen documentSPECIMEN_DOCUMENT_DETECTEDDeclined
An expired documentDOCUMENT_EXPIREDDeclined
A front image that matches no known official design with high confidenceCOULD_NOT_DETECT_DOCUMENT_TYPEDeclined
Enabled document liveness with no usable score, on an otherwise approvable requestDOCUMENT_LIVENESS_NOT_COMPUTEDIn Review, unless a Declined decision already applies

The same call classifies the document automatically against known official designs, reads the visual zone with OCR, and decodes the MRZ and any barcodes. The standalone API checks dates, number formats and MRZ check digits and compares the visual zone with the MRZ. An invalid MRZ causes a decline when invalid_mrz_action is set to DECLINE.

In ID Verification's Advanced Analysis, we also use tamper detection, template matching and security-feature validation, including holograms and watermarks.

Inside a hosted workflow the thresholds are configurable per fraud type, screen replay, printed copy and portrait replacement, with a Forgery tab on the session in the Didit Business Console. The standalone endpoint has three configurable risk groups: invalid_mrz_action, inconsistent_data_action and expiration_date_not_detected_action. Each accepts DECLINE or NO_ACTION. Terminal warnings always decline. Informational warnings never decline on their own.

Prerequisites

  • A Didit application and an API key, created at https://business.didit.me/. Sandbox testing is free and unlimited.
  • A front image of the document, uncropped, with all four corners visible. The service detects, aligns and crops the document itself, so do not pre-crop.
  • A back image for two-sided documents such as ID cards and driver licences.
  • Files in tiff, jpg, jpeg, png, webp or pdf, up to 5 MB each.
  • For production calls, your organization needs sufficient credit. Each HTTP 200 response consumes one ID Verification API credit. A 403 for insufficient balance comes back before any image processing.
  • Decide the route first. Use the standalone call when you already hold the images server to server. Use a hosted session when the end user photographs the document in a Didit flow, and the ID_VERIFICATION step runs ID Verification inside the workflow.

How to run document liveness detection, step by step

  1. Create the application and copy the API key. The key goes in the x-api-key header on every call. Keep it server side.
  2. Capture an honest image. Send an uncropped photo with all four corners visible. Include the back image for a two-sided document. Ask the user for a single document on a flat surface in ordinary light, not a screenshot and not a photo of a monitor.
  3. Send the request with document liveness switched on. The parameter defaults to true on this endpoint, but send it explicitly so the intent is visible in your code:
curl -X POST 'https://verification.didit.me/v3/id-verification/' \
-H 'x-api-key: YOUR_API_KEY' \
-F 'front_image=@./id_front.jpg' \
-F 'back_image=@./id_back.jpg' \
-F 'perform_document_liveness=true'

perform_document_liveness is the standalone field that controls document liveness. The longer example in the docs also sends policy fields that change decision behavior rather than the screen itself: invalid_mrz_action, inconsistent_data_action and expiration_date_not_detected_action, each set to DECLINE or NO_ACTION, plus minimum_age and preferred_characters. It also passes vendor_data, an optional caller-supplied value.

Persistence has its own switch. save_api_request defaults to true, and with it the call is stored as an API-type session in the Business Console, the cropped document and portrait images are returned as short-lived media URLs, a status.updated webhook fires, and request_id is a real session id you can pass to GET /v3/session/{sessionId}/decision/. Setting save_api_request=false skips persistence and makes request_id a correlation id.

Analysis screen shown while the document is read and checked
OCR, MRZ decoding, tamper checks and the liveness screen run in one call, so a single response carries both the extracted fields and the fraud verdict.
  1. Read status before anything else. The values are Approved, In Review or Declined. Do not branch on the HTTP code alone: a readable but fraudulent document returns HTTP 200 with a Declined status.
  2. Read the warnings array. Fraud and hard failures decline. Warnings such as POSSIBLE_DUPLICATED_USER are informational and never decline on their own.
  3. Route In Review to a human. That status covers an enabled liveness check that produced no usable score. It is not a pass and it is not configurable away.
  4. Handle the three routes. HTTP 200 means inspect id_verification.status and id_verification.warnings. HTTP 400 with COULD_NOT_RECOGNIZE_DOCUMENT means request a new capture. HTTP 403 means resolve the balance before retrying, because the refusal comes before any image processing.

Expected output

The response carries a status, the extracted fields and the warning list. The documented field outline is this one, and the full schema is in the docs.

{
  request_id,
  id_verification: {
    status,
    full_name,
    document_type,
    document_number,
    date_of_birth,
    expiration_date,
    parsed_address,
    mrz,
    barcodes,
    portrait_image,
    front_document_image,
    back_document_image,
    warnings: [...],
  },
}

On HTTP 200, inspect id_verification.status and id_verification.warnings. Handle HTTP errors using their error bodies. The warning codes and their meanings are in the two tables above. A document that cannot be processed at all never reaches this shape: it returns HTTP 400 with {"error": "COULD_NOT_RECOGNIZE_DOCUMENT"}.

ID document step of a session in the Didit Business Console
The same result in the Didit Business Console: extracted fields, the stored document image and the warning list on one session.

Failure cases and recovery

What goes wrong and what to do about it, standalone API behavior
SymptomCauseRecovery
HTTP 400 COULD_NOT_RECOGNIZE_DOCUMENTThe image cannot be processed at allAsk for a new capture with all four corners visible. Do not retry the same file.
HTTP 400 multipart validation errorMissing back_image on a two-sided document, file over 5 MB, unsupported extensionFix the payload. Check the extension and the size before sending.
HTTP 403 not enough creditsBalance cannot cover the callTop up or move to a plan with credit. The refusal happens before any image processing.
200 Declined with SCREEN_CAPTURE_DETECTEDThe image was flagged as a possible screen photoDo not approve. Ask for a photo of the original document from the device camera, then review the account per your policy.
200 Declined with PRINTED_COPY_DETECTEDThe image was flagged as a possible printed or photocopied documentDo not approve. Ask for a photo of the original document and review before any retry.
200 Declined with PORTRAIT_MANIPULATION_DETECTEDThe portrait was flagged as swapped or generatedDo not approve. Treat it as suspected impersonation and send it to fraud review.
200 Declined with PUBLIC_DOCUMENT_IMAGE_DETECTED or SPECIMEN_DOCUMENT_DETECTEDThe image was flagged as a published or sample documentDo not approve. Escalate to fraud review.
200 In Review with DOCUMENT_LIVENESS_NOT_COMPUTEDThe enabled forgery check returned no usable score.Send to your manual review queue. Do not approve and do not treat the silence as a pass.
200 Declined with COULD_NOT_DETECT_DOCUMENT_TYPEThe front image matches no known official design with high confidenceAsk for a better capture. If it repeats, treat the document as unverified.
200 Approved with informational warningsSoft signals such as a possible duplicateApply your own policy. These never decline on their own.

For a screen or printed-copy warning, ask the applicant to photograph the original document. For an unreadable capture, ask for an uncropped retake with all four corners visible.

Inputs and outputs of the standalone call

Inputs and outputs for POST /v3/id-verification/
NameDirectionWhat it does
front_imageInput, requiredThe front of the document, uncropped, all four corners visible
back_imageInput, conditionalRequired for two-sided documents such as ID cards and driver licences
perform_document_livenessInput, default trueScreens the images for screen replays, printed copies and portrait manipulation. Set false to skip it.
invalid_mrz_actionInputDECLINE or NO_ACTION when the MRZ does not validate
inconsistent_data_actionInputDECLINE or NO_ACTION when the visual zone and the MRZ disagree
expiration_date_not_detected_actionInputDECLINE or NO_ACTION when no expiry date can be read
minimum_ageInputAge floor applied to the date of birth read from the document
save_api_requestInput, default truePersists the call as an API-type session with stored images and a webhook. False skips persistence.
statusOutputApproved, In Review or Declined
warningsOutputEvery issue found, each with a risk code and a log type
full_name, document_number, date_of_birth, expiration_date, parsed_addressOutputExtracted document fields. The API cross-checks visual-zone data against the MRZ where comparable data is available.
portrait_image, front_document_image, back_document_imageOutputShort-lived media URLs for the crops the service made, when persistence is on
request_idOutputThe session id when persistence is on, a one-off correlation id when save_api_request=false

The docs example also sends vendor_data, an optional caller-supplied value shown in that example. Register the person and bind sessions with vendor_data on Create Session, where the duplicate-detection behavior is documented.

In production, each HTTP 200 response consumes one ID Verification API credit at the $0.20 USD list price, including Declined and In Review results. Sandbox testing is free. The document liveness screen has no separate line in the price book: it runs inside that check, so switching it off saves nothing. In a hosted workflow the same step is $0.15. The workflow orchestrator, the SDKs and the MCP server carry no fee.

The review boundary is explicit in the status field. Declined is a machine decision and you should not overturn it in code. Approved means no warning required a decline and the request did not enter review. Informational warnings can still appear. If enabled document liveness produces no usable score, route In Review to manual review. That escalation is not configurable: Didit will not let a check that did not run look like a clean one.

Worked cost example

Assume 5,000 document checks a month through the standalone ID Verification API, each with document liveness on.

  • Per check: $0.20. Monthly: 5,000 x $0.20 = $1,000.00.
  • Free plan credit of $10.00 covers $10.00 / $0.20 = 50 checks, so the first 50 of the month cost nothing for an eligible organization.
  • On the Scale plan the Didit price is 10% lower: $0.20 x 0.90 = $0.18, so 5,000 x $0.18 = $900.00 in discounted usage before the plan fee and any included credits. The difference in usage charges against the list-price figure is $1,000.00 - $900.00 = $100.00.
  • If the same 5,000 documents went through a hosted workflow as an ID document step at $0.15: 5,000 x $0.15 = $750.00.
  • Add biometrics and device checks and the per-check figure is the full KYC bundle: $0.15 ID document + $0.10 passive liveness + $0.05 face match + $0.03 device and IP analysis = $0.33. At 5,000 checks: 5,000 x $0.33 = $1,650.00.

The live price feed is the only place to quote from. Read it at https://didit.me/pricing/ or as JSON at https://didit.me/pricing.json.

Document liveness is not face liveness

Document liveness screens the submitted image of the ID for spoofing signals. Face liveness asks whether a real person was in front of the camera, and it has its own modes and prices: passive liveness at $0.10, active liveness at $0.15, with 3D flash and 3D action available in hosted flows. They catch different attacks. A screen replay of a document and a deepfake of a face are separate frauds that need separate checks, which is why the full KYC bundle runs both.

Liveness step of a session in the Didit Business Console
The liveness step is reported separately from the document step, so a session shows which of the two checks failed.

What this check does not do

  • It does not repair a bad capture. If the image is unreadable, the answer is a retake, not a different threshold.
  • It does not replace face match. A genuine document can belong to someone other than the applicant, and face match is the separate check for that.
  • It does not decide your policy on a possible duplicate. Informational warnings are yours to act on.
  • It does not produce the workflow-only warnings on the standalone endpoint. MRZ_NOT_DETECTED, INVALID_DATE and PORTRAIT_IMAGE_NOT_DETECTED exist in workflow sessions but are never produced by POST /v3/id-verification/.

Sources

Open the free sandbox, create an application and submit a test document with perform_document_liveness=true. Check the returned status and warnings. No sales call is required.

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 document liveness detection?

It is a check inside Didit ID Verification that screens a submitted document photo for spoofing signals: screen replays, printed copies and portrait manipulation. It is a check on the image, not on the data inside it, so it runs alongside OCR rather than instead of it. You switch it on with perform_document_liveness=true on POST /v3/id-verification/, where it is the default.

Can document liveness detect an ID screenshot, a photo of a screen, or a printed copy?

Didit document liveness screens for direct screenshots, camera photos of IDs displayed on screens, and printed copies. When the standalone API flags a screen replay, it returns SCREEN_CAPTURE_DETECTED. When it flags a printed copy, it returns PRINTED_COPY_DETECTED. Either warning triggers HTTP 200 with id_verification.status set to Declined.

How much does document liveness detection cost?

We include document liveness in ID Verification. In production, the standalone API consumes one credit per HTTP 200 response at a USD list price of $0.20, including Declined and In Review results. A workflow ID document check has a USD list price of $0.15, and sandbox testing is free. Turning off document liveness leaves the check price unchanged.

Is perform_document_liveness on by default?

Didit enables perform_document_liveness by default on POST /v3/id-verification/. The images are screened for screen replays, printed copies and portrait manipulation. Setting it to false skips the check and the status then follows the remaining warnings, which is a policy choice rather than a saving.

What do SCREEN_CAPTURE_DETECTED and PRINTED_COPY_DETECTED mean?

SCREEN_CAPTURE_DETECTED means the submitted image was flagged as a document displayed on a screen, which covers a direct screenshot and a camera photo of a monitor or phone. PRINTED_COPY_DETECTED means the image was flagged as a printed or photocopied document. Both are terminal warnings on the standalone API and both return status: "Declined". Do not approve the user on either code.

What happens when the document liveness check cannot run?

When enabled document liveness produces no usable score, an otherwise approvable HTTP 200 response returns In Review with DOCUMENT_LIVENESS_NOT_COMPUTED. Any existing Declined decision takes precedence. Route the session to manual review, because a check that did not run is not evidence that the document is genuine.

Does it catch a digitally edited portrait on a genuine document?

Didit document liveness screens for digitally altered ID portraits. Portrait manipulation is one of the three signals the screen reports, and a hit returns PORTRAIT_MANIPULATION_DETECTED with status: "Declined" on the standalone API. The rest of the document can be genuine, with a valid MRZ and correct data, while the face belongs to someone else.

What is the difference between document liveness and face liveness?

Document liveness screens the submitted image of the ID for spoofing signals. Face liveness checks the person in front of the camera, using passive, 3D flash or 3D action methods, and is priced separately at $0.10 for passive and $0.15 for active. A full KYC bundle at $0.33 includes the document step, passive liveness, face match and device and IP analysis.

Which file types and sizes does the call accept?

Didit's standalone ID Verification API accepts TIFF, JPG, JPEG, PNG, WebP and PDF files up to 5 MB each. The front image is required and the back image is required for two-sided documents. Send an uncropped photo with all four corners visible, because the service detects, aligns and crops the document itself.

Why did one bad document return HTTP 400 and another return Declined?

A document that cannot be processed at all returns HTTP 400 with {"error": "COULD_NOT_RECOGNIZE_DOCUMENT"}. A readable document that trips a fraud check returns HTTP 200 with status: "Declined". On HTTP 200, inspect id_verification.status and id_verification.warnings. Handle HTTP errors using their error bodies.

Can I test document liveness detection before paying?

You can test Didit document liveness for free in the Didit sandbox. Sandbox testing is free and unlimited and nothing is charged in sandbox. You get a key from an application created at https://business.didit.me/, and the Free plan adds $10.00 of monthly credit for eligible organizations, which is 50 standalone ID Verification API checks at $0.20.

How does document liveness fit into the document step?

Document liveness is part of ID Verification. The standalone check extracts document data, decodes any MRZ and barcodes, runs document fraud checks and returns a status with warnings. In a hosted workflow, face liveness and face match can run as separate steps if configured.

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.