OCRRouter

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-ocrDoclingibm/docling
TypeOpen sourceOpen source
Price6 credits / page2 credits / page
Per 1,000 pages$6.00$2.00
Typical speed1.3 s / page2.2 s / page
Best forLow-cost general documentsStructured export for RAG
InputsPDF, imagesPDF, images, DOCX
Languages100+ languagesLatin scripts, CJK
Max pages per request500500
Tables✓ Yes✓ Yes
HandwritingNoNo
Math✓ Yes✓ Yes
Bounding boxes✓ Yes✓ Yes
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, 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-OCRDocling
What it is0.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 itZ.ai API, or self-host with vLLM, SGLang, Ollama or transformersLocal Python library only, with no hosted API
LicenceMIT for model weights; the SDK repo and bundled PP-DocLayoutV3 are Apache-2.0MIT, but individual models have their own licences
PriceAPI: $0.03 per million tokens for input and output. Self-hosted: free, you pay for computeFree and self-hosted, you pay for compute
Input and outputInput limits on the API: 100 pages, 50 MB per PDF, 10 MB per image. Outputs Markdown, JSON, plain textReads PDF, Office files, HTML, EPUB, images, emails and XBRL. Outputs Markdown, HTML, JSON, DocTags, plain text
BenchmarkOmniDocBench v1.5 overall 94.62 (authors); ParseBench mean 29.6 (independent)Not published
Known failureRepeats 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

What each one is

GLM-OCR

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

GLM-OCR details

Docling

IBM's open-source document converter with a structured document model.

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

Questions

More comparisons

GLM-OCR alternativesDocling alternativesBest OCR models in 2026