GLM-OCR vs Donut
Pick GLM-OCR for full-page PDF to Markdown, academic papers with formulas, and schema-based field extraction, since it works out of the box and costs $0.03 per million tokens through the Z.ai API. Pick Donut only for narrow, fixed-layout documents such as receipts and forms, where you can fine-tune it on your own data. Donut's base checkpoint is pretrain-only, so it cannot be used without training.
GLM-OCRzai/glm-ocr | Donutnaver/donut | |
|---|---|---|
| Type | Open source | Open source |
| Price | 6 credits / page | 1 credit / page |
| Per 1,000 pages | $6.00 | $1.00 |
| Typical speed | 1.3 s / page | 1.0 s / page |
| Best for | Low-cost general documents | Receipt and form fields after fine-tuning |
| Inputs | PDF, images | images |
| Languages | 100+ languages | English, Chinese, Japanese, Korean |
| Max pages per request | 500 | 100 |
| Tables | ✓ Yes | No |
| Handwriting | No | No |
| Math | ✓ Yes | No |
| Bounding boxes | ✓ Yes | No |
| Confidence | ✓ Yes | 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 GLM-OCR if
- It converts full pages to Markdown or JSON without any training, and scores 94.62 on OmniDocBench v1.5 per its model card.
- The Z.ai API costs $0.03 per million tokens for input and output, and you can also self-host with vLLM, SGLang, Ollama or transformers.
- It can extract fields into a user-defined JSON schema, so you can pull form fields without fine-tuning a model.
Choose Donut if
- It maps document images straight to structured JSON with no external OCR step, which suits receipts, forms and classification after fine-tuning.
- It is MIT licensed and available in Hugging Face Transformers, with no API limits because you only self-host it.
- A Hacker News practitioner reports that about 200 documents of fine-tuning can reach human-level accuracy on narrow data.
Key differences
| GLM-OCR | Donut | |
|---|---|---|
| Ready to use | Works as is, through the API or self-hosted | Base checkpoint is pretrain-only and must be fine-tuned first |
| How you run it | Z.ai API, or self-host with vLLM, SGLang, Ollama or transformers | Self-host only; Transformers v5 dropped image-to-text pipeline support, so load it directly or use v4 |
| Licence | MIT for the weights; the SDK repo and bundled PP-DocLayoutV3 are Apache-2.0 | MIT |
| Price | API: $0.03 per million tokens for input and output; self-hosted is free plus compute | Free, self-hosted; you pay for compute |
| Output formats | Markdown, JSON, plain text | JSON, plain text |
| Benchmarks | OmniDocBench v1.5 94.62 (authors); olmOCR-Bench 75.2 (authors); ParseBench mean 29.6 (independent) | Not published |
| Known failure | Repeats output unless a stop sequence is set, drops table footer rows, loses comma decimal separators in cropped tables, does not run on aarch64 Linux | Misses tiny text in large images because of input resolution limits; one HN user found results on personal documents did not match the promised scores |
Sources
- Hugging Face model card
- Z.ai GLM-OCR docs and pricing
- donut-base model card
- Donut ECCV paper
- Hacker News thread
- Issue #240 missing table rows
What each one is
Donut
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.
PDF, PNG, JPG, WebP, HEIC. Up to 20 MB each, 10 files.No file?
Use one, fall back to the other
{"model": "zai/glm-ocr","fallbacks": ["naver/donut"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
GLM-OCR vs GOT-OCR 2.0GLM-OCR vs NougatUnlimited OCR vs DonutPaddleOCR-VL vs DonutDocling vs DonutDonut vs MiniCPM-V 4.5Azure Document Intelligence vs GLM-OCRDonut vs ABBYY FineReader
GLM-OCR alternativesDonut alternativesBest OCR models in 2026