OCRRouter

GLM-OCR vs SmolDocling

Pick GLM-OCR for high-volume PDF to Markdown, academic papers with formulas and schema-based field extraction, because it has a $0.03 per million token API and a self-host option. Pick SmolDocling only for experiments with a tiny English-only model on modest hardware, since it is a preview release and its authors point users to Granite-Docling. Neither suits financial tables where every row and decimal must survive.

GLM-OCRzai/glm-ocrSmolDoclinghuggingface/smoldocling
TypeOpen sourceOpen source
Price6 credits / page1 credit / page
Per 1,000 pages$6.00$1.00
Typical speed1.3 s / page1.0 s / page
Best forLow-cost general documentsVery cheap page conversion
InputsPDF, imagesPDF, images
Languages100+ languagesMainly English
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 want a hosted API at $0.03 per million tokens for input and output, with the option to self-host under an MIT licence.
  • You need to extract fields from forms into a user-defined JSON schema, not just transcribe text.
  • You process academic papers with formulas and want Markdown, JSON or plain text out, backed by a 94.62 score on OmniDocBench v1.5 (authors' figure).

Choose SmolDocling if

  • You are experimenting with a 256M parameter document model that runs on modest hardware and takes about 0.35 seconds per page on an A100 with vLLM.
  • You want DocTags output for Docling, plus Markdown, HTML, JSON, LaTeX and bounding boxes from one model.
  • Your pages are English and your budget is low, so a free self-hosted model under Apache-2.0 fits.

Key differences

GLM-OCRSmolDocling
Size0.9B parameters256M parameters
How you run itZ.ai API, or self-host with vLLM, SGLang, Ollama or transformersSelf-host only
PriceAPI: $0.03 per million tokens for input and output. Self-hosted: free, you pay for computeFree, you pay for compute
LicenceMIT for the model weights; SDK repo and bundled PP-DocLayoutV3 are Apache-2.0Apache-2.0 per the model summary; the metadata tag says CDLA-Permissive-2.0
Output formatsMarkdown, JSON, plain textDocTags, Markdown, HTML, JSON, LaTeX, bounding boxes
LanguagesNot publishedEnglish only
Known failuresRepeats output unless a stop sequence is set (issue #220); drops table footer and summary rows (#240); loses comma decimal separators in cropped tables (#241); no aarch64 Linux support (#227); API limits of 100 pages, 50 MB per PDF and 10 MB per imageEndless token repetition and missing closing tags are listed as typical defects; output loops on some images and slows generation (Docling issue #1515); preview release superseded by Granite-Docling

Sources

What each one is

GLM-OCR

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

GLM-OCR details

SmolDocling

Tiny 256M vision model from Hugging Face and IBM that outputs DocTags. Predecessor of Granite Docling.

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

Questions

More comparisons

GLM-OCR alternativesSmolDocling alternativesBest OCR models in 2026