OCRRouter

GLM-OCR vs Hunyuan OCR

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 an MIT licence. Pick Hunyuan OCR for photo and scene text spotting, image translation and low-resource scripts that you can self-host, if you are outside the EU, UK and South Korea. Neither is safe for financial tables where every row and decimal must survive.

GLM-OCRzai/glm-ocrHunyuan OCRtencent/hunyuan-ocr
TypeOpen sourceOpen source
Price6 credits / page2 credits / page
Per 1,000 pages$6.00$2.00
Typical speed1.3 s / page1.5 s / page
Best forLow-cost general documentsChinese documents and photos
InputsPDF, imagesPDF, images
Languages100+ languages100+ languages
Max pages per request500500
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 you do not need to run a GPU.
  • The model weights are MIT licensed, with no regional exclusions or user-count threshold.
  • It can extract fields into a user-defined JSON schema, and its authors report 94.62 on OmniDocBench v1.5.

Choose Hunyuan OCR if

  • One model of about 1B parameters covers document parsing, text spotting, information extraction and image translation.
  • It handles images up to 4K and lists low-resource and ancient-script OCR among its 12 task types.
  • It runs on a laptop or CPU through the llama.cpp GGUF path, and it outputs bounding boxes, HTML and LaTeX as well as Markdown.

Key differences

GLM-OCRHunyuan OCR
How you run itZ.ai API, or self-host with vLLM, SGLang, Ollama or transformersSelf-host only, with vLLM, Transformers or llama.cpp
LicenceMIT for the model weights; the SDK repo and bundled layout model are Apache-2.0Tencent Hunyuan Community License; excludes the EU, UK and South Korea, and needs a separate licence above 100M monthly active users
PriceAPI: $0.03 per million tokens for input and output; self-hosted is free apart from computeFree, self-hosted; you pay for compute
Output formatsMarkdown, JSON, plain textMarkdown, HTML, LaTeX, JSON, plain text, bounding boxes
BenchmarksOmniDocBench v1.5 overall 94.62 (authors); ParseBench mean 29.6 (independent)ParseBench mean 63.86 and ParseBench-2 overall 67.11 (both independent); OmniDocBench Not published
Limits and hardwareAPI caps input at 100 pages, 50 MB per PDF and 10 MB per image; does not run on aarch64 LinuxImages up to 4K and a 128K context window in v1.5; the unified vLLM setup recommends CUDA 13 and vLLM 0.25.1+
Known failureRepeats output unless a stop sequence is set; drops table footer rows and comma decimal separatorsParseBench-2 text score is 62.88 in public CI replay; an archived 1.0 note said Transformers and vLLM outputs differed in accuracy

Sources

What each one is

GLM-OCR

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

GLM-OCR details

Hunyuan OCR

Small end-to-end OCR model from Tencent covering parsing, extraction and photo translation.

Hunyuan 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": ["tencent/hunyuan-ocr"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

GLM-OCR alternativesHunyuan OCR alternativesBest OCR models in 2026