GLM-OCR vs Kraken
Pick GLM-OCR for modern PDFs, academic papers and forms where you want Markdown or JSON back at low cost. Pick Kraken for historical manuscripts, early prints and non-Latin or right-to-left scripts, where you can train on your own material. The main split is the target material: GLM-OCR is a ready-to-call model for current documents, Kraken is a trainable toolkit for historical ones.
GLM-OCRzai/glm-ocr | Krakenkraken/kraken | |
|---|---|---|
| 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 | Historical documents and manuscripts |
| Inputs | PDF, images | images |
| Languages | 100+ languages | Many scripts, incl. right-to-left |
| Max pages per request | 500 | 500 |
| Tables | ✓ Yes | No |
| Handwriting | No | ✓ Yes |
| Math | ✓ Yes | No |
| Bounding boxes | ✓ Yes | ✓ Yes |
| Confidence | ✓ Yes | No |
| Forms | No | No |
| 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
- It converts high-volume PDFs to Markdown at $0.03 per million tokens through the Z.ai API.
- It handles academic papers with formulas and can extract fields into a user-defined JSON schema from forms.
- You can call a hosted API or self-host it with vLLM, SGLang, Ollama or transformers, under an MIT licence for the weights.
Choose Kraken if
- It is built for historical manuscripts and early prints, with right-to-left, BiDi and top-to-bottom support for scripts such as Arabic and Hebrew.
- Layout analysis, reading order and character recognition are all trainable, and a public Zenodo repository holds community-trained models.
- It writes ALTO, PageXML, abbyyXML and hOCR, the formats digital humanities tools use.
Key differences
| GLM-OCR | Kraken | |
|---|---|---|
| Best-fit material | PDF to Markdown, academic papers with formulas, forms | Historical manuscripts, early prints, Arabic, Hebrew and other RTL scripts |
| How you run it | Z.ai API, or self-host with vLLM, SGLang, Ollama or transformers | Local Python library installed with pip; no hosted API |
| Licence | MIT for model weights; SDK repo and bundled PP-DocLayoutV3 are Apache-2.0 | Apache-2.0 |
| Price | API: $0.03 per million tokens for input and output; self-hosted is free plus compute | Free, self-hosted; you pay for compute |
| Output formats | Markdown, JSON, plain text | ALTO, PageXML, hOCR, plain text, bounding boxes |
| Benchmarks | OmniDocBench v1.5 overall 94.62 (authors); ParseBench mean 29.6 (independent) | Not published |
| Platform and limits | No aarch64 Linux support; API caps input at 100 pages, 50 MB per PDF and 10 MB per image | Linux or macOS only, no Windows; install can fail with a dependency conflict (issue #816) |
| Known failure | Repeats output unless a stop sequence is set; drops table footer rows and comma decimal separators | Learned line order is lost in segmentation and text output (issue #820); usually needs training for good accuracy |
Sources
- Hugging Face model card
- Z.ai GLM-OCR docs and pricing
- Issue #240 missing table rows
- Kraken GitHub README
- Kraken docs
- Issue #820
What each one is
Kraken
OCR engine for historical documents and manuscripts, with trainable models for unusual scripts.
Kraken 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": ["kraken/kraken"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
GLM-OCR vs TrOCRGLM-OCR vs docTRUnlimited OCR vs KrakenPaddleOCR-VL vs KrakenGemini Flash vs GLM-OCRGLM-OCR vs SmolDoclingTesseract vs KrakenReducto Parse vs Kraken
GLM-OCR alternativesKraken alternativesBest OCR models in 2026