Skip to main content

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:

CategoryExamples
PDFMetadata anomalies, structural inconsistencies
ImageError Level Analysis (ELA), copy-move forgery, noise analysis
AIAI-powered visual analysis of the rendered document

The risk report

A completed report includes:

FieldMeaning
risk_scoreOverall score from 0–100
risk_levellow, medium, high, or critical
is_suspicioustrue if the document appears tampered
requires_manual_reviewtrue if a human should review it
indicatorsAll checks that were analyzed
detected_issuesOnly the checks that flagged a problem
summaryHuman-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:

StatusMeaning
pendingQueued, not started
processingCurrently running
completedFinished — report available
failedEncountered an error
not_requestedNo check was enabled for this job

See the full API in Document Integrity API.