OCRRouter

GLM-OCR vs OCRmyPDF

Pick GLM-OCR when you need Markdown, JSON or schema-based fields from PDFs and images, such as academic papers with formulas or forms. Pick OCRmyPDF when you need to make scanned PDFs searchable and keep them as PDF/A, because it adds a text layer and leaves the rest of the file alone. They solve different problems: one reads documents into structured text, the other adds a text layer to the original PDF.

GLM-OCRzai/glm-ocrOCRmyPDFocrmypdf/ocrmypdf
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 documentsSearchable PDFs from scans
InputsPDF, imagesPDF, images
Languages100+ languages100+ languages (via Tesseract)
Max pages per request5001,000
Tables✓ YesNo
HandwritingNoNo
Math✓ YesNo
Bounding boxes✓ YesNo
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 outputs Markdown, JSON and plain text, and can extract fields into a user-defined JSON schema.
  • It scores 94.62 on OmniDocBench v1.5 per its model card, and costs $0.03 per million tokens on the Z.ai API.
  • It suits high-volume PDF to Markdown and academic papers with formulas, and you can use the API or self-host with vLLM, SGLang, Ollama or transformers.

Choose OCRmyPDF if

  • It produces validated searchable PDF/A by default, which suits archiving and compliance workflows.
  • It inserts the OCR layer losslessly where possible, without re-encoding other content.
  • It runs on CPU only, spreads work across all cores, and covers 100+ languages through Tesseract language packs, at no cost beyond your compute.

Key differences

GLM-OCROCRmyPDF
What it producesMarkdown, JSON or plain textSearchable PDF/A or plain text, with no layout, table or Markdown output
How you run itZ.ai API, or self-host with vLLM, SGLang, Ollama or transformersLocal command-line tool only
LicenceMIT for the model weights; the SDK repo and PP-DocLayoutV3 are Apache-2.0MPL-2.0
PriceAPI: $0.03 per million tokens for input and output; self-hosted is free apart from computeFree, self-hosted; you pay for compute
Hardware0.9B parameter model; does not run on aarch64 Linux (issue #227)CPU only, uses all cores
BenchmarkOmniDocBench v1.5 overall 94.62 (authors); ParseBench mean 29.6 (independent)Not published
Known failureRepeats output without a stop sequence (issue #220); drops table footer rows (issue #240); loses comma decimal separators in cropped tables (issue #241)--skip-text with default PDF/A output removes form fields (issue #1790); hangs on PDFs whose forms share one Resources dictionary (issue #1763); --deskew --clean-final can double or quadruple file size (issue #948)

Sources

What each one is

GLM-OCR

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

GLM-OCR details

OCRmyPDF

Command-line tool that adds a searchable text layer to scanned PDFs, using Tesseract.

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

Questions

More comparisons

GLM-OCR alternativesOCRmyPDF alternativesBest OCR models in 2026