OCRRouter

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-ocrNanonets-OCRnanonets/nanonets-ocr
TypeOpen sourceOpen source
Price6 credits / page2 credits / page
Per 1,000 pages$6.00$2.00
Typical speed1.3 s / page1.8 s / page
Best forLow-cost general documentsMarkdown with semantic tags
InputsPDF, imagesPDF, images
Languages100+ languagesMultilingual
Max pages per request500500
Tables✓ Yes✓ Yes
HandwritingNoNo
Math✓ Yes✓ Yes
Bounding boxes✓ YesNo
Confidence✓ YesNo
FormsNo✓ Yes
Multilingual✓ Yes✓ Yes
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 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-OCRNanonets-OCR
How you run itZ.ai API or self-host with vLLM, SGLang, Ollama or transformersSelf-host the weights from Hugging Face
LicenceMIT for the model weights; SDK repo and bundled PP-DocLayoutV3 are Apache-2.0Not stated on the Nanonets-OCR2-3B model card
PriceAPI: $0.03 per million tokens for input and output. Self-hosted: free, you pay for computeFree self-hosted, you pay for compute
Model size0.9B, with PP-DocLayout-V3 layout analysis and a GLM decoder3B, fine-tuned from Qwen2.5-VL-3B (Hugging Face lists about 4B params)
Output formatsMarkdown, JSON, plain textMarkdown, HTML, LaTeX, Mermaid
olmOCR-bench overall (authors' numbers)75.2 (excluding headers and footers, via Z.ai API)69.5 (OCR2-3B)
Known failuresRepeats 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 imageNot 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

What each one is

GLM-OCR

Small open-source OCR model from Z.ai with layout regions. MIT licensed.

GLM-OCR details

Nanonets-OCR

Open image-to-Markdown model that tags tables, equations, signatures, watermarks and checkboxes.

Nanonets-OCR 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": "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