OCR / Extraction
LLM Analysis
Volume
| Cost component | Per page | Per document | Per month |
|---|
Volume scaling
| Monthly pages | OCR cost | LLM cost | Total |
|---|
How to model your document AI pipeline
A typical document processing pipeline has two main API costs:
- OCR / extraction — converting scanned images or PDFs to machine-readable text. Charged per page by most providers.
- LLM analysis — passing the extracted text plus a system prompt to an LLM for classification, summarisation, or data extraction. Charged per token.
For text-native PDFs (not scanned), you can skip OCR entirely and extract text with free libraries (pdfplumber, pypdf), reducing per-page cost to just the LLM charge.
Batch processing discount: Anthropic and OpenAI both offer ~50% discount for async batch jobs. For non-realtime document workflows (invoice processing, nightly batches), always use batch mode.
Related: OCR & Document AI cost · RAG cost calculator · Batch API savings
Frequently asked questions
What does it cost to process PDFs with AI?
A typical pipeline costs $0.003–$0.05 per page. AWS Textract charges $0.0015/page for text detection. Adding Claude 3.5 Haiku at 1,500 tokens/page ($0.0012/page) brings the total to ~$0.003/page. At 10,000 pages/month, that's ~$30/month.
What OCR APIs are cheapest for document processing?
AWS Textract: $0.0015/page (text) or $0.065/page (forms). Google Document AI: $0.0015/page. Azure Form Recognizer: $0.0010/page. Mistral OCR: $0.001/page. Self-hosted Tesseract/PaddleOCR: ~$0.00005/page (server cost only).
How many tokens does one PDF page produce?
A typical text-heavy page produces 300–800 tokens. A form with tables generates 400–1,200 tokens. Dense financial reports can reach 1,500+ tokens per page. Use 500 as a starting estimate.
Should I use native PDF support or OCR + text extraction?
Claude 3.5+ and GPT-4o accept PDF files directly. Claude charges per image tile (~1,700 tokens/page ≈ $0.0051/page), competitive with external OCR + text pipeline for moderate volumes. External OCR is better when you need structured extraction or want to cache the text.
How do I reduce document processing costs at scale?
Three levers: (1) Use cheap OCR + small LLM for simple classification, expensive model only for complex analysis. (2) Cache extracted text — don't re-OCR the same document. (3) Use batch API (50% discount). A tiered pipeline can cut costs 60–80%.