Skip to content
Anthem / Doc Lens Demo liveLaunching Q1 2027

Define the fields you need and mark a few sample documents. Turn incoming files into structured data, checked against your schema and ready for your team to review.

Explore the sample workflow

Live demo opens in a new tab. Examples on this page use fictional documents.

PDF/Photos/CSV/Email/HTML/Text

Fictional documents · sample results

Static preview

Give your team time to review the data, instead of retyping it. Doc Lens reads incoming documents, fills the fields you defined and flags answers that do not match your schema.

Set up your extractor.

Define your fields, mark sample documents, choose a model and publish a version. Explore the four steps below; changes stay in this example.

Extractors › Supplier invoices

Interactive example · fictional documents. Changes stay in this preview.

  • invoiceNumberrequiredAs printed, with its prefix
  • issueDaterequireddate
  • dueDaterequiredNull when the invoice says “on receipt”
  • supplierrequiredobject
  • namerequiredstring
  • vatNumberrequiredThe supplier’s VAT or tax ID
  • currencyrequiredISO 4217 code
  • totalrequiredThe amount due, tax included
  • lineItemsrequiredarray of objects

These read-only views show the same example schema. Open the live demo to edit fields and upload documents.

Follow a document into structured data.

Pick a fictional document and run the sample. Explore its extracted fields and JSON, then try the invoice that fails validation and correct its due date. All results here are simulated.

Documents

Fictional files and simulated API calls. No files are uploaded. Timings and token counts are examples.

Simulated API callsBearer doclens_…

  • POST/api/extraction-definitions/supplier-invoices/runs202 · accepted · 2 files
  • GET/api/extraction-runs/d455a0bb200 · completed
  • GET/api/extraction-runs/d455a0bb/result200 · valid: true
Supplier invoicesCompletedVersion 3run d455a0bb
Resultmatches the fields

Selected fields shown. Line items and supplier tax fields are omitted from this shortened example.

Invoice numberINV-2057
Issue date2026-11-01
Due date2026-12-01
SupplierAcme Supplies Ltd.
CurrencyEUR
Total1720.62
PO numberPO-55120
  • Queuedwith an API key
  • Reading the documents2 in upload order
  • Completedexample: 8.0 s · 9,240 in · 431 out

Documents 2

  • acme-supplies-INV-2057.pdf3 KB
  • delivery-note-DN-5521.pdf2 KB

Want the real thing? Open the demo backoffice, with three sample businesses and every kind of run.

Marked the way each format reads.

A person points at the answer once, in the way that fits the document. Doc Lens tells the model where each field was found, so it knows where to look next time.

Regions

Draw a box on a page or a photo. Its position is kept relative to the page, rotation included, so it holds on any screen.

PDFPNGJPEGWebP

Text quotes

Select the passage in exactly the text the model reads. The words around it tell a repeated value apart.

TXTMarkdownHTMLEML

Cell ranges

Drag across a grid named like a spreadsheet. A range of rows becomes the line items, one per row.

CSV

No OCR pipeline to maintain. Files reach the model exactly as uploaded, so a scan or a phone photo is read by a model that sees the page. Every upload is checked against its bytes first, and a format the model can’t read is refused with a reason.

Built for documents that pay the bills.

Validation

Every answer checked against your schema.

Your data model is a JSON Schema, and every answer is validated against it. An answer that breaks it is marked invalid, with the field and the reason, and kept so you can fix it. Validation checks structure and formats; people can still review and correct values.

A schema from your samples

Not sure what to extract? Upload a few samples, say what you need, and the model proposes a schema for you to review before saving.

Versions that never change

Publishing locks a version, down to the database. Runs finish on the version they started with, and a restored version publishes as the next number.

Many files, one answer

An invoice and its delivery note, scanned pages, an email and its attachment: read together, in order, into one result.

Corrections on record

Fix a result by hand. The run keeps its outcome, and the model’s answer stays beside yours.

A note for one run

Add context to a single run, from the backoffice or the API, without touching the published extractor.

  • Templates to start from

    Invoice, receipt and contract data models, so a new extractor never opens on an empty page.

  • Reasoning you set

    Low, medium or high effort per extractor, or the provider's default, for hard documents or fast ones.

  • Retries built in

    Rate limits, timeouts and provider errors are retried with backoff. Run progress and completed results are recorded for recovery.

  • Tokens on every run

    Input and output tokens are recorded per run, so you know what each document type costs to read.

  • Built for teams

    Workspaces, invites and magic-link sign-in. Admins set up extractors and keys; members run them and read results.

  • Works on every screen

    Phone to wide monitor, light or dark, with a command menu and keyboard shortcuts for people who live in it.

An API your systems can call.

People set extractors up. Programs send documents and read their JSON back. A workspace API key starts runs and reads them, and nothing else, so an integration can never change what an extractor does.

Connect

Address

https://doc-lens.example.comyour server

Authentication

Authorization: Bearer doclens_…

Keys are created in the backoffice, shown once, and can expire.

  1. 1Get a keyCreate one under API keys. It starts and reads this workspace’s runs.
  2. 2Send documentsPOST them to an extractor’s runs, by its slug. Several documents are read together.
  3. 3Get the JSONPoll the run every few seconds until it is completed or failed, then read its result once resultAvailable is true.

Runs

Send documents to an extractor, poll the run until it is completed or failed, then read its result. Open a call to see it.

3 endpoints

POSTStart a run/api/extraction-definitions/{identifier}/runs

Uploads the documents (multipart) and runs the extractor’s live version on them, or the published version you name, in the background. The version is fixed when the run is accepted, so later changes to the extractor don’t change it. It answers 202 at once with the run, and a Location header saying where to poll it.

Parameters

identifierstring · path
The extractor’s slug (supplier-invoices) or its ID.
documentsfile[] · form
One or more files, read together in the order sent. Up to 10 a run and 20 MB each by default, both settings on your server.
versioninteger · form
A published version to run. Omit it for the live version.
additionalInstructionsstring · form
Appended to the extractor’s instructions, for this run only; they are never replaced.
Request cURL
curl --request POST \
  "https://doc-lens.example.com/api/extraction-definitions/supplier-invoices/runs" \
  --header "Authorization: Bearer $DOC_LENS_API_KEY" \
  --form "documents=@./invoice.pdf" \
  --form "documents=@./delivery-note.pdf" \
  --form-string "additionalInstructions=Amounts are in EUR."
Response202 · accepted
{
  "id": "3f0c2a5e-…",
  "status": "pending",
  "extractionDefinitionSlug": "supplier-invoices",
  "version": 3,
  "documents": [
    { "name": "invoice.pdf", "contentType": "application/pdf", "position": 1 },
    { "name": "delivery-note.pdf", "contentType": "application/pdf", "position": 2 }
  ],
  "additionalInstructions": "Amounts are in EUR.",
  "createdAt": "2026-11-05T09:12:03.000Z",
  "startedAt": null,
  "completedAt": null,
  "error": null,
  "errorCode": null,
  "resultAvailable": false,
  "resultUrl": "/api/extraction-runs/3f0c2a5e-…/result",
  "correctedAt": null
}
GETGet a run/api/extraction-runs/{runId}

The run, to poll every few seconds until its status is completed or failed. Completed means the model answered with JSON, even if it breaks the data model: the result says whether it is valid. Failed means nothing usable came back, and error and errorCode say why. Read the result once resultAvailable is true.

Parameters

runIduuid · path
The run’s ID, from the answer that started it.
Request cURL
curl "https://doc-lens.example.com/api/extraction-runs/$RUN_ID" \
  --header "Authorization: Bearer $DOC_LENS_API_KEY"
Response200
{
  "id": "3f0c2a5e-…",
  "status": "completed",
  "extractionDefinitionSlug": "supplier-invoices",
  "version": 3,
  "documents": [
    { "name": "invoice.pdf", "contentType": "application/pdf", "position": 1 },
    { "name": "delivery-note.pdf", "contentType": "application/pdf", "position": 2 }
  ],
  "additionalInstructions": "Amounts are in EUR.",
  "createdAt": "2026-11-05T09:12:03.000Z",
  "startedAt": "2026-11-05T09:12:04.000Z",
  "completedAt": "2026-11-05T09:12:11.000Z",
  "error": null,
  "errorCode": null,
  "resultAvailable": true,
  "resultUrl": "/api/extraction-runs/3f0c2a5e-…/result",
  "correctedAt": null
}
GETGet a run’s result/api/extraction-runs/{runId}/result

The data, and whether it satisfies the version’s data model: valid, with validationErrors saying where it doesn’t. source is model or human_correction, and revision goes up with each correction, while originalData keeps the model’s answer. Unfinished runs answer 409 result_not_ready; runs that failed without an answer, 404 result_unavailable.

Parameters

runIduuid · path
The run’s ID, from the answer that started it.
Request cURL
curl "https://doc-lens.example.com/api/extraction-runs/$RUN_ID/result" \
  --header "Authorization: Bearer $DOC_LENS_API_KEY"
Response200
{
  "extractionRunId": "3f0c2a5e-…",
  "valid": true,
  "data": {
    "invoiceNumber": "INV-2057",
    "issueDate": "2026-11-01",
    "total": 1720.62,
    "purchaseOrderNumber": "PO-55120"
  },
  "validationErrors": [],
  "source": "model",
  "revision": 1,
  "correctedAt": null,
  "correctedBy": null,
  "originalData": null
}

Errors

Errors answer with a status and { "statusCode", "message" }; a message may be a list of problems. Where a program must tell errors apart, a code names it.

400
The request is not valid: a missing document, more documents than a run takes, an unknown field, a bad value.
401
No API key, or one that is wrong, revoked or expired.
404
No such extractor, version or run in the key’s workspace; on a result, code result_unavailable: the run failed without one.
409
Not possible now: no published version yet; on a result, code result_not_ready: the run hasn’t finished.
413
Too large: a document over the server’s limit (20 MB by default), or a request over 100 MB.
415
A file format Doc Lens doesn’t read, or a body that isn’t multipart.
429
Too many requests: more than 120 a minute.

For every desk that retypes documents.

Supplier invoices, ready for review

  • 1Header, totals and line items from PDFs, photos and portal exports
  • 2Dates, VAT IDs and amounts in the format your ERP expects
  • 3Answers that break your schema stopped before the ledger

Paperwork that keeps up with the freight

  • 1Delivery notes and proof-of-delivery photos from drivers
  • 2Export declarations with EORI numbers and HS codes
  • 3PO numbers read from whichever document carries them

Forms into fields, not into a backlog

  • 1New patient forms, typed or photographed at the front desk
  • 2Lab results prepared for review in the fields your system already has
  • 3Choose your storage and the model provider that processes documents

Leases and bills on the rent roll

  • 1Parties, rent, dates and notice periods from signed leases
  • 2Water, power and gas bills forwarded by tenants
  • 3One extractor per document type, each with its own versions

Contracts you can query

  • 1Parties, start and end dates and renewal terms
  • 2Notice periods as fields, not paragraphs
  • 3Edge cases corrected by a person, the original answer kept

Your documents. Your servers. Your model.

Invoices, contracts and patient forms are among the most sensitive files a business keeps. Doc Lens runs on your own infrastructure, and a document goes only to the model provider you configure.

Self-hosted

Node.js and PostgreSQL on your servers, documents on local disk or S3-compatible storage such as AWS S3, Cloudflare R2 or MinIO.

Keys kept apart

Provider keys are encrypted with AES-256-GCM. API keys are shown once, stored only as a hash, can expire and reach runs only.

Workspaces sealed in the database

Every record carries its workspace, and the database itself rejects links across workspaces. Other workspaces' ids answer 404.

Documents treated as data

Document and sample text is marked as untrusted content. The model is instructed to extract values rather than follow instructions inside a file.

Files checked and sandboxed

An upload must be what its extension says, down to its bytes. Files open through five-minute signed links in a sandbox.

History you can't rewrite

Database triggers refuse changes to a published version and its samples, so every past run can be explained.

Questions, answered.

The short version. Anything else, just ask.

When can we use Doc Lens?

Launch is planned for Q1 2027. You can explore the backoffice now in the public demo, with three sample businesses and their documents. Join the early-access list and we will contact you as places open, starting with the document types that fit the first release best.

Can we host it ourselves?

Yes. Doc Lens runs on your own servers with Node.js and PostgreSQL, and keeps documents on local disk or S3-compatible storage such as AWS S3, Cloudflare R2 or MinIO. The API, the backoffice and the background worker run as one server, with no separate queue to operate.

Which file formats can it read?

PDF, PNG, JPEG and WebP, plus plain text, Markdown, HTML, email (.eml) and CSV. Several files can go into one run. Word, Excel, PowerPoint, Outlook .msg and TIFF files are refused with a clear message for now: save them as PDF. Doc Lens never converts or OCRs a file itself; the model reads the original.

Which AI models does it use?

The ones you choose, with your own API keys, through Mastra's model router. Models from OpenAI, Anthropic and Google read PDFs and images directly; other providers' models that take attachments read images; every model reads the text formats. Doc Lens checks this when you publish, so an extractor never goes live on a model that can't read its documents. You can also set how much the model reasons.

Do we need to write code?

Not to set it up. People define the fields, mark the samples and publish versions in the backoffice, and can start runs there by hand. Your systems connect through a small REST API: upload documents, poll the run, read the JSON.

What happens when the model gets something wrong?

Schema validation catches missing fields and invalid types or formats. A value can still match the schema and be factually wrong, so review matters. Runs that break the schema keep their answer with the field and the reason. A person can correct a result, with the model's original answer stored alongside who changed it and when.

Will changing an extractor break our integration?

No. Published versions never change. Your systems call an extractor by its slug and get the live version, or name a version to pin it. A run always finishes on the version it started with, and any old version can be restored and published again as the next one.

Where are our documents processed and stored?

On your infrastructure. Documents, extractors, runs and results stay in your own database and storage. The only thing that leaves is what a run sends to the model provider you configure, using your key.

How large can documents and runs be?

By default a file can be up to 20 MB and a run can take up to ten files, read together into one result. Both limits are settings on your server. Runs queue in the background, five at a time per workspace.

Can I use it on my phone?

Yes. The backoffice adapts to any screen, from a phone to a wide monitor, in light or dark mode, so you can check a run or correct a result wherever you are.

Stop retyping documents.

Launch is planned for Q1 2027. Join the early-access list, tell us which documents you process and where the data should go, and we will reach out as places open.

0 / 1,000 characters

Loading security check…

We will email you about this product's launch. Privacy policy