Every organization deals with paperwork — invoices, receipts, contracts, ID cards, tax forms. Extracting data from these documents manually is slow and error-prone. Azure AI Document Intelligence uses machine learning to read, understand, and extract structured data from documents automatically.
This article covers what the service offers, which models to use for different scenarios, and how to process your first document with just a few lines of code.
What is Azure AI Document Intelligence?
Azure AI Document Intelligence (formerly Form Recognizer) is an AI service that extracts text, key-value pairs, tables, and structures from documents. It handles:
- Scanned PDFs and images (via built-in OCR).
- Digital PDFs with complex layouts.
- Photos of receipts, business cards, and forms.
- Handwritten text in multiple languages.
Unlike basic OCR that just reads text, Document Intelligence understands the structure of your documents — it knows which text is a header, which values belong to which fields, and how tables are organized.
Prebuilt models vs. custom models
The service comes with two categories of models:
Prebuilt models
Ready to use with zero training. Microsoft has already trained these on millions of documents:
| Model | What it extracts |
|---|---|
| Invoice | Vendor name, amounts, line items, tax, due date |
| Receipt | Merchant, total, items, date, payment method |
| ID Document | Name, date of birth, document number, expiration |
| W-2 (US tax) | Employer info, wages, tax withholdings |
| Health Insurance Card | Member ID, group number, plan details |
| Business Card | Name, title, company, phone, email, address |
| Layout | Text, tables, selection marks, document structure |
| Read | Plain text extraction (OCR) with line and word positions |
Custom models
When your documents don’t match any prebuilt model — like internal forms, proprietary reports, or industry-specific paperwork — you can train a custom model using as few as 5 labeled samples.
Real-world use cases
Accounts payable automation
Process incoming invoices automatically: extract vendor, amount, line items, and PO numbers, then push the data into your ERP system. Teams that used to spend hours on manual data entry can process hundreds of invoices in minutes.
Expense report processing
Employees snap photos of receipts. Document Intelligence reads the merchant, date, total, and category, then populates the expense report automatically.
Contract analysis
Extract key clauses, dates, and parties from contracts. Combine with Azure OpenAI to summarize terms or flag unusual conditions.
Healthcare intake
Read insurance cards and patient forms at check-in. Extract member IDs, group numbers, and patient details to reduce front-desk workload and data entry errors.
Getting started
Step 1: Create the resource
- Go to the Azure Portal and search for “Document Intelligence”.
- Click Create.
- Choose your subscription, resource group, region, and pricing tier.
- Click Review + Create.
Step 2: Try it in Document Intelligence Studio
Before writing any code, explore Document Intelligence Studio at documentintelligence.ai.azure.com. Upload a sample document, pick a prebuilt model, and see the extracted data instantly. It’s the fastest way to evaluate whether a prebuilt model fits your documents.
Step 3: Analyze a document with Python
Here’s how to extract data from an invoice using Python:
from azure.ai.documentintelligence import DocumentIntelligenceClient
from azure.core.credentials import AzureKeyCredential
client = DocumentIntelligenceClient(
endpoint="https://YOUR-RESOURCE.cognitiveservices.azure.com/",
credential=AzureKeyCredential("YOUR-API-KEY")
)
# Analyze an invoice from a URL
poller = client.begin_analyze_document(
"prebuilt-invoice",
analyze_request={"url_source": "https://example.com/invoice.pdf"}
)
result = poller.result()
for doc in result.documents:
print(f"Vendor: {doc.fields['VendorName'].content}")
print(f"Total: {doc.fields['InvoiceTotal'].content}")
print(f"Date: {doc.fields['InvoiceDate'].content}")
if "Items" in doc.fields:
for item in doc.fields["Items"].value:
desc = item.value["Description"].content
amount = item.value["Amount"].content
print(f" - {desc}: {amount}")
Install the SDK:
pip install azure-ai-documentintelligence
Step 4: Extract tables and layout
For documents that don’t match a prebuilt model, the Layout model extracts all text, tables, and structure:
poller = client.begin_analyze_document(
"prebuilt-layout",
analyze_request={"url_source": "https://example.com/report.pdf"}
)
result = poller.result()
# Extract tables
for table in result.tables:
print(f"Table: {table.row_count} rows x {table.column_count} columns")
for cell in table.cells:
print(f" [{cell.row_index},{cell.column_index}] {cell.content}")
Combining with Azure OpenAI
Document Intelligence and Azure OpenAI are a powerful combination. A common pattern:
- Extract text and tables from a PDF using Document Intelligence.
- Send the extracted content to GPT-4o with a prompt like “Summarize this contract” or “Find all penalties and deadlines.”
- Get structured, actionable output that would have taken hours to compile manually.
This is especially effective for contracts, financial reports, and regulatory filings where you need both extraction accuracy and natural language understanding.
Pricing overview
| Model | Price per page (approx.) |
|---|---|
| Read (OCR) | $0.001 |
| Layout | $0.01 |
| Prebuilt (Invoice, Receipt, etc.) | $0.01 |
| Custom | $0.03 (training is free for first model) |
At these prices, processing 1,000 invoices costs about $10. Compare that to the cost of manual data entry and the ROI becomes obvious.
Next steps
- Open Document Intelligence Studio and upload a real document to see extraction results instantly.
- Start with a prebuilt model — invoices and receipts cover the most common automation scenarios.
- Train a custom model if your document type isn’t covered — 5 samples is all you need to start.
- Read the official docs: learn.microsoft.com/azure/ai-services/document-intelligence
Conclusion
Azure AI Document Intelligence eliminates the tedious work of reading and typing data from documents. Whether you’re processing 10 invoices a week or 10,000, the service scales to match your workload. Combined with Azure OpenAI, it turns raw documents into structured, actionable data — the kind of automation that delivers measurable ROI from day one.
Next up, we’ll explore Copilot Studio, Microsoft’s platform for building custom AI assistants without writing code.