PDF Gatekeeper
Stage-1 PDF validation, OCR and text extraction pipeline
How it works
Upload a PDF or provide a public URL. The backend (FastAPI + PyMuPDF) validates the file, analyzes every page, extracts native text, applies OCR to scanned content, and returns normalized page-aware JSON ready for the next processing stage.
Reviewer for this inference session
Off: Ministral extraction + deterministic evidence validation. On: add the independent Gemma reviewer pass. In Serverless mode the reviewer GPU wakes automatically only when the run actually uses it.
Always-on baseline
CPU app + llama.cpp fallback
Automatic protection
Loading cost guard
Hugging Face
HF_TOKEN not configured
RunPod and Hugging Face credentials remain server-side. Stopping a Pod stops GPU compute billing; persistent volume/storage may still have its own charge. Secret tokens are never returned by this API.
Resumable PDF upload
Up to 2 GB · pause/resume · crash recovery · automatic retry
Initializing resumable uploader and recovery state...
Large-file recovery uses Tus server offsets. Golden Retriever restores upload state after accidental refresh/tab closure when the browser can retain the file handle; after a full browser restart, a recovered “ghost” asks you to re-select the same PDF and then reconnects to the existing Tus upload instead of starting from zero. The 2 GB file body is not copied into browser IndexedDB.
Automatic OCR
OCR only pages that need it after the upload has completed.