OCRRouter

Gemini Flash vs docTR

Pick Gemini Flash for cheap bulk PDF to Markdown or prompt-driven JSON extraction, including mixed-language documents, when a hosted API is acceptable. Pick docTR when you need word-level text with coordinates, self-hosting under Apache-2.0, or your own trained models. docTR returns only words and lines, so it will not give you Markdown or tables.

Gemini Flashgoogle/gemini-flashdocTRmindee/doctr
TypeVision modelOpen source
Price15 credits / page1 credit / page
Per 1,000 pages$15.00$1.00
Typical speed1.6 s / page0.9 s / page
Best forHandwriting and mixed layoutsWord-level OCR with positions
InputsPDF, imagesPDF, images
Languages100+ languagesMainly Latin scripts
Max pages per request1,000500
Tables✓ YesNo
Handwriting✓ YesNo
Math✓ YesNo
Bounding boxesNo✓ Yes
ConfidenceNo✓ Yes
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

  • Gemini 3 Flash scores 92.62 on OmniDocBench v1.6, close to Gemini 3 Pro at 92.91, and docTR has no published benchmark.
  • It can be prompted to return Markdown, JSON, HTML or plain text, while docTR has no Markdown or table output.
  • The context window of up to 1M tokens fits long documents in one request.

Choose docTR if

  • It exports a nested page, block, line and word structure with coordinates as JSON, while Gemini Flash gives no per-word confidence or coordinates by default.
  • It is Apache-2.0 and runs locally on CPU or NVIDIA GPU, so it works where an air-gapped or on-prem deployment is required.
  • There is no per-token bill, only your own compute, so cost does not vary with page density or output length.

Key differences

Gemini FlashdocTR
How you run itHosted API through the Gemini API or Vertex AIPython library on PyTorch, with Docker images
LicenceProprietaryApache-2.0
PriceGemini 3 Flash Preview: $0.50 per 1M input tokens, $3.00 per 1M output tokens; Batch/Flex $0.25 input and $1.50 outputFree, self-hosted (you pay for compute)
Output formatsMarkdown, JSON, HTML, plain text, shaped by your prompt with no fixed schemaJSON, plain text, bounding boxes
Tables and MarkdownCan be prompted to return MarkdownNo table, formula or Markdown output; words and lines only
BenchmarkOmniDocBench v1.6 overall: 92.62 (Gemini 3 Flash)Not published
Known failureCost per page depends on page density and output length; several newer Flash models rise from $0.75/$3.75 to $1.50/$7.50 per 1M tokens on January 1, 2027Cropping images gives poorer results (issue #2007); split-crop merging can misjoin repeated characters (issue #2229); ONNX export of MASTER truncates decoding steps (issue #2224)

Sources

What each one is

Gemini Flash

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

Gemini Flash details

docTR

Open-source OCR library from Mindee with separate text detection and recognition models.

docTR 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": ["mindee/doctr"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Gemini Flash alternativesdocTR alternativesBest OCR models in 2026