Gemini Flash vs Donut
Pick Gemini Flash for bulk PDF to Markdown or prompt-driven JSON extraction when you want a hosted API with no training. Pick Donut for narrow, fixed-layout documents such as receipts and forms, where you can fine-tune it and run it on your own hardware. The main split is that Gemini Flash works out of the box and bills per token, while Donut is a free MIT base model you must train first.
Gemini Flashgoogle/gemini-flash | Donutnaver/donut | |
|---|---|---|
| Type | Vision model | Open source |
| Price | 15 credits / page | 1 credit / page |
| Per 1,000 pages | $15.00 | $1.00 |
| Typical speed | 1.6 s / page | 1.0 s / page |
| Best for | Handwriting and mixed layouts | Receipt and form fields after fine-tuning |
| Inputs | PDF, images | images |
| Languages | 100+ languages | English, Chinese, Japanese, Korean |
| Max pages per request | 1,000 | 100 |
| Tables | ✓ Yes | No |
| Handwriting | ✓ Yes | No |
| Math | ✓ Yes | No |
| Bounding boxes | No | No |
| Confidence | No | No |
| Forms | No | ✓ Yes |
| Multilingual | ✓ Yes | No |
| On OCRRouter | Available | Available |
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 converts full PDF pages to Markdown out of the box, and Gemini 3 Flash scores 92.62 on OmniDocBench v1.6.
- Its context window of up to 1M tokens fits long documents in one request.
- It handles mixed-language documents and returns JSON when you give it a prompt or schema, with no training step.
Choose Donut if
- It is MIT licensed and self-hosted, so you pay only for compute and the documents stay on your own infrastructure.
- After fine-tuning it maps document images straight to JSON for receipts, forms and classification, with no separate OCR step.
- A practitioner on Hacker News reports that about 200 fine-tuning documents can reach human-level accuracy on narrow data.
Key differences
| Gemini Flash | Donut | |
|---|---|---|
| How you run it | Hosted API through the Gemini API or Vertex AI. No on-prem option. | Self-hosted. You run it yourself and pay for compute. |
| Licence | Proprietary | MIT |
| Price | Gemini 3 Flash Preview: $0.50 per 1M input tokens and $3.00 per 1M output tokens. Batch/Flex: $0.25 input and $1.50 output. | Free software. You pay for compute. |
| Ready to use | Yes. You prompt it to get Markdown or JSON. | No. The base checkpoint is pretrain-only and must be fine-tuned first. |
| Output formats | Markdown, JSON, HTML, plain text | JSON, plain text |
| Benchmark | 92.62 on OmniDocBench v1.6 (Gemini 3 Flash) | Not published |
| Known failure | No fixed schema or confidence scores, because output is prompt-driven. Several newer Flash models move from $0.75/$3.75 to $1.50/$7.50 per 1M tokens on January 1, 2027. | Misses tiny text in large images because of input resolution limits. Transformers v5 dropped image-to-text pipeline support, so you need direct loading or v4. |
Sources
- Gemini API pricing
- OmniDocBench leaderboard
- Gemini pricing changes 2026
- donut-base model card
- Donut ECCV paper
- Hacker News thread
What each one is
Gemini Flash
General vision model with strong handwriting and layout understanding at a low price.
Gemini Flash detailsDonut
OCR-free document understanding model. Fine-tuned for receipts, forms and document Q&A.
Donut detailsTry both on your own file
Run the file once with each model and compare the output.
Use one, fall back to the other
{"model": "google/gemini-flash","fallbacks": ["naver/donut"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
Gemini Flash alternativesDonut alternativesBest OCR models in 2026