Document Forgery Detection: How AI Catches Fake IDs
AI catches forged IDs by cross-checking OCR, MRZ and barcode data, running document liveness for screen replays and printed copies, and reading the NFC chip.

Contents
In this guide
Jump to the part you need.
This guide is for teams that must reject forged identity documents at onboarding without putting a person on every session. It sets out the method we recommend at Didit: run an AI document check, read the warnings[] array, and route only genuinely ambiguous cases to a reviewer. The ID check costs $0.15 inside a workflow and $0.20 through the standalone API. The caveat: no model proves a document is genuine, so a clean result is evidence, not proof.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
| Job | Method | Price | Where it runs |
|---|---|---|---|
| Check a document inside a user-facing flow | ID Verification step on a workflow | $0.15 per check | POST /v3/session/ |
| One-shot server-to-server check on images you already hold | Standalone ID Verification API | $0.20 per check | POST /v3/id-verification/ |
| Read a passport or eID chip | NFC reading, an add-on to a document check | $0.15 per check | Native SDK session |
| Check a payslip, bank statement or invoice | Document AI with fields you define | $0.20 per document | POST /v3/document-ai/ |
| Document plus biometrics and device signals | Full KYC bundle | $0.33 per check | Workflow |
You can start free in the sandbox at business.didit.me with no sales call, and connect Didit to an AI assistant through the Didit MCP server. The product page is ID Verification and every unit price is on Didit pricing.
What a good outcome looks like
For every document you want three things: a feature status of Approved, Declined or In Review; the extracted fields; and a warnings[] array that names the reason for the decision. The warnings array is your audit trail. It says which check failed rather than only that something failed, and the same risk codes appear in the Business Console, in GET /v3/session/{sessionId}/decision/ and in the status.updated webhook.
The rule we recommend writing into your own runbook: an Approved result with an empty warnings array can be auto-approved within policy. A Declined result stops the flow with the first warning's long_description shown to the user. An In Review result never auto-approves. That last rule exists because a forgery check that produced no usable score is not evidence that the document is genuine.
Prerequisites
- A Didit organization and an API key sent in the
x-api-keyheader. The sandbox is free and unlimited on every plan. - Either a workflow with the
ID_VERIFICATIONfeature configured in the Business Console, or a decision to call the standalone endpoint with images you already have. - Credit on the account. The Free plan includes $10 of monthly credit for organizations that sign up with a work email, and phone codes are excluded from that credit.
- Images that follow the capture rules:
front_imagerequired,back_imagefor two-sided documents such as ID cards and driver's licences, tiff, jpg, jpeg, png, webp or pdf, 5 MB maximum per file, uncropped with all four corners visible. - Decisions on three policy switches:
invalid_mrz_action,inconsistent_data_actionandexpiration_date_not_detected_action, eachDECLINEorNO_ACTION. - A manual review queue and someone with the authority to clear it.
How AI catches a forged ID document
AI automated document fraud detection works because an official document is a set of facts that must agree with itself. The printed text, the machine readable zone, the barcode, the portrait, the security design and the chip all have to tell the same story. Software reads each of those layers and compares them. A forger usually edits one layer and cannot fix the others.
The document is classified before it is read
The first check is design match. Didit covers 14,000+ document types across 220+ countries, and the service classifies the document itself: you never declare the country or type. An image that does not match a known official document design with high confidence is declined before the remaining checks complete. On the standalone endpoint this appears as COULD_NOT_DETECT_DOCUMENT_TYPE.
Cross-checks between the visual zone, the MRZ and the barcode
The visual zone is read with OCR, the MRZ is parsed and any barcodes are decoded. Cross-checks then validate dates, number formats and MRZ check digits, and compare the visual zone against the MRZ. A date of birth changed in the printed zone but not in the MRZ raises INCONSISTENT_DATA. A modified MRZ that breaks its own check digits raises INVALID_MRZ. On a workflow, the front and back of the same document are also compared, which surfaces the DATA_INCONSISTENT risk flag.
Document liveness catches screen replays and printed copies
With perform_document_liveness=true, which is the default, the images are screened for the fraud types that a human reviewer at a desk cannot see. The risk codes are SCREEN_CAPTURE_DETECTED for a phone or monitor displaying a document, PRINTED_COPY_DETECTED for a photocopy, PORTRAIT_MANIPULATION_DETECTED when the portrait has been replaced, plus PUBLIC_DOCUMENT_IMAGE_DETECTED for a public template or sample and SPECIMEN_DOCUMENT_DETECTED. Thresholds for each fraud type are configurable per workflow, so you can trade false declines against strictness for your own population. Didit holds iBeta Level 1 PAD certification, which covers presentation-attack detection.
NFC chip reading turns forgery detection into cryptography
For supported ePassports and eIDs, the chip adds cryptographic evidence. The native SDK reads it after the document photograph supplies the MRZ keys, and passive authentication chains the chip's signing certificate back to a trusted issuing authority. NFC_PASSIVE_AUTHENTICATION_FAILED means the chain broke and the flow should stop. NFC_DATA_DOES_NOT_MATCH_OCR means the chip and the printed page disagree, which is a strong tampering signal. NFC is session-only, requires a native SDK, and is skipped in web browsers, where the flow falls back to document plus selfie.
Signals around the document: duplicates, OCR risk and face match
Beyond the document itself, the warnings[] array can include DUPLICATED_DOCUMENT for a document already seen, and FRAUD_RISK_FROM_OCR as a risk code your review policy can handle. Add face match 1:1 at $0.05 to compare the document portrait with a live selfie, passive liveness at $0.10 to check that a real person is present, and device and IP analysis at $0.03 for the session context. A full session can carry 200+ real-time fraud signals.
AI-generated documents and video forgeries during onboarding
An AI-generated or edited document image is evaluated by the same layers: design match, MRZ check digits, barcode consistency, portrait manipulation detection and document liveness. On the human side, passive liveness runs on the selfie and active liveness is available at $0.15. One honest limit: analysing a recorded video interview for deepfakes is not part of the documented Didit product. The documented controls for onboarding are document liveness, passive and active liveness, and face match, and any interview step stays a human review decision.
Run a document forgery check: seven steps
- Create a workflow that includes the
ID_VERIFICATIONfeature in the Business Console, or send it throughPOST /v3/workflows/. The legacy feature nameOCRstill works. - Choose the delivery mode. Session-based is the recommended path for user-facing flows, because the user captures the document inside a hosted flow and the decision arrives on
GET /v3/session/{sessionId}/decision/. Use the standalone API when you already hold one or two images server to server. - Set the auth policy for your risk appetite. For a strict posture, set
invalid_mrz_action=DECLINE,inconsistent_data_action=DECLINEandexpiration_date_not_detected_action=DECLINE. Leave them atNO_ACTIONonly if a reviewer will look at every such case. - Capture to specification. Upload uncropped images with all four corners visible and let the service detect, align and crop. Do not pre-crop.
- Make the call. The runnable example below is the standalone endpoint exactly as documented.
- Read
id_verification.statusandid_verification.warnings, not the HTTP code alone. A readable but problematic document returns HTTP 200 withstatus: "Declined". - Route the result by policy. Stop the flow on a terminal decline, queue
In Reviewfor a person, and allow one retry when the failure was capture quality rather than fraud.

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' \
-F 'minimum_age=18' \
-F 'expiration_date_not_detected_action=DECLINE' \
-F 'invalid_mrz_action=DECLINE' \
-F 'inconsistent_data_action=DECLINE' \
-F 'preferred_characters=latin' \
-F 'save_api_request=true' \
-F 'vendor_data=user-123'
Expected output
A successful call returns request_id and an id_verification object holding the extracted fields, the parsed MRZ, the decoded barcodes, the portrait and document images, and the warnings array. This is the shape, trimmed to the fields that matter for a forgery decision, with description strings supplied by the risk catalogue:
{
"request_id": "<session id, or a correlation id when save_api_request is false>",
"id_verification": {
"status": "Declined",
"document_type": "Identity Card",
"document_number": "AB1234567",
"date_of_birth": "1994-03-12",
"expiration_date": "2030-08-01",
"mrz": "<parsed machine readable zone>",
"barcodes": [],
"warnings": [
{
"risk": "INVALID_MRZ",
"log_type": "error",
"short_description": "<label from the risk catalogue>",
"long_description": "<reviewer-facing explanation from the risk catalogue>"
}
]
}
}
With save_api_request=true, which is the default, the call is stored as an API-type session: the request_id is a real session id you can pass to GET /v3/session/{sessionId}/decision/, the images come back as short-lived media URLs, and a status.updated webhook fires to your configured endpoints. Set it to false when you do not want the images stored.

Inputs and outputs
| Field | In or out | Notes |
|---|---|---|
front_image | In, required | The document front. 5 MB maximum, uncropped. |
back_image | In, required for dual-sided documents | ID cards and driver's licences. Omitting it returns HTTP 400. |
perform_document_liveness | In, default true | Runs screen replay, printed copy and portrait manipulation checks. |
invalid_mrz_action, inconsistent_data_action, expiration_date_not_detected_action | In | Each DECLINE or NO_ACTION. Defaults are configurable per request. |
minimum_age | In, optional | Adds the MIN_AGE_NOT_REACHED risk. |
vendor_data | In, optional | Your own user reference, echoed back. |
status | Out | Approved, Declined, In Review and the wider session enum values. |
warnings[] | Out | Risk codes such as DOCUMENT_EXPIRED, INVALID_MRZ, INCONSISTENT_DATA, DOCUMENT_LIVENESS_FAILED, COULD_NOT_RECOGNIZE_DOCUMENT. |
mrz, barcodes, portrait_image | Out | Parsed and decoded values plus presigned media URLs. |
Failure cases and how to recover
| Failure | What you see | Recovery |
|---|---|---|
| No credit on the account | HTTP 403, not enough credits, returned before any image processing | Top up or move to a plan with credit. Nothing was billed. |
| Bad multipart request | HTTP 400 with validation errors: missing back_image, file over 5 MB, unsupported extension | Fix the request. Nothing was billed. |
| Unprocessable image | HTTP 400 with COULD_NOT_RECOGNIZE_DOCUMENT | Ask for a new capture: flat, uncropped, in focus, full document in frame. |
| Readable but fraudulent document | HTTP 200 with status: "Declined" and a terminal warning | Show the first warning's long_description and stop the flow. Do not retry the same document. |
| The forgery check itself failed to run | HTTP 200 with status: "In Review" and DOCUMENT_LIVENESS_NOT_COMPUTED | Treat the document as unchecked and send it to manual review. This escalation is not configurable. |
| Anything else ambiguous | status: "In Review" | Queue for a person. Do not approve the user from an automated rule. |
| Chip and page disagree | NFC_DATA_DOES_NOT_MATCH_OCR or NFC_PASSIVE_AUTHENTICATION_FAILED | Do not approve. The chip is cryptographic evidence; a broken chain or a mismatch is a stop signal. |
One recovery pattern is worth building on purpose: if the same user fails capture twice with COULD_NOT_RECOGNIZE_DOCUMENT or DOCUMENT_LIVENESS_FAILED, do not loop the user a third time. Send the session to a reviewer with the images attached. Users with worn documents and users with forged documents look similar at the capture step and different to a person.
Paid steps and review boundaries
Every HTTP 200 response from the standalone endpoint consumes one ID Verification API credit, and an ID Verification step inside a workflow is billed at $0.15 per completed check. Those are separate billed routes: the workflow step and the standalone API are priced and billed independently. Reading the NFC chip is a $0.15 add-on to a document check. Document AI is $0.20 per document. A full KYC check is $0.33, made up of $0.15 for the document, $0.10 passive liveness, $0.05 face match and $0.03 device and IP analysis. Sandbox testing is free and unlimited, and the Free plan includes $10 of monthly credit.
What we recommend keeping human, regardless of price:
- Every
In Reviewstatus, including theDOCUMENT_LIVENESS_NOT_COMPUTEDcase where the check produced no score. - Any decision to overturn a terminal warning should be handled under your own review policy.
- Threshold policy itself. The document liveness thresholds per fraud type are a business decision about which errors you can afford.
- Anything the forgery check does not cover. A clean document says nothing about sanctions, PEPs or adverse media. Those are separate checks: AML screening is $0.20 per check and ongoing AML monitoring is $0.07 per person a year.
Worked cost example
Take 20,000 onboarding sessions a month, each with one ID Verification check on a workflow, of which 3,000 are passports where you also read the chip, plus 1,200 users who submit a bank statement checked with Document AI.
- ID checks: 20,000 x $0.15 = $3,000.00
- NFC chip reads: 3,000 x $0.15 = $450.00
- Document AI: 1,200 x $0.20 = $240.00
- Total at list price: $3,000 + $450 + $240 = $3,690.00 a month
On the Scale plan, which takes 10% off every Didit price, the same volume is 20,000 x $0.135 = $2,700.00, 3,000 x $0.135 = $405.00 and 1,200 x $0.18 = $216.00, so $3,321.00 a month before the $299.00 monthly fee. Plan credit covers part of that usage first, then top-ups, and unused monthly credit does not roll over.

Sources
- Didit docs: ID Verification overview
- Didit docs: ID Verification API, OCR and authenticity
- Didit docs: ID Verification methods and assurance tiers
- Didit docs: NFC verification
- Didit docs: Document AI API
- Didit docs: Document AI overview
- Didit docs: data models and warning object
- Didit docs: verification statuses
- Didit docs: pricing and billing rules
- Didit product page: ID Verification, read November 26, 2026
- Didit pricing page and pricing as JSON, read November 26, 2026
- Didit MCP server setup
- Image sources: Didit media catalog screens analyzing-document, console session detail id document and document scanning, read November 26, 2026
- No third-party vendor pages were used in this version of the page.
Next step: open the sandbox at business.didit.me, create a workflow with the ID Verification feature, and run one document through it. No sales call is required to start in the sandbox, and you can read every warning code against the docs before you decide anything.
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
Alberto Rosas
Co-founder and CEO

Questions
Frequently asked questions
How does AI detect a forged identity document?
AI detects forgery by reading every layer of the document and checking that they agree. Didit reads the printed text with OCR, parses the MRZ, decodes barcodes, validates check digits and dates, and compares the layers with each other. It then runs document liveness for screen replays, printed copies and portrait manipulation, and can read the NFC chip for cryptographic proof on ePassports and eIDs.
What is document liveness and what attacks does it catch?
Document liveness is a presentation-attack check on the document images themselves. It flags SCREEN_CAPTURE_DETECTED, PRINTED_COPY_DETECTED, PORTRAIT_MANIPULATION_DETECTED, PUBLIC_DOCUMENT_IMAGE_DETECTED and SPECIMEN_DOCUMENT_DETECTED. It runs by default on the standalone endpoint through perform_document_liveness=true, and thresholds per fraud type are configurable on a workflow.
Can AI detect a photo of a passport shown on a phone screen?
Yes. A document displayed on a screen, or a photograph of that screen, is what the screen replay check is built for, and it returns SCREEN_CAPTURE_DETECTED, which declines the request. A printed copy returns PRINTED_COPY_DETECTED. Both are fraud and hard-failure risks that always decline on the standalone endpoint and cannot be configured away.
Does Didit detect AI-generated document images?
Generated or edited images are evaluated by the documented design, consistency, liveness and authenticity checks. The warnings[] array reports which of those checks produced a risk code, such as INVALID_MRZ or COULD_NOT_DETECT_DOCUMENT_TYPE, so your review policy can decide the next step.
What about AI video forgery detection for onboarding?
For the person, Didit runs passive liveness at $0.10 and offers active liveness at $0.15, and face match 1:1 at $0.05 compares the live selfie with the document portrait. Didit holds iBeta Level 1 PAD certification for presentation-attack detection. Analysing a recorded video interview for deepfakes is not part of the documented Didit product, so keep any interview step under human review.
How much does an AI document forgery check cost?
An ID Verification check costs $0.15 inside a workflow and $0.20 through the standalone API. Reading the NFC chip adds $0.15, Document AI is $0.20 per document, and the full KYC bundle is $0.33. Sandbox testing is free, and the Free plan includes $10 of monthly credit for organizations that sign up with a work email.
What does an In Review status mean on a document check?
In Review means the system will not decide automatically, usually because a check did not produce a usable score. The clearest case is DOCUMENT_LIVENESS_NOT_COMPUTED, where the forgery check failed or crashed, and the documented rule is to treat the document as unchecked. Route it to a manual review queue and never approve from an automated rule.
Which document types and countries does Didit cover?
Didit covers 14,000+ document types across 220+ countries and territories, with a verification flow in 54 languages and document recognition across 130+ languages. The service classifies the document itself, so you do not declare the country or the type before the call. Inference runs at sub-2-second p99.
Can I run a forgery check server to server without a workflow?
Yes. POST https://verification.didit.me/v3/id-verification/ takes front_image, and back_image for two-sided documents, and returns OCR plus the fraud checks in one call at $0.20. The workflow route at $0.15 is the better choice for user-facing flows because it adds the hosted capture experience and the session decision payload.
What is the difference between ID Verification and Document AI?
ID Verification reads government-issued identity documents and authenticates them. Document AI extracts fields you define, from 1 to 30 of them, out of any PDF or image such as a bank statement, payslip or invoice, and also runs tampering checks and optional name matching at $0.20 per document. Use Document AI for supporting evidence and ID Verification for the identity document itself.
How do I test forgery detection before paying?
The sandbox is free and unlimited on every plan, so you can run the same calls against test data before spending credit. Create the workflow, call POST /v3/session/ or the standalone endpoint with sandbox credentials, and read the warnings[] array to confirm your routing rules behave as intended. Start at business.didit.me.
How many companies use Didit?
Didit is used by 4,000+ companies. The platform is certified to SOC 2 Type 2 and ISO/IEC 27001:2022, and the ID verification flow runs in 54 languages across 220+ countries and territories.
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


