OCRRouter

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-ocrKrakenkraken/kraken
TypeOpen sourceOpen source
Price6 credits / page1 credit / page
Per 1,000 pages$6.00$1.00
Typical speed1.3 s / page1.5 s / page
Best forLow-cost general documentsHistorical documents and manuscripts
InputsPDF, imagesimages
Languages100+ languagesMany scripts, incl. right-to-left
Max pages per request500500
Tables✓ YesNo
HandwritingNo✓ Yes
Math✓ YesNo
Bounding boxes✓ Yes✓ Yes
Confidence✓ YesNo
FormsNoNo
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

  • 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-OCRKraken
Best-fit materialPDF to Markdown, academic papers with formulas, formsHistorical manuscripts, early prints, Arabic, Hebrew and other RTL scripts
How you run itZ.ai API, or self-host with vLLM, SGLang, Ollama or transformersLocal Python library installed with pip; no hosted API
LicenceMIT for model weights; SDK repo and bundled PP-DocLayoutV3 are Apache-2.0Apache-2.0
PriceAPI: $0.03 per million tokens for input and output; self-hosted is free plus computeFree, self-hosted; you pay for compute
Output formatsMarkdown, JSON, plain textALTO, PageXML, hOCR, plain text, bounding boxes
BenchmarksOmniDocBench v1.5 overall 94.62 (authors); ParseBench mean 29.6 (independent)Not published
Platform and limitsNo aarch64 Linux support; API caps input at 100 pages, 50 MB per PDF and 10 MB per imageLinux or macOS only, no Windows; install can fail with a dependency conflict (issue #816)
Known failureRepeats output unless a stop sequence is set; drops table footer rows and comma decimal separatorsLearned line order is lost in segmentation and text output (issue #820); usually needs training for good accuracy

Sources

What each one is

GLM-OCR

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

GLM-OCR details

Kraken

OCR engine for historical documents and manuscripts, with trainable models for unusual scripts.

Kraken 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": ["kraken/kraken"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

GLM-OCR alternativesKraken alternativesBest OCR models in 2026