GLM-OCR vs Docling
Pick GLM-OCR when you need cheap, high-volume PDF to Markdown or schema-based field extraction, through the Z.ai API or self-hosted. Pick Docling when you ingest mixed files (PDF, DOCX, PPTX, XLSX, HTML) into a RAG pipeline and want structured JSON that keeps layout and reading order. GLM-OCR is a single 0.9B OCR model, while Docling is a Python library whose scan accuracy depends on the OCR engine you plug in.
GLM-OCRzai/glm-ocr | Doclingibm/docling | |
|---|---|---|
| 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 | 2.2 s / page |
| Best for | Low-cost general documents | Structured export for RAG |
| Inputs | PDF, images | PDF, images, DOCX |
| Languages | 100+ languages | Latin scripts, CJK |
| Max pages per request | 500 | 500 |
| 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
- The Z.ai API costs $0.03 per million tokens for input and output, so large PDF batches stay cheap.
- It can extract fields into a user-defined JSON schema, which suits forms and not just plain transcription.
- It scores 94.62 on OmniDocBench v1.5 on its own model card, and it handles academic papers with formulas.
Choose Docling if
- It reads PDF, DOCX, PPTX, XLSX, HTML, EPUB, images, emails and XBRL through one API.
- Its lossless JSON export keeps layout, reading order and table structure for downstream tools.
- It runs on macOS, Linux and Windows on x86_64 and arm64, and CPU alone works. GLM-OCR cannot run on aarch64 Linux.
Key differences
| GLM-OCR | Docling | |
|---|---|---|
| What it is | 0.9B multimodal OCR model from Z.ai (PP-DocLayout-V3 layout analysis plus a GLM decoder) | Python library from IBM Research that converts documents into a structured DoclingDocument and plugs in OCR engines and VLMs |
| How you run it | Z.ai API, or self-host with vLLM, SGLang, Ollama or transformers | Local Python library only, with no hosted API |
| Licence | MIT for model weights; the SDK repo and bundled PP-DocLayoutV3 are Apache-2.0 | MIT, but individual models have their own licences |
| Price | API: $0.03 per million tokens for input and output. Self-hosted: free, you pay for compute | Free and self-hosted, you pay for compute |
| Input and output | Input limits on the API: 100 pages, 50 MB per PDF, 10 MB per image. Outputs Markdown, JSON, plain text | Reads PDF, Office files, HTML, EPUB, images, emails and XBRL. Outputs Markdown, HTML, JSON, DocTags, plain text |
| Benchmark | OmniDocBench v1.5 overall 94.62 (authors); ParseBench mean 29.6 (independent) | Not published |
| Known failure | Repeats output unless a stop sequence is set (issue #220); drops table footer and summary rows (issue #240); loses comma decimal separators in cropped tables (issue #241) | Version 2.143.1 drops words and numbers with full-page Tesseract OCR (issue #5254); reading-order rule merges neighbouring columns on some layouts (issue #5132) |
Sources
- Hugging Face model card
- Z.ai GLM-OCR docs and pricing
- Docling GitHub README
- Supported formats
- Issue #240 missing table rows
- Issue #5254 OCR regression
What each one is
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": ["ibm/docling"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
GLM-OCR vs TesseractGLM-OCR vs MinerUUnlimited OCR vs DoclingPaddleOCR-VL vs DoclingLlamaParse vs DoclingMinerU vs DoclingDocling vs TesseractGLM-OCR vs dots.ocr
GLM-OCR alternativesDocling alternativesBest OCR models in 2026