OCRRouter

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-ocrGoogle Cloud Vision OCRgoogle/cloud-vision
TypeOpen sourceOCR API
Price6 credits / page2 credits / page
Per 1,000 pages$6.00$2.00
Typical speed1.3 s / page1.0 s / page
Best forLow-cost general documentsPhotos and simple scans
InputsPDF, imagesPDF, images
Languages100+ languages100+ languages
Max pages per request5002,000
Tables✓ YesNo
HandwritingNo✓ Yes
Math✓ YesNo
Bounding boxes✓ Yes✓ Yes
Confidence✓ Yes✓ Yes
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 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-OCRGoogle Cloud Vision OCR
How you run itZ.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.
LicenceMIT 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 formatsMarkdown, JSON, plain textJSON, plain text, bounding boxes. No Markdown, so you rebuild reading order yourself.
Tables and layoutProduces 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.
LimitsAPI 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 failure94.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

What each one is

GLM-OCR

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

GLM-OCR details

Google Cloud Vision OCR

Google Cloud's image OCR with text and document text detection, word boxes and confidence.

Google Cloud Vision 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": ["google/cloud-vision"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

GLM-OCR alternativesGoogle Cloud Vision OCR alternativesBest OCR models in 2026