OCRRouter

GLM-OCR vs GOT-OCR 2.0

Pick GLM-OCR for high-volume PDF to Markdown, academic papers with formulas and schema-based field extraction, because it has a hosted API at $0.03 per million tokens and an MIT licence. Pick GOT-OCR 2.0 for formulas, sheet music, chemical structures and region-specific OCR that you run on your own GPU. Neither is safe for accuracy-critical output without checks: GLM-OCR drops table footer rows and GOT-OCR 2.0 gets worse in format mode.

GLM-OCRzai/glm-ocrGOT-OCR 2.0stepfun/got-ocr-2
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 documentsFormatted text, formulas and charts
InputsPDF, imagesimages
Languages100+ languagesChinese, English
Max pages per request500100
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, or a self-host path through vLLM, SGLang, Ollama or transformers.
  • You need Markdown or JSON output, including fields extracted into a user-defined JSON schema.
  • You need a permissive licence: the weights are MIT and the SDK repo is Apache-2.0.

Choose GOT-OCR 2.0 if

  • You need to read formulas, sheet music, chemical structures (SMILES) or charts, with output as LaTeX, TikZ, SMILES or kern.
  • You want region OCR guided by box coordinates or color, plus multi-page OCR with dynamic resolution.
  • You want a smaller 580M model that is free to self-host and available in Hugging Face Transformers with batched inference.

Key differences

GLM-OCRGOT-OCR 2.0
How you run itZ.ai API or self-host with vLLM, SGLang, Ollama or transformersSelf-host only, in Hugging Face Transformers
PriceAPI: $0.03 per million tokens for input and output. Self-hosted: free, you pay for computeFree, self-hosted, you pay for compute
LicenceMIT for model weights; SDK repo and PP-DocLayoutV3 are Apache-2.0Code Apache-2.0; training data CC BY-NC 4.0
Size0.9B parameters580M parameters
Output formatsMarkdown, JSON, plain textPlain text, Markdown, LaTeX, TikZ, SMILES, kern
BenchmarksOmniDocBench v1.5 overall 94.62 (authors). ParseBench mean 29.6 (independent)Not published
Known failuresRepeats output unless a stop sequence is set. Drops table footer and summary rows. Loses comma decimal separators in cropped table regions. Does not run on aarch64 Linux. API caps: 100 pages, 50 MB per PDF, 10 MB per imageOutput can start looping characters midway. Returns wrong text on images with no text instead of an empty string. Format mode is much worse than plain OCR mode

Sources

What each one is

GLM-OCR

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

GLM-OCR details

GOT-OCR 2.0

Unified OCR model that reads plain text, tables, formulas, sheet music and charts.

GOT-OCR 2.0 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": ["stepfun/got-ocr-2"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

GLM-OCR alternativesGOT-OCR 2.0 alternativesBest OCR models in 2026