OCRRouter

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-ocrolmOCRallenai/olmocr
TypeOpen sourceOpen source
Price6 credits / page2 credits / page
Per 1,000 pages$6.00$2.00
Typical speed1.3 s / page1.5 s / page
Best forLow-cost general documentsBulk PDF to text for datasets
InputsPDF, imagesPDF, images
Languages100+ languagesMainly English
Max pages per request5001,000
Tables✓ Yes✓ Yes
HandwritingNo✓ Yes
Math✓ Yes✓ Yes
Bounding boxes✓ YesNo
Confidence✓ YesNo
FormsNoNo
Multilingual✓ YesNo
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

  • 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-OCRolmOCR
Model size0.9B parameters7B parameters
LicenceMIT for the weights; the SDK repo and bundled PP-DocLayoutV3 are Apache-2.0Apache-2.0 for the toolkit
How you run itZ.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.
PriceAPI: $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-Bench75.2 overall, excluding headers and footers, via the Z.ai API82.4 overall (v0.4.0)
LimitsAPI caps input at 100 pages, 50 MB per PDF and 10 MB per imageNot published
Known failuresRepeats 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

What each one is

GLM-OCR

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

GLM-OCR details

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

Questions

More comparisons

GLM-OCR alternativesolmOCR alternativesBest OCR models in 2026