GLM-OCR vs Nanonets-OCR
Pick GLM-OCR for high-volume PDF to Markdown, academic papers with formulas, and schema-based field extraction, where its $0.03 per million token API or MIT-licensed weights keep cost low. Pick Nanonets-OCR for printed business documents with signatures, watermarks and checkboxes, or for flowcharts you want as Mermaid code. Avoid both for handwriting or tables where every row and decimal must survive: GLM-OCR drops table footer rows, and Nanonets-OCR was not trained on handwriting.
GLM-OCRzai/glm-ocr | Nanonets-OCRnanonets/nanonets-ocr | |
|---|---|---|
| Type | Open source | Open source |
| Price | 6 credits / page | 2 credits / page |
| Per 1,000 pages | $6.00 | $2.00 |
| Typical speed | 1.3 s / page | 1.8 s / page |
| Best for | Low-cost general documents | Markdown with semantic tags |
| Inputs | PDF, images | PDF, images |
| Languages | 100+ languages | Multilingual |
| Max pages per request | 500 | 500 |
| Tables | ✓ Yes | ✓ Yes |
| Handwriting | No | No |
| Math | ✓ Yes | ✓ Yes |
| Bounding boxes | ✓ Yes | No |
| Confidence | ✓ Yes | No |
| Forms | No | ✓ Yes |
| Multilingual | ✓ Yes | ✓ Yes |
| 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
- You want a hosted API at $0.03 per million tokens for input and output, or free self-hosting with vLLM, SGLang, Ollama or transformers.
- You need fields pulled into a user-defined JSON schema, not only transcribed text.
- You process academic papers with formulas at volume, and its authors report 94.62 on OmniDocBench v1.5 and 1.86 PDF pages per second on one replica.
Choose Nanonets-OCR if
- Your documents carry signatures, watermarks and checkboxes, which it tags or converts to unicode symbols.
- You need flowcharts and org charts extracted as Mermaid code, or HTML and LaTeX output with inline and display equations told apart.
- You want printed PDFs turned into Markdown for LLMs and can run the model yourself, with DocVQA 89.43 reported for the 3B model.
Key differences
| GLM-OCR | Nanonets-OCR | |
|---|---|---|
| How you run it | Z.ai API or self-host with vLLM, SGLang, Ollama or transformers | Self-host the weights from Hugging Face |
| Licence | MIT for the model weights; SDK repo and bundled PP-DocLayoutV3 are Apache-2.0 | Not stated on the Nanonets-OCR2-3B model card |
| Price | API: $0.03 per million tokens for input and output. Self-hosted: free, you pay for compute | Free self-hosted, you pay for compute |
| Model size | 0.9B, with PP-DocLayout-V3 layout analysis and a GLM decoder | 3B, fine-tuned from Qwen2.5-VL-3B (Hugging Face lists about 4B params) |
| Output formats | Markdown, JSON, plain text | Markdown, HTML, LaTeX, Mermaid |
| olmOCR-bench overall (authors' numbers) | 75.2 (excluding headers and footers, via Z.ai API) | 69.5 (OCR2-3B) |
| Known failures | Repeats output unless a stop sequence is set; drops table footer and summary rows; loses comma decimal separators in cropped tables; no aarch64 Linux; API caps at 100 pages, 50 MB per PDF, 10 MB per image | Not trained on handwriting and can hallucinate, with generation loops and CER up to 2100% in one handwriting test; hallucinates with prompts other than its fixed one |
Sources
- Hugging Face model card (GLM-OCR)
- Z.ai GLM-OCR docs and pricing
- Issue #240 missing table rows
- Nanonets-OCR2-3B model card
- Nanonets-OCR-s announcement
- HF discussion fixed prompt
What each one is
Nanonets-OCR
Open image-to-Markdown model that tags tables, equations, signatures, watermarks and checkboxes.
Nanonets-OCR 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": "zai/glm-ocr","fallbacks": ["nanonets/nanonets-ocr"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
GLM-OCR alternativesNanonets-OCR alternativesBest OCR models in 2026