Claude Vision and PDF processing
Process images and PDFs with Claude: chart extraction, receipt and invoice OCR, form understanding, multi-page document reasoning, and structured JSON extraction. Learn the vision content-block shape, PDF handling, cost and latency tradeoffs, and when to route to Haiku, Sonnet, or Opus.
View badge details
About This Course
Process images and PDFs with Claude chart extraction, receipt/invoice OCR, form understanding, multi-page document reasoning, and structured JSON extraction from visual sources. Learn the vision content-block shape, PDF beta, cost/latency tradeoffs, and when to route to Haiku vs Sonnet vs Opus.By the end of this course you will be able to build a document-intelligence pipeline for Orion Analytics that ingests scanned invoices, extracts line-items, validates totals, and hands off structured data to downstream systems.
Course Curriculum
10 Lessons
Vision content blocks and image inputs
By the end of this lesson you will know how to hand Claude an image via the Anthropic Messages API — the vision content-block shape, base64-encoded bytes vs a URL reference, supported formats (jpeg, png, gif, webp), size limits, and the cost model (roughly 1.15K input tokens per typical-resolution image). Anchors the mechanics behind every remaining CLD-AI-110 lab and sets up the L2 hands-on where you describe a chart with your first Claude Vision call.
Describe a chart with Claude Vision - Lab Exercises
By the end of this hands-on lab you will have made your first Claude Vision call — encoded a chart image as base64, sent it via the image content block in a Sonnet 5 request, and read Claude's structured description of the chart. Also compared tokens_in on text-only vs image requests to see the cost delta with your own numbers. Uses the PythonAI container + Claude API proxy — no external image-hosting setup needed.
Structured extraction from images
By the end of this lesson you will know how to force reliable JSON extraction from images — receipts, forms, screenshots, invoices — combining Vision content blocks with the tool_use schema pattern from CLD-AI-108. Covers the prompt patterns that eliminate hallucinated fields (explicit 'return null for smudged/missing fields' rules), how Vision degrades on very low-resolution scans, and when to escalate from Haiku to Sonnet to Opus. Sets up the L4 hands-on receipt extraction.
Extract a receipt to JSON - Lab Exercises
By the end of this hands-on lab you will have extracted a scanned Orion Analytics receipt into strict JSON (merchant, date, total, line_items array with per-item name / qty / price) using Claude Vision + a tool_use JSON Schema — with nullable handling verified against a smudged-field test case so missing fields return null rather than hallucinated values. Uses the PythonAI container + Claude API proxy. Reinforces the tool_use-as-schema pattern from CLD-AI-108.
PDF processing — pages, tokens, and the beta header
By the end of this lesson you will know how to send PDFs directly to Claude via the document content-block (beta), the token cost model per page, the current page-count limit, when Sonnet 5's multi-page reasoning shines (invoices with totals spanning pages, contracts with cross-referenced clauses), and when to slice a huge PDF into per-page images vs sending the whole doc. Sets up the L6 hands-on where you extract a 3-page invoice with cross-page total validation.
Extract a 3-page invoice PDF - Lab Exercises
By the end of this hands-on lab you will have sent a 3-page Orion Analytics PDF invoice to Claude via the document content-block, extracted per-page line items into a typed schema, and validated that the total on page 3 matches the sum of items across pages 1-2 (a cross-page-reasoning check no single-page vision call can do). Uses the PythonAI container + Claude API proxy — includes the beta header setup so students see it once in a real request.
Vision routing — Haiku vs Sonnet vs Opus
By the end of this lesson you will know how to route a vision task to the right Claude model tier: Haiku 4.5 for simple OCR + straightforward layouts (fastest, cheapest, ~85% on complex forms), Sonnet 5 for typical forms and charts (the workhorse default), Opus 5.5 for complex layouts with dense tables + handwritten annotations. Covers the accuracy / latency / cost tradeoffs with real numbers. Sets up L8 hands-on where you run the same image through all three tiers.
Compare Haiku, Sonnet, and Opus on the same image - Lab Exercises
By the end of this hands-on lab you will have run the same Orion receipt image through Haiku 4.5, Sonnet 5, and Opus 5.5 in parallel, measured extraction accuracy against gold labels + latency + per-call cost side-by-side, and defended a production routing recommendation based on your own numbers (usually: Haiku for typical receipts, escalate to Sonnet on smudge, only Opus for hand-annotated). Uses the PythonAI container + Claude API proxy.
Vision + tool_use — decide then act
By the end of this lesson you will know how to chain Claude Vision with tool_use — Claude sees an image, classifies what type of document it is, then invokes a downstream tool to route it (accounts_payable for invoices, expense_reports for receipts, ticket_create for screenshots) — a two-turn pattern that powers document-routing pipelines in production. Sets up the L10 capstone where you build the full Orion invoice-processing pipeline.
Orion invoice processing pipeline capstone - Lab Exercises
By the end of this hands-on capstone you will have shipped the full Orion Analytics document-processing pipeline — a Claude Vision router classifies incoming documents (invoice / receipt / screenshot), dispatches to a type-specific extractor with the tool_use schema shape for that document type, then runs a validator that catches inconsistent totals across pages. Works on both PDFs and images. Uses the PythonAI container + Claude API proxy — pulls together every CLD-AI-110 technique.