OCRRouter

GLM-OCR vs Unlimited OCR

Pick GLM-OCR for high-volume PDF to Markdown on a budget, academic papers with formulas, and form fields pulled into a JSON schema. Pick Unlimited OCR for long reports and books parsed in one pass, or when you need bounding boxes. The main split is scale and output: GLM-OCR is a 0.9B model with a $0.03 per million token API but a 100-page cap, while Unlimited OCR is a 3B model that handles 40+ pages in one forward pass and returns block types and boxes.

GLM-OCRzai/glm-ocrUnlimited OCRbaidu/unlimited-ocr
TypeOpen sourceOpen source
Price6 credits / page2 credits / page
Per 1,000 pages$6.00$2.00
Typical speed1.3 s / page1.2 s / page
Best forLow-cost general documentsBooks and very long documents
InputsPDF, imagesPDF, images
Languages100+ languages30+ languages
Max pages per request5001,000
Tables✓ Yes✓ Yes
HandwritingNoNo
Math✓ Yes✓ Yes
Bounding boxes✓ Yes✓ Yes
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 has a hosted Z.ai API at $0.03 per million tokens for input and output, so high-volume PDF to Markdown stays cheap.
  • It scores 94.62 on OmniDocBench v1.5 per its model card, and it suits academic papers with formulas.
  • It can extract fields into a user-defined JSON schema, which helps with forms.

Choose Unlimited OCR if

  • It parses 40+ pages in a single forward pass with roughly constant memory, so long reports and books go in one request.
  • It returns block types and bounding boxes alongside text, which suits layout-aware extraction.
  • It scores 46.17 mean on ParseBench versus 29.6 for GLM-OCR, and Unlimited OCR 2 scores 77.1 on MarathonDocBench versus 33.7 for the next model, per Baidu.

Key differences

GLM-OCRUnlimited OCR
Model size0.9B parameters3B total, about 500M active per token; Unlimited OCR 2 is 3.34B
LicenceMIT for the weights; the SDK repo and bundled PP-DocLayoutV3 are Apache-2.0MIT
How you run itZ.ai API, or self-host with vLLM, SGLang, Ollama or transformersSelf-host with vLLM, SGLang or transformers; also hosted in Baidu Cloud's OCR product
PriceAPI: $0.03 per million tokens for input and output. Self-hosted: free, you pay for computeFree self-hosted, you pay for compute. Hosted pricing: Not published
Output formatsMarkdown, JSON, plain textMarkdown, plain text, bounding boxes
LimitsAPI caps input at 100 pages, 50 MB per PDF and 10 MB per imageContext capped at 32,768 tokens; multi-page input only works in base mode
Known failuresRepeated output (issue #220), dropped table footer rows (#240), lost comma decimals in cropped tables (#241), no aarch64 Linux (#227)Repetition loops (issue #55), hallucinated text (#58), mostly lost text styling, SGLang bbox loops on GB10 GPUs (#114), version 2 runs out of memory on 12 GB GPUs (#116)

Sources

What each one is

GLM-OCR

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

GLM-OCR details

Unlimited OCR

Open-source model from Baidu that reads hundreds of pages in one pass with flat memory use.

Unlimited 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": "zai/glm-ocr","fallbacks": ["baidu/unlimited-ocr"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

GLM-OCR alternativesUnlimited OCR alternativesBest OCR models in 2026