GLM-OCR vs Google Cloud Vision OCR
Pick GLM-OCR when you want Markdown or schema-based JSON from PDFs at very low cost, and you can self-host or call a cheap API. Pick Google Cloud Vision OCR for photos of signs and labels, handwritten notes, or plain text at volume with bounding boxes. The main split is output: GLM-OCR gives structured Markdown but has table and repetition bugs, while Cloud Vision gives text and coordinates only, with no table or Markdown output.
GLM-OCRzai/glm-ocr | Google Cloud Vision OCRgoogle/cloud-vision | |
|---|---|---|
| Type | Open source | OCR API |
| Price | 6 credits / page | 2 credits / page |
| Per 1,000 pages | $6.00 | $2.00 |
| Typical speed | 1.3 s / page | 1.0 s / page |
| Best for | Low-cost general documents | Photos and simple scans |
| Inputs | PDF, images | PDF, images |
| Languages | 100+ languages | 100+ languages |
| Max pages per request | 500 | 2,000 |
| Tables | ✓ Yes | No |
| Handwriting | No | ✓ Yes |
| Math | ✓ Yes | No |
| Bounding boxes | ✓ Yes | ✓ Yes |
| Confidence | ✓ Yes | ✓ Yes |
| Forms | No | No |
| Multilingual | ✓ Yes | ✓ Yes |
| On OCRRouter | Available | Available |
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 or plain text, and can extract fields into a user-defined JSON schema, which suits forms and LLM pipelines.
- The Z.ai API costs $0.03 per million tokens for input and output, and the MIT-licensed 0.9B weights can be self-hosted for free with vLLM, SGLang, Ollama or transformers.
- It scores 94.62 on OmniDocBench v1.5 on its own model card, and handles academic papers with formulas and high-volume PDF to Markdown.
Choose Google Cloud Vision OCR if
- It handles handwriting through DOCUMENT_TEXT_DETECTION with language hints, and TEXT_DETECTION is built for photos such as signs and labels.
- It returns page, block, paragraph, word and symbol hierarchy with bounding polygons, which GLM-OCR's listed outputs do not include.
- Pricing is simple: the first 1,000 units per month are free, then $1.50 per 1,000, dropping to $0.60 per 1,000 above 5M units, and async batch takes up to 2,000 image files per request.
Key differences
| GLM-OCR | Google Cloud Vision OCR | |
|---|---|---|
| How you run it | Z.ai API or self-hosted with vLLM, SGLang, Ollama or transformers. Not supported on aarch64 Linux. | Hosted API on Google Cloud only, over REST or client libraries. No on-premise option. |
| Licence | MIT for model weights. SDK repo and bundled PP-DocLayoutV3 are Apache-2.0. | Proprietary |
| Price | $0.03 per million tokens (API). Free to self-host, you pay for compute. | First 1,000 units per month free, then $1.50 per 1,000 up to 5M, then $0.60 per 1,000. One PDF page is one unit. |
| Output formats | Markdown, JSON, plain text | JSON, plain text, bounding boxes. No Markdown, so you rebuild reading order yourself. |
| Tables and layout | Produces table markup, but drops footer and summary rows (issue #240) and loses comma decimal separators in cropped table regions (issue #241). | No table or layout structure. Google points to Document AI for forms and tables. |
| Limits | API caps input at 100 pages, 50 MB per PDF and 10 MB per image. | PDF and TIFF need async processing via Cloud Storage. Billing must be enabled even for the free 1,000 units. |
| Benchmarks and known failure | 94.62 on OmniDocBench v1.5 (authors), but only 29.6 mean on ParseBench (independent). Output can repeat unless a stop sequence is set (issue #220). | Not published |
Sources
- Hugging Face model card
- Z.ai GLM-OCR docs and pricing
- Issue #240 missing table rows
- Issue #220 repeated output
- Vision pricing
- OCR docs
What each one is
Google Cloud Vision OCR
Google Cloud's image OCR with text and document text detection, word boxes and confidence.
Google Cloud Vision OCR detailsTry both on your own file
Run the file once with each model and compare the output.
Use one, fall back to the other
{"model": "zai/glm-ocr","fallbacks": ["google/cloud-vision"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
GLM-OCR alternativesGoogle Cloud Vision OCR alternativesBest OCR models in 2026