GLM-OCR vs RapidOCR
Pick GLM-OCR when you need Markdown, tables, formulas or JSON field extraction from PDFs, and you can accept its table and repeat-output bugs. Pick RapidOCR when you only need plain text and boxes from Chinese or English images, offline on CPU, in Python, C++, Java or C#. The main split is output: GLM-OCR parses documents into structured text, RapidOCR returns text lines and coordinates only.
GLM-OCRzai/glm-ocr | RapidOCRrapidai/rapidocr | |
|---|---|---|
| Type | Open source | Open source |
| Price | 6 credits / page | 1 credit / page |
| Per 1,000 pages | $6.00 | $1.00 |
| Typical speed | 1.3 s / page | 0.6 s / page |
| Best for | Low-cost general documents | Lightweight OCR on CPU or edge |
| Inputs | PDF, images | images |
| Languages | 100+ languages | Chinese, English and more |
| Max pages per request | 500 | 100 |
| Tables | ✓ Yes | No |
| Handwriting | No | No |
| 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 and plain text, and can extract fields into a user-defined JSON schema.
- The Z.ai API costs $0.03 per million tokens for input and output, and the weights are MIT-licensed for self-hosting.
- It scores 94.62 on OmniDocBench v1.5 in its model card, and suits academic papers with formulas.
Choose RapidOCR if
- It runs offline on CPU through ONNX Runtime, with optional TensorRT, OpenVINO or MNN engines.
- It has bindings for Python, C++, Java and C#, so you can embed it in Java or C# apps.
- It is free under Apache-2.0 and fits Chinese and English screenshots and receipts.
Key differences
| GLM-OCR | RapidOCR | |
|---|---|---|
| Output | Markdown, JSON, plain text | Plain text and bounding boxes |
| How you run it | Z.ai API, or self-host with vLLM, SGLang, Ollama or transformers | Local library for Python, C++, Java or C# |
| Licence | MIT for weights; SDK repo and PP-DocLayoutV3 are Apache-2.0 | Apache-2.0; converted models keep their upstream licences |
| Price | API: $0.03 per million tokens. Self-hosted: free, you pay for compute | Free, self-hosted, you pay for compute |
| Benchmark | OmniDocBench v1.5: 94.62 (authors). ParseBench mean: 29.6 (independent) | Not published |
| Languages | Not published | Chinese and English by default; other languages need extra models |
| Known failures | Repeated output without a stop sequence, dropped table footer rows, lost comma decimals, no aarch64 Linux support, API limit of 100 pages, 50 MB per PDF, 10 MB per image | 16-bit grayscale PNG or TIFF give no or wrong text, sliced inference crashes on large pages, Arabic recognition crashes |
Sources
- Hugging Face model card
- Z.ai GLM-OCR docs and pricing
- Issue #240 missing table rows
- RapidOCR GitHub README
- Issue #776
What each one is
RapidOCR
PaddleOCR models packaged for ONNX Runtime and other engines. Easy to deploy without Paddle.
RapidOCR detailsTry 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": ["rapidai/rapidocr"],"file_url": "https://example.com/document.pdf"}Questions
More comparisons
GLM-OCR vs docTRGLM-OCR vs OCRmyPDFUnlimited OCR vs RapidOCRPaddleOCR-VL vs RapidOCRRapidOCR vs Google Cloud Vision OCRGemini Flash vs RapidOCRMarker vs RapidOCRRapidOCR vs TrOCR
GLM-OCR alternativesRapidOCR alternativesBest OCR models in 2026