Document Integrity
Document integrity (tampering / fraud detection) screens a document for signs of manipulation and returns a structured risk assessment. It's designed for teams processing invoices, receipts, IDs, and other documents where authenticity matters.
How it works
When you enable integrity on an upload, the check runs in the background after OCR completes — it never blocks or delays the OCR result. You retrieve the integrity report separately once it's ready.
The analysis combines several categories of checks:
| Category | Examples |
|---|---|
| Metadata anomalies, structural inconsistencies | |
| Image | Error Level Analysis (ELA), copy-move forgery, noise analysis |
| AI | AI-powered visual analysis of the rendered document |
The risk report
A completed report includes:
| Field | Meaning |
|---|---|
risk_score | Overall score from 0–100 |
risk_level | low, medium, high, or critical |
is_suspicious | true if the document appears tampered |
requires_manual_review | true if a human should review it |
indicators | All checks that were analyzed |
detected_issues | Only the checks that flagged a problem |
summary | Human-readable summary |
Enabling integrity
On a new upload
Toggle Document integrity in the upload dialog (console) or set the integrity
flag on the upload API call. After upload, fetch
the report from
GET /ocr/jobs/{job_id}/fraud-analysis.
On an existing job
Already processed a document without a check? You can trigger one after the fact
from the job view, or via
POST /ocr/jobs/{job_id}/trigger-fraud-check.
Standalone verification
To analyze a document without running OCR extraction, use the standalone
POST /ocr/verify
endpoint — it returns a risk report directly.
Customizing which checks run
You can disable specific checks (for example, if a particular forensic test
produces false positives for your document type). List the available checks — grouped
by category — with
GET /ocr/fraud-checks/available,
then pass the IDs to disable when uploading.
Status lifecycle
An integrity check reports one of:
| Status | Meaning |
|---|---|
pending | Queued, not started |
processing | Currently running |
completed | Finished — report available |
failed | Encountered an error |
not_requested | No check was enabled for this job |
See the full API in Document Integrity API.