AI Document Processing Explained: OCR vs. LLMs
AI document processing turns PDFs and scans into structured data. Here's how Textract, Azure, Document AI, and LLMs actually compare.
AI document processing is a pipeline that turns PDFs, scans, and photos into structured, validated data using OCR and/or LLM-based extraction, then routes that data into business systems. Which tool you actually need depends on your document type, your volume, and how much validation the result requires.
What AI document processing actually means (and why "OCR" isn't the whole answer)
Most explanations of intelligent document processing (IDP) describe the same six-stage shape: ingest the file, classify what kind of document it is, extract the fields you need, validate those fields against business rules, route anything uncertain to a human reviewer, and export the result into a database, ERP, or CRM. That framing is accurate but abstract — it doesn't tell you what a specific platform will actually accept, reject, or charge you.
"OCR" is only the first layer. Optical character recognition turns pixels into text, but it doesn't know that the string next to "Total Due" is a currency value, or that a block of text is an invoice rather than a contract. Structured extraction — matching text to a schema, typing values, and pairing keys with values — is a separate step, and it's where AWS Textract, Azure Document Intelligence, Google Document AI, and LLM-based approaches diverge the most. The rest of this guide grounds each stage in the actual limits, model catalogs, and pricing published by AWS, Microsoft, Google, Anthropic, and OpenAI, so you can compare platforms on specifics instead of marketing language.
If you're building this pipeline rather than just evaluating it, that extraction-to-system-of-record work is exactly what our AI document processing service is built around.
It's also worth being clear about what each platform is actually good at before comparing prices and quotas. Anthropic's own documentation lists analyzing financial reports and charts, extracting key information from legal documents, document translation, and converting document information into structured formats as the intended use cases for Claude's PDF support — a reasoning-heavy list, not a pure-extraction one. A dedicated IDP platform is optimized for the opposite: consistent, schema-shaped extraction at volume, with less flexibility for the model to interpret or summarize what it's reading.
AWS Textract: the hard limits that decide sync vs. async
Amazon Textract accepts JPEG, PNG, PDF, and TIFF files, including PDFs with JPEG 2000-encoded images inside them, but it does not support XFA-based PDFs. Which API you call depends on the file: synchronous operations cap every format at 10 MB, and additionally limit PDF and TIFF inputs to a single page. Asynchronous operations raise the PDF/TIFF ceiling to 500 MB and 3,000 pages, while JPEG and PNG stay capped at 10 MB. In practice, that split means single-page forms and receipts are candidates for synchronous calls, while multi-page contracts and statements have to go through the asynchronous path.
A few other quotas matter once you're past the basic file-size question. PDFs cannot be password protected, and the maximum PDF page dimensions are 40 inches by 9,000 points. Textract's query feature — asking the model for a specific field by natural-language question rather than a fixed schema — is capped at 15 queries per page for synchronous calls and 30 per page for asynchronous calls. AnalyzeID, Textract's identity-document API, only supports US passports and US driver's licenses, so it's not a general-purpose ID parser. General text detection covers more than 40 languages, but the Forms APIs (AnalyzeDocument and StartDocumentAnalysis with the Forms feature) are limited to English, Spanish, Italian, Portuguese, French, and German, and handwriting recognition only works in English. If your documents are multilingual general text rather than structured forms, that split between Textract's broad OCR language support and its narrower forms-language support is worth checking before you commit to it for a given document type.
Azure Document Intelligence: prebuilt models and a version-retirement clock you can't ignore
Underneath the prebuilt and custom model catalogs, Azure Document Intelligence has two general-purpose document analysis models that most other features build on: Read, which extracts printed and handwritten text, and Layout, which extracts text, tables, and document structure without assuming a specific document type. These are the models you'd reach for when a document doesn't match any prebuilt category and you're not ready to train a custom one.
Azure Document Intelligence is currently on API version v4.0 (2024-11-30), which is GA with no announced end-of-support date. The previous GA version, v3.1 (2023-07-31), also has no announced retirement date. The two older versions do have one: v3.0 is retiring, with end of support set for March 30, 2029, and v2.1 is retiring with end of support set for September 15, 2027. If you're building against Azure Document Intelligence today, that's a real planning constraint — anything still on v2.1 has a little under a year, as of this writing, before it needs to be migrated.
The prebuilt model catalog is the other reason teams pick Azure Document Intelligence over building their own extraction model. Current prebuilt models cover invoices, receipts, bank statements, checks, contracts, pay stubs, and credit cards, plus a set of US-specific forms: multiple US tax form variants (W-2, 1098, 1099, 1040), five US mortgage document types, health insurance cards, identity documents, and marriage certificates. Beyond the prebuilt catalog, Azure offers three custom model types — custom neural for mixed-type documents, custom template for static layouts, and custom composed, which combines standalone models — plus a custom classifier that identifies which document type it's looking at before an extraction model runs. Extracted fields come back as strongly typed values (string, number, date, currency, address, and others); prebuilt models have Microsoft-defined field schemas with automatic type mapping, while custom models require you to assign the field type yourself at training time.
Google Document AI: what each processor actually costs per page
Document AI's processors also differ in what they're built to do, which matters as much as price when you're picking one. Enterprise Document OCR identifies and extracts text, including handwritten text, from documents in more than 200 languages, and runs a machine-learning quality assessment of the document alongside extraction. Form Parser goes further: it extracts key-value pairs (including checkboxes), tables, and 11 generic entity types common across document types, also across 200+ languages. Custom Extractor uses either generative AI or a model you fine-tune yourself to pull fields you define, and Layout Parser is purpose-built for chunking documents into text, tables, and lists for retrieval and RAG pipelines rather than for field-level extraction.
Google Document AI prices by processor, not by a flat per-document rate, and the gap between processors is large. As of November 2026, the Enterprise Document OCR processor is free for the first 1,000 pages in a billing cycle, then $1.50 per 1,000 pages up to 5,000,000 pages, then $0.60 per 1,000 pages beyond that. Form Parser and the Custom Extractor are priced the same as each other: $30 per 1,000 pages up to 1,000,000 pages, then $20 per 1,000 pages above that threshold. The Layout Parser, aimed at chunking documents for retrieval and RAG pipelines, is a flat $10 per 1,000 pages, which includes the initial chunking step.
Specialized pretrained parsers — invoice, expense, utility, US driver's license, US passport, and identity-document proofing — bill per "count," where one count covers up to 10 pages of a single document, at $0.10 per count. A handful of document types are billed per classified document instead: the bank statement parser is $0.75 per document, and the pay slip and W-2 parsers are $0.30 per document. There's a hard structural limit to know about regardless of price: documents over 10 pages aren't supported by synchronous requests for specialized processors at all. If you need to process longer documents, you have to send a batch request, which supports documents up to 200 pages each.
Sending documents straight to an LLM: what Claude and GPT actually support
Skipping a dedicated IDP tool and handing a PDF directly to an LLM is a legitimate option within specific limits, not a hack. On the Anthropic API, Claude accepts PDFs up to 128 MB per request on the first-party API (that limit varies by platform), and up to 600 pages per request — though that drops to 100 pages when the request's context window is under 1M tokens. PDFs must be standard, unencrypted files with no password protection. You can supply a PDF three ways: as a URL reference, as a base64-encoded document content block, or by uploading it through the Files API and referencing the resulting file_id. Because PDF support relies on Claude's vision capabilities, dense pages — small fonts, complex tables, heavy graphics — can fill the context window before you hit the page-count limit.
There are also platform-specific wrinkles worth knowing if you're not calling the first-party Anthropic API directly: on Claude via Google Cloud Vertex AI and Amazon Bedrock, only base64-encoded PDF sources are available, and on Microsoft Foundry, the Files API isn't supported for Azure-hosted deployments. All active Claude models support PDF processing, so the limiting factor is usually the request-size and page-count ceilings rather than model choice.
OpenAI's Responses API takes a broader range of file types as input_file items: PDFs, text and code files, rich documents (.doc, .docx, .rtf, .odt), presentations (.ppt, .pptx), and spreadsheets (.csv, .xls, .xlsx). The Chat Completions API is narrower and only accepts PDF files as file content parts. For PDFs, on vision-capable models such as gpt-4o and later, the API extracts both text and page images and sends both to the model. For non-PDF document and text files, it extracts text only — no embedded images or charts — so converting a file to PDF first is the way to preserve chart or diagram fidelity. Spreadsheet files get a dedicated augmentation flow: instead of passing a whole sheet to the model, the API parses up to the first 1,000 rows per sheet and adds generated summary and header metadata. For PDF inputs specifically, a `detail` field (auto, low, or high) controls how page images are processed; the default, auto, uses high detail on GPT-5.6 and later models and low detail on earlier ones. One more routing detail: files can be supplied via base64 (file_data), an uploaded file_id, or an external file_url, but file_url is only available on the Responses API — Chat Completions doesn't support it.
Choosing an approach: dedicated document AI service vs. LLM-native extraction
The pattern across all four platforms points to a fairly clean decision frame. High-volume, structured forms — invoices, tax forms, IDs, bank statements — are the use case dedicated services like Textract, Azure Document Intelligence, and Document AI were built for: prebuilt models with Microsoft- or Google-defined field schemas, predictable per-page or per-count pricing, and quotas that scale into the millions of pages. Low-volume or highly varied document sets, or cases where you need the model to reason about the content alongside extracting it (summarizing a contract's obligations while also pulling its parties and dates, for example), tend to favor sending PDFs directly to Claude or GPT, as long as you stay inside their page and size limits.
Those aren't mutually exclusive choices for a single organization — many teams end up running structured, high-volume document types through a dedicated extractor and routing the long tail of unusual or reasoning-heavy documents to an LLM. Either pattern involves the same engineering work: defensive parsing of whatever the model or API returns, validation against business rules, and a path for a human to review low-confidence results before they hit a system of record.
If you want help choosing or building either pattern for your own documents, talk to our team.
Frequently asked questions
What is intelligent document processing (IDP)?
Intelligent document processing is the practice of turning unstructured documents — PDFs, scans, photos — into structured, validated data using a combination of OCR and extraction models, then routing that data into business systems like an ERP or CRM. It's typically described as an ingest, classify, extract, validate, review, and export pipeline, where any of those steps can be handled by a dedicated platform, a custom model, or an LLM.
Is AI document processing the same thing as OCR?
No. OCR converts the pixels in a scanned or photographed document into raw text, but it has no concept of document structure or meaning. AI document processing adds the layers on top of OCR — classifying the document type, matching extracted text to a schema, typing values like dates and currency, and validating the result — that turn raw text into usable, structured data.
How is document-extraction accuracy actually measured?
There's no single, universal accuracy benchmark across platforms, and none of AWS, Microsoft, Google, Anthropic, or OpenAI's own documentation publishes a general accuracy percentage for document extraction. In practice, accuracy depends heavily on document quality, layout consistency, and which specific model or processor you use, which is why evaluating a platform against your own representative documents matters more than any published figure.
Can I just send a PDF to Claude or GPT instead of using AWS Textract, Azure Document Intelligence, or Google Document AI?
Yes, within limits. Claude accepts PDFs up to 128 MB and 600 pages per request (100 pages when the context window is under 1M tokens), supplied by URL, base64, or the Files API. OpenAI's Responses API extracts both text and page images from PDFs on vision-capable models. Both are reasonable choices for low-to-moderate volume or documents where you also want the model to reason about the content, rather than only extract fixed fields.
Which platform should I use for invoices vs. contracts vs. ID documents?
For invoices, Azure Document Intelligence's prebuilt invoice model and Google Document AI's invoice parser both offer purpose-built field schemas; AWS doesn't have an invoice-specific prebuilt model. For contracts, Azure's prebuilt contract model extracts agreement and party details, or you can send the contract to an LLM if you also want it summarized or reasoned about. For ID documents, AWS Textract's AnalyzeID only covers US passports and driver's licenses, while Azure and Google Document AI each offer broader identity-document parsers.