OCRRouter

Mathpix Convert vs GLM-OCR

Pick Mathpix Convert for math-heavy papers and textbooks, handwritten equations, and PDFs you need as LaTeX or DOCX. Pick GLM-OCR for high-volume PDF to Markdown at low cost, or when you want to self-host the model. The main split is STEM output formats and hosted-only access versus a cheap, MIT-licensed model that you can run yourself but that has known table and repetition bugs.

Mathpix Convertmathpix/convertGLM-OCRzai/glm-ocr
TypeOCR APIOpen source
Price7 credits / page6 credits / page
Per 1,000 pages$7.00$6.00
Typical speed1.5 s / page1.3 s / page
Best forMath and scientific papersLow-cost general documents
InputsPDF, imagesPDF, images
Languages30+ languages100+ languages
Max pages per request500500
Tables✓ Yes✓ Yes
Handwriting✓ YesNo
Math✓ Yes✓ Yes
Bounding boxes✓ Yes✓ Yes
Confidence✓ Yes✓ Yes
FormsNoNo
MultilingualNo✓ 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 Mathpix Convert if

  • You need LaTeX or DOCX output from whole PDFs, which GLM-OCR does not produce (it outputs Markdown, JSON and plain text).
  • Your documents are math-heavy papers or textbooks with equations, tables and chemistry, or contain handwritten equations.
  • You want a hosted API only and do not need to run a model yourself.

Choose GLM-OCR if

  • You process PDFs in volume and want the lowest cost: $0.03 per million tokens on the Z.ai API, or free weights you run on your own compute.
  • You need to self-host under an MIT licence with vLLM, SGLang, Ollama or transformers.
  • You want to extract fields from forms into a user-defined JSON schema, not just transcribe text.

Key differences

Mathpix ConvertGLM-OCR
DeploymentHosted API onlyZ.ai API or self-hosted with vLLM, SGLang, Ollama or transformers
LicenceProprietaryMIT for model weights; SDK repo and bundled PP-DocLayoutV3 are Apache-2.0
PricingPDF $0.005 per page (0-1M), $0.0035 above 1M; images $0.002 each; one-time $19.99 API key activation feeAPI $0.03 per million tokens for input and output; self-hosted is free apart from compute
Output formatsLaTeX, Markdown, DOCX, HTML, JSONMarkdown, JSON, plain text
BenchmarksNot publishedOmniDocBench v1.5 94.62 and olmOCR-Bench 75.2 (authors); ParseBench mean 29.6 (independent)
Limits and platformImages with more than 12 text rows may be billed at the PDF page rateAPI caps input at 100 pages, 50 MB per PDF and 10 MB per image; no aarch64 Linux support
Known failure modesBilled monthly in arrears; $19.99 non-refundable fee before the first API key worksRepeated output unless a stop sequence is set; drops table footer rows; loses comma decimal separators in cropped tables

Sources

What each one is

Mathpix Convert

Specialist for math, science papers and handwritten formulas. Outputs LaTeX.

Mathpix Convert details

GLM-OCR

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

GLM-OCR 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": "mathpix/convert","fallbacks": ["zai/glm-ocr"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

Mathpix Convert alternativesGLM-OCR alternativesBest OCR models in 2026