OCRRouter

Gemini Flash vs OCRmyPDF

Pick Gemini Flash when you need Markdown or JSON out of PDFs and images, at low cost per page, and can use a hosted API. Pick OCRmyPDF when you need to turn scanned PDFs into searchable PDF/A on your own hardware. The main split is the output: Gemini Flash returns structured text, OCRmyPDF returns the same PDF with a text layer added.

Gemini Flashgoogle/gemini-flashOCRmyPDFocrmypdf/ocrmypdf
TypeVision modelOpen source
Price15 credits / page1 credit / page
Per 1,000 pages$15.00$1.00
Typical speed1.6 s / page1.0 s / page
Best forHandwriting and mixed layoutsSearchable PDFs from scans
InputsPDF, imagesPDF, images
Languages100+ languages100+ languages (via Tesseract)
Max pages per request1,0001,000
Tables✓ YesNo
Handwriting✓ YesNo
Math✓ YesNo
Bounding boxesNoNo
ConfidenceNoNo
FormsNoNo
Multilingual✓ Yes✓ Yes
On OCRRouterAvailableAvailable

Prices are what you pay on OCRRouter. Speed is the provider's typical figure, not a benchmark we ran.

Which to choose

Choose Gemini Flash if

  • It returns Markdown, JSON, HTML or plain text from a prompt, so you can extract structured data from documents.
  • Gemini 3 Flash scores 92.62 on OmniDocBench v1.6, and a 1M-token context window fits long documents in one request.
  • Batch/Flex pricing is $0.25 per 1M input tokens and $1.50 per 1M output tokens, which suits cheap bulk PDF to Markdown.

Choose OCRmyPDF if

  • It produces validated searchable PDF/A by default, which suits archiving and compliance workflows.
  • It runs locally on CPU only and spreads work across all cores, so documents stay on your own machines and there is no per-token bill.
  • It inserts the OCR layer losslessly where possible without re-encoding other content, and Tesseract language packs cover 100+ languages.

Key differences

Gemini FlashOCRmyPDF
LicenceProprietaryMPL-2.0
How you run itHosted API (Gemini API or Vertex AI); not suited to air-gapped or on-prem useLocal command-line tool, CPU only
PriceGemini 3 Flash Preview: $0.50 input and $3.00 output per 1M tokens; Batch/Flex $0.25 and $1.50Free and self-hosted; you pay for compute
Output formatsMarkdown, JSON, HTML, plain textSearchable PDF, plain text; no layout, table or Markdown output
BenchmarkOmniDocBench v1.6 overall: 92.62 (Gemini 3 Flash)Not published
HandwritingNot publishedListed as not suited to handwriting
Known failureOutput is prompt-driven with no fixed schema or confidence scores; cost per page varies with page density and output length--skip-text with default PDF/A output removes form fields (issue #1790); some PDFs with shared form Resources dictionaries hang (issue #1763); --deskew --clean-final can double or quadruple file size (issue #948)

Sources

What each one is

Gemini Flash

General vision model with strong handwriting and layout understanding at a low price.

Gemini Flash details

OCRmyPDF

Command-line tool that adds a searchable text layer to scanned PDFs, using Tesseract.

OCRmyPDF details

Try both on your own file

Run the file once with each model and compare the output.

PDF, PNG, JPG, WebP, HEIC. Up to 20 MB each, 10 files.No file?

Use one, fall back to the other

{"model": "google/gemini-flash","fallbacks": ["ocrmypdf/ocrmypdf"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Gemini Flash alternativesOCRmyPDF alternativesBest OCR models in 2026