OCRRouter

GLM-OCR vs Granite Docling

Pick GLM-OCR for high-volume PDF to Markdown through a cheap API, or for pulling fields into a JSON schema. Pick Granite Docling for self-hosted English PDFs with tables, code and equations, especially inside a Docling pipeline. The main split is delivery and scope: GLM-OCR is an API or self-host model, while Granite Docling is a 258M self-hosted model that outputs DocTags.

GLM-OCRzai/glm-ocrGranite Doclingibm/granite-docling
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 documentsSmall-model document conversion
InputsPDF, imagesPDF, images
Languages100+ languagesEnglish, experimental CJK and Arabic
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

  • You can call it through the Z.ai API at $0.03 per million tokens for input and output, so you do not need to run a GPU.
  • It extracts fields into a user-defined JSON schema, which suits forms, and it scores 94.62 on OmniDocBench v1.5 per its model card.
  • It reached 1.86 PDF pages per second on a single replica in the authors' test, which fits high-volume PDF to Markdown.

Choose Granite Docling if

  • It is Apache-2.0 and only 258M parameters, so it can run on CPU or a small GPU at no licence cost.
  • It reports table structure TEDS of 0.97 on FinTabNet, plus equation F1 of 0.968 and code recognition F1 of 0.988.
  • It outputs DocTags, Markdown, HTML, LaTeX and bounding boxes, and it is built to feed the Docling library.

Key differences

GLM-OCRGranite Docling
How you run itZ.ai API, or self-host with vLLM, SGLang, Ollama or transformersSelf-host only, typically inside Docling
LicenceMIT for the 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: free, you pay for computeFree, self-hosted, you pay for compute
Size0.9B parameters258M parameters
Output formatsMarkdown, JSON, plain textDocTags, Markdown, HTML, LaTeX, bounding boxes
Limits and platformAPI caps input at 100 pages, 50 MB per PDF and 10 MB per image. Cannot run on aarch64 LinuxEnglish primary; Japanese, Arabic and Chinese are experimental. Needs float32 on GPUs without bfloat16, such as T4
Known failureRepeats output unless a stop sequence is set. Drops table footer and summary rows, and loses comma decimal separators in cropped tablesGets stuck in repetitive loops on page headings and invoices. Ollama on CPU may hallucinate from FP16 overflow

Sources

What each one is

GLM-OCR

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

GLM-OCR details

Granite Docling

Compact IBM vision model that converts pages to DocTags for the Docling pipeline.

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

Questions

More comparisons

GLM-OCR alternativesGranite Docling alternativesBest OCR models in 2026