GLM-OCR vs olmOCR
Pick GLM-OCR for high-volume PDF to Markdown at very low API cost, or when you need to pull fields into a JSON schema. Pick olmOCR for large self-hosted batches where accuracy matters more, especially papers with equations and pages that mix print and handwriting. olmOCR scores higher on its own benchmark (82.4 vs 75.2), but it needs a GPU with at least 12 GB VRAM.
GLM-OCRzai/glm-ocr | olmOCRallenai/olmocr | |
|---|---|---|
| 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.5 s / page |
| Best for | Low-cost general documents | Bulk PDF to text for datasets |
| Inputs | PDF, images | PDF, images |
| Languages | 100+ languages | Mainly English |
| Max pages per request | 500 | 1,000 |
| Tables | ✓ Yes | ✓ Yes |
| Handwriting | No | ✓ Yes |
| Math | ✓ Yes | ✓ Yes |
| Bounding boxes | ✓ Yes | No |
| 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
- The Z.ai API costs $0.03 per million tokens for input and output, against $0.09 input and $0.19 output on DeepInfra's hosted olmOCR-2-7B.
- It is a 0.9B model with no stated GPU minimum, and you can run it with vLLM, SGLang, Ollama or transformers.
- It can extract fields into a user-defined JSON schema, which suits forms.
Choose olmOCR if
- It scores 82.4 on olmOCR-Bench, while GLM-OCR scores 75.2 on the same benchmark via the Z.ai API.
- It handles equations, tables and handwriting, and strips headers and footers in natural reading order.
- Weights, training data and code are all released, and self-hosting costs under $200 per million pages, per Ai2.
Key differences
| GLM-OCR | olmOCR | |
|---|---|---|
| Model size | 0.9B parameters | 7B parameters |
| Licence | MIT for the weights; the SDK repo and bundled PP-DocLayoutV3 are Apache-2.0 | Apache-2.0 for the toolkit |
| How you run it | Z.ai API, or self-host with vLLM, SGLang, Ollama or transformers. Does not run on aarch64 Linux. | Self-host with vLLM on an NVIDIA GPU with at least 12 GB VRAM and 30 GB free disk, or use third-party hosted endpoints. No CPU-only option. |
| Price | API: $0.03 per million tokens for input and output. Self-hosted: free, you pay for compute. | Self-hosted: under $200 per million pages. DeepInfra: $0.09 input / $0.19 output per million tokens. |
| olmOCR-Bench | 75.2 overall, excluding headers and footers, via the Z.ai API | 82.4 overall (v0.4.0) |
| Limits | API caps input at 100 pages, 50 MB per PDF and 10 MB per image | Not published |
| Known failures | Repeats output unless a stop sequence is set. Drops table footer and summary rows. Loses comma decimal separators in cropped tables. Scores 29.6 mean on ParseBench. | Runs out of memory on a 12 GB GPU. Tends to get stuck on the last few pages. Image bounding box coordinates are unreliable. |
Sources
- Hugging Face model card
- Z.ai GLM-OCR docs and pricing
- Issue #240 missing table rows
- olmOCR GitHub README
- Issue #424 OOM
- Issue #433 stuck
What each one is
olmOCR
Open-source vision model from Ai2 (often searched as olm ocr) that turns PDFs into clean, reading-order text. Latest release: olmOCR 2.
olmOCR 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": ["allenai/olmocr"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
GLM-OCR vs ChandraGLM-OCR vs TrOCRUnlimited OCR vs olmOCRPaddleOCR-VL vs olmOCRGLM-OCR vs Hunyuan OCRMinerU vs olmOCRGLM-OCR vs PixtralolmOCR vs Phi-4-multimodal
GLM-OCR alternativesolmOCR alternativesBest OCR models in 2026