Skip to content

Self-hosted document AI for HIPAA data

"Self-hosted" usually means the parser. The pages still go somewhere. Most document AI that reads scans well does it with a vision model. If that model is someone else's API, every page image of every patient record leaves your network, whatever runs on your servers.

ReadAnyDoc is a library and a server you run yourself (Apache-2.0). Where the pages go is your choice of model, and this page is about that choice. Nothing is sent to the ReadAnyDoc project in any setup: no telemetry, no account.

Three setups for PHI

Setup Page images go to What you need
1. Your own vision model on your own GPUs nowhere outside your network a GPU server running an OpenAI-compatible model server (vLLM, SGLang, Ollama)
2. A model provider under a BAA that provider, under your agreement a Business Associate Agreement and the provider's HIPAA-eligible configuration
3. A cloud model in your own cloud account your cloud account's model service the cloud's HIPAA-eligible services and its BAA with you

HIPAA compliance is about your whole system and your agreements, not a property of a library. No software makes you compliant by being installed, including this one. Ask your compliance owner which of these your organisation accepts.

Setup 1: nothing leaves your network

Run a vision model behind an OpenAI-compatible endpoint inside your network, and point ReadAnyDoc at it:

pip install "readanydoc[engine]"
import readanydoc

result = readanydoc.parse(
    "intake_form.pdf",
    model="openai_compatible:Qwen/Qwen2.5-VL-7B-Instruct@http://10.0.0.5:8001/v1",   # your server
)
print(result.markdown)

The server version uses the same model spec in an environment variable (READANYDOC_READER="openai_compatible:<model>@<url>"), including in Docker.

Two things to set up once:

  • The layout and OCR weights (100-200 MB, Apache-2.0) are downloaded from Hugging Face on the first engine run. On a machine with no internet access, copy ~/.cache/readanydoc from a machine that has it and set READANYDOC_LAYOUT_NO_DOWNLOAD=1. No document content is involved in that download.
  • Accuracy is yours to measure. Our published numbers use Claude Haiku 5.5; a self-hosted model has not been measured through ReadAnyDoc. Run readanydoc bench on a sample of your own documents (with synthetic or de-identified data) before you rely on it.

Setup 2 or 3: a hosted model under an agreement

The default model is Claude Haiku through Anthropic's API, with your own key. Whether that is acceptable for PHI depends on your agreement with the provider (a BAA, and the data-retention terms that come with it), not on ReadAnyDoc. The same applies to OpenAI or a cloud provider's model service. ReadAnyDoc calls only the endpoint you configure.

What the software does for you either way

Runs on your machines library, HTTP server and MCP server, all local
Keys read from the environment, never written to logs, results or job records
Stored documents (server) uploads expire after 24 hours, results after 12 by default; DELETE /job/{id} removes them at once
Network fetches URL inputs that resolve to private addresses are refused by default
Access set READANYDOC_API_KEY before the server is reachable by anyone else
Evidence for review every extracted value can carry a citation box, so a reviewer checks the source instead of re-reading the record

Details: security, configuration.

What it does not do

  • It does not sign a BAA. It is software you run, not a service; there is no ReadAnyDoc company processing your data.
  • It does not de-identify documents.
  • It is not certified (SOC 2, HITRUST). If you need a certified vendor, check the hosted services' own compliance pages; how they compare on features and price.
  • It is slower than hosted parsers: 20-50 seconds a page with the default model.

Questions

Is there a self-hosted document AI that keeps PHI inside my network? Yes, if the model is also self-hosted: ReadAnyDoc with a vision model on your own server (setup 1), or local parsers such as Docling, Marker and MinerU (compared).

Is ReadAnyDoc HIPAA compliant? That question applies to your deployment and agreements, not to a library. ReadAnyDoc sends documents only to the model you configure and to nothing else.

Can I use Claude for PHI? Only under the agreement and configuration your organisation has with Anthropic (or with the cloud that serves the model). Check that first; ReadAnyDoc does not change it.

Next