All Projects
NLP
Document AI
FastAPI
LLM
Backend
AI Document Intelligence API
Production REST API for structured intelligence extraction from PDF documents
Legal and business teams spend hours manually extracting key information, entities, and risk clauses from PDF documents. Built a production REST API that accepts PDF or text uploads and extracts structured intelligence across multiple extraction modes.
January 1, 2025
7 viewsTech Stack
FastAPIPyMuPDFLangChainGroq APIPydantic v2PostgreSQL
Overview
Built FastAPI endpoints for four modes — multi-style summarisation, NER (people, orgs, dates, money), document classification, and grounded Q&A; added legal clause extraction with low/medium/high risk tagging using PyMuPDF per-page parsing and Groq-backed structured JSON output validated with Pydantic v2. Delivered a production-ready API with API-key auth, hallucination prevention, and a persistent document registry extensible to PostgreSQL, S3, and async Celery.
The Problem
Legal and business teams spend hours manually extracting key information, entities, and risk clauses from PDF documents with no structured, scalable solution.
The Solution
FastAPI with four extraction modes (summarisation, NER, classification, Q&A), legal clause risk tagging, PyMuPDF parsing, Groq-backed structured JSON, Pydantic v2 validation.