GLM-OCR vs GOT-OCR 2.0
Pick GLM-OCR for high-volume PDF to Markdown, academic papers with formulas and schema-based field extraction, because it has a hosted API at $0.03 per million tokens and an MIT licence. Pick GOT-OCR 2.0 for formulas, sheet music, chemical structures and region-specific OCR that you run on your own GPU. Neither is safe for accuracy-critical output without checks: GLM-OCR drops table footer rows and GOT-OCR 2.0 gets worse in format mode.
GLM-OCRzai/glm-ocr | GOT-OCR 2.0stepfun/got-ocr-2 | |
|---|---|---|
| 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.5 s / page |
| Best for | Low-cost general documents | Formatted text, formulas and charts |
| Inputs | PDF, images | images |
| Languages | 100+ languages | Chinese, English |
| Max pages per request | 500 | 100 |
| Tables | ✓ Yes | ✓ Yes |
| Handwriting | No | No |
| Math | ✓ Yes | ✓ Yes |
| Bounding boxes | ✓ Yes | ✓ Yes |
| Confidence | ✓ Yes | No |
| Forms | No | No |
| 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
- You want a hosted API at $0.03 per million tokens for input and output, or a self-host path through vLLM, SGLang, Ollama or transformers.
- You need Markdown or JSON output, including fields extracted into a user-defined JSON schema.
- You need a permissive licence: the weights are MIT and the SDK repo is Apache-2.0.
Choose GOT-OCR 2.0 if
- You need to read formulas, sheet music, chemical structures (SMILES) or charts, with output as LaTeX, TikZ, SMILES or kern.
- You want region OCR guided by box coordinates or color, plus multi-page OCR with dynamic resolution.
- You want a smaller 580M model that is free to self-host and available in Hugging Face Transformers with batched inference.
Key differences
| GLM-OCR | GOT-OCR 2.0 | |
|---|---|---|
| How you run it | Z.ai API or self-host with vLLM, SGLang, Ollama or transformers | Self-host only, in Hugging Face Transformers |
| 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 |
| Licence | MIT for model weights; SDK repo and PP-DocLayoutV3 are Apache-2.0 | Code Apache-2.0; training data CC BY-NC 4.0 |
| Size | 0.9B parameters | 580M parameters |
| Output formats | Markdown, JSON, plain text | Plain text, Markdown, LaTeX, TikZ, SMILES, kern |
| Benchmarks | OmniDocBench v1.5 overall 94.62 (authors). ParseBench mean 29.6 (independent) | Not published |
| Known failures | Repeats output unless a stop sequence is set. Drops table footer and summary rows. Loses comma decimal separators in cropped table regions. Does not run on aarch64 Linux. API caps: 100 pages, 50 MB per PDF, 10 MB per image | Output can start looping characters midway. Returns wrong text on images with no text instead of an empty string. Format mode is much worse than plain OCR mode |
Sources
- Hugging Face model card
- Z.ai GLM-OCR docs and pricing
- GLM-OCR GitHub
- Issue #240 missing table rows
- GOT-OCR2.0 GitHub
- GOT-OCR 2.0 paper
What each one is
GOT-OCR 2.0
Unified OCR model that reads plain text, tables, formulas, sheet music and charts.
GOT-OCR 2.0 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": ["stepfun/got-ocr-2"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
GLM-OCR vs Typhoon OCRGLM-OCR vs DonutUnlimited OCR vs GOT-OCR 2.0PaddleOCR-VL vs GOT-OCR 2.0Reducto Parse vs GOT-OCR 2.0GLM-OCR vs Google Cloud Vision OCRGOT-OCR 2.0 vs RolmOCRMinerU vs GOT-OCR 2.0
GLM-OCR alternativesGOT-OCR 2.0 alternativesBest OCR models in 2026