OCRRouter

Gemini Flash vs TrOCR

Pick Gemini Flash for whole pages and PDFs that you want back as Markdown or JSON, including mixed-language documents. Pick TrOCR only when you already have cropped single text-line images, mainly English handwriting or receipt lines, and want a free, self-hosted recognizer you can fine-tune.

Gemini Flashgoogle/gemini-flashTrOCRmicrosoft/trocr
TypeVision modelOpen source
Price15 credits / page1 credit / page
Per 1,000 pages$15.00$1.00
Typical speed1.6 s / page1.2 s / page
Best forHandwriting and mixed layoutsHandwritten text lines
InputsPDF, imagesimages
Languages100+ languagesEnglish
Max pages per request1,000100
Tables✓ YesNo
Handwriting✓ Yes✓ Yes
Math✓ YesNo
Bounding boxesNoNo
ConfidenceNoNo
FormsNoNo
Multilingual✓ YesNo
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 reads full pages and PDFs directly and can return Markdown, JSON, HTML or plain text from a prompt.
  • Gemini 3 Flash scores 92.62 on OmniDocBench v1.6, close to Gemini 3 Pro at 92.91.
  • It handles mixed-language documents, and its context window of up to 1M tokens fits long documents in one request.

Choose TrOCR if

  • It is MIT licensed and runs locally through Hugging Face transformers, so there is no per-token bill and no hosted API.
  • It reports 2.89 character error rate on the IAM handwriting set with the large model, and has separate checkpoints for handwritten, printed (SROIE) and scene text.
  • You can fine-tune it on your own line images, which suits a custom English recognizer.

Key differences

Gemini FlashTrOCR
InputImages and PDFs, full pagesSingle text-line images only; you need a separate line detector
How you run itHosted API (Gemini API or Vertex AI); no air-gapped or on-prem useLocal library via Hugging Face transformers
LicenceProprietaryMIT
PriceGemini 3 Flash Preview: $0.50 per 1M input tokens, $3.00 per 1M output tokens; Batch/Flex $0.25 and $1.50Free, self-hosted; you pay for compute
OutputMarkdown, JSON, HTML, plain text, driven by the prompt; no fixed schema or confidence scoresPlain text only; no layout, table or page-level output
BenchmarkOmniDocBench v1.6 overall: 92.62 (Gemini 3 Flash)IAM handwriting CER: 2.89 (TrOCR-large, reported by the authors)
Languages and known issuesMixed-language documents; cost per page varies with page density and output lengthReleased checkpoints are English-focused; up to 558M parameters for one line, slow on CPU versus CRNN recognizers

Sources

What each one is

Gemini Flash

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

Gemini Flash details

TrOCR

Transformer text recognition model. Reads single text lines, including handwriting.

TrOCR 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": ["microsoft/trocr"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Gemini Flash alternativesTrOCR alternativesBest OCR models in 2026