The job

A new customer uploads a photo of their driving licence and a PDF bank statement during onboarding. Before you accept them, you want to know whether either was edited, generated by AI, or is not what its file type claims, and send anything suspicious to a reviewer. This example shows the two decisions that are yours to make: which checks to run for each document, and how to route on the result. For the request and polling basics, see the Forensics quickstart.

Sample input

  • licence-front.jpg, a 3 MB JPEG photo of the front of a driving licence taken on a phone.
  • statement-2026-09.pdf, a 4-page PDF bank statement used as proof of address.
Both are already stored in your workspace. If you only need integrity checks, upload them with storageOnly: true so they skip OCR and extraction; see Upload options. To run all 19 checks as the file arrives instead, see Two ways to run it.

Steps

1

Choose checks for each document

A check that doesn’t fit the file reports skip, so pick the ones that can find something in this kind of document:See Detectors for every key.
Python
2

Start a run and wait for it

Python
web_presence can take up to about 180 seconds. A run still queued or running after about 6 minutes is stuck; see Retry a stuck run.
3

Route on each check's status

Python

Result

Illustrative: shape from the API reference. Fields beyond status and value vary by check.
GET /v1/forensics/runs/{run_id}
Here copy_move found cloned regions, so the licence goes to a reviewer even though the other checks are clear.

What it shows

  • Choose checks per document type. An image and a PDF need different checks; spec_filter is required, so a check added later never changes what your integration runs.
  • Route on each check’s status, not the run’s. A complete run can still contain an issue.
  • For web_presence, a missing web_presence boolean means no conclusion, not “not found”.
Delete the run with DELETE /v1/forensics/runs/{run_id} once you have stored the outcome. The file is not affected.

Next steps

Detectors and results

All nineteen checks, statuses and errors.

Forensics quickstart

The shortest path to a first run, in cURL, Python and Node.

Run fileForensics from your assistant

run_file_forensics and related MCP tools.

Uploads

Upload options, including storageOnly.