Document AI is GCP's document AI platform that automatically extracts structured data from PDFs and images. It ships with 50+ specialized processors (invoices, receipts, contracts, IDs, and more) on top of general-purpose OCR and Form Parser. Pair it with Gemini and you get a full document processing pipeline: OCR → structured extraction → summarization, classification, and Q&A.
| Category | Processor | Use Case |
|---|---|---|
| General | Document OCR | Text extraction |
| General | Form Parser | Key-value extraction |
| General | Layout Parser | Layout structure extraction |
| Finance | Invoice Parser | Invoices |
| Finance | Expense (receipts) | Receipts |
| Finance | Bank Statement | Bank statements |
| Finance | Pay Stub / W-2 / 1099 | Pay stubs and tax forms |
| ID | US Driver License / Passport | ID documents |
| Real Estate | Mortgage / Lease | Mortgage and lease contracts |
| Healthcare | Healthcare Forms | Medical forms |
| Custom | Custom Extractor / Classifier | Industry-specific |
from google.cloud import documentai_v1 as documentai
client = documentai.DocumentProcessorServiceClient()
processor_name = "projects/PROJECT/locations/us/processors/INVOICE_PROCESSOR_ID"
with open("invoice.pdf", "rb") as f:
raw_doc = documentai.RawDocument(content=f.read(), mime_type="application/pdf")
request = documentai.ProcessRequest(name=processor_name, raw_document=raw_doc)
result = client.process_document(request=request)
for entity in result.document.entities:
print(f"{entity.type_}: {entity.mention_text} (conf: {entity.confidence:.2f})")
# Example output:
# invoice_id: INV-2026-001 (conf: 0.99)
# total_amount: 12500 (conf: 0.98)
# supplier_name: ACME Corp (conf: 0.95)| Processor | Price / 1,000 pages |
|---|---|
| Document OCR | $1.50 |
| Form Parser | $30 |
| Layout Parser | $10 |
| Invoice / Expense / W-2 | $30 |
| Mortgage / Loan | $65 |
| Custom Extractor (inference) | $30 |
| Custom training | $5/h |
# Structured extraction with Document AI
extracted = process_with_doc_ai(pdf_path)
text = extracted.document.text
# Summarize and answer questions with Gemini
from vertexai.generative_models import GenerativeModel
gemini = GenerativeModel("gemini-2.0-pro-001")
summary = gemini.generate_content(
f"Summarize the following contract in 5 lines:\\n{text}"
)
answer = gemini.generate_content(
f"Read the following contract and tell me the termination terms:\\n{text}"
)| Feature | Document AI | AWS Textract | Azure Form Recognizer |
|---|---|---|---|
| OCR | Excellent | Excellent | Excellent |
| Form extraction | Excellent (Form Parser) | Excellent | Excellent |
| Specialized processors | 50+ | Invoices, receipts, IDs | Invoices, receipts, IDs |
| Custom training | Excellent | Excellent (Custom Queries) | Excellent (Custom Model) |
| OCR pricing | $1.50/1k | $1.50/1k | $1/1k |
What is Document AI?
A managed service that automatically extracts structured data from PDFs and images. It combines OCR and ML to process invoices, receipts, contracts, forms, ID documents, and more.
What processors are available?
Document OCR (general purpose), Form Parser, Layout Parser, 50+ specialized processors (invoices, receipts, W-2, W-9, driver's licenses, passports, etc.), and Custom Extractor (trained on your own data).
What is the Custom Extractor?
A feature for handling industry-specific forms by labeling and training the model yourself. Combine it with the Custom Document Classifier to build a fully bespoke document processing pipeline.
How is pricing structured?
Document OCR is $1.50 per 1,000 pages, Form Parser is $30 per 1,000 pages, and specialized processors run $30-65 per 1,000 pages. Custom processors charge separately for training and inference.
How does it integrate with Vertex AI and Gemini?
The standard pattern is extract with Document AI, then summarize, classify, or answer questions with Gemini. You can also feed the output into Vertex AI Search to power a RAG-based architecture.
Is Document AI Warehouse deprecated?
Yes — it was deprecated in 2024 and folded into Vertex AI Search. Long-term storage plus search is now handled through Vertex AI Search by default.
How does it compare to other cloud OCR services?
AWS Textract and Azure Form Recognizer offer comparable capabilities. Document AI's strength is the broadest catalog of specialized processors, with strong HIPAA and PCI compliance coverage.
How do you use confidence scores?
Every extracted value comes with a confidence score from 0 to 1. The standard pattern is to route anything below your threshold to a Human-in-the-loop (HITL) review queue.
Related Articles: AI / Document Processing
Vertex AI Agent Builder Detailed Guide (2026)
Agent Builder — Conversational Agents, Agent Engine, data stores. The agent platform on GCP.
Vision AI Complete Guide (2026)
Vision AI features — Vision API, AutoML Vision, Document AI. The vision stack on GCP.
Cloud Build Complete Guide: Triggers, Steps, Substitutions (2026)
Cloud Build — triggers, build steps, common CI patterns. The build engine of choice on GCP.
GAIL Generative AI Leader: Complete Exam Guide (2026)
Pass the Generative AI Leader exam — Gemini, Vertex AI, Workspace AI for business leaders.
* Google Cloud is a trademark of Google LLC. For the latest information, see the official Document AI documentation.
Practice with certification-focused question sets
View GCP Exam PrepNicheeLab Editorial Team
NicheeLab editorial team focused on data engineering and cloud certification learning. Content is structured around practical study needs and official exam domains.
Google Cloud Certification Roadmap (2026)
Choose your GCP certification path — Foundational, Associate...
CDL Cloud Digital Leader: Complete Exam Guide (2026)
Pass the Cloud Digital Leader exam — cloud business value, G...
GAIL Generative AI Leader: Complete Exam Guide (2026)
Pass the Generative AI Leader exam — Gemini, Vertex AI, Work...
Vertex AI Fundamentals for GCP Certs (2026)
Vertex AI basics every cert candidate needs — Workbench, Pip...
Associate Cloud Engineer (ACE): Complete Guide (2026)
Pass the Associate Cloud Engineer exam — Console, gcloud, pr...