Skip to main content

Overview

GLM-OCR is a lightweight professional OCR model with parameters as small as 0.9B, yet it achieves state-of-the-art performance across multiple capabilities. It sets a new benchmark for document parsing with its β€œsmall size and high accuracy.” Key features include:
  • Performance SOTA: Scored 94.62 points to top OmniDocBench V1.5 and achieved current best performance across multiple mainstream document understanding benchmarks including tables and formulas at launch.
  • Optimized for Real-World Scenarios: Delivers stable, leading accuracy in complex environments like code documentation, intricate tables, and stamp recognition. Maintains exceptional recognition precision even with complex layouts, diverse fonts, or mixed text-image content.
  • Efficient and Cost-Effective: With just 0.9B parameters, supports VLLM and SGLang deployment, significantly reducing inference latency and computational overhead.

Input Modality

  • PDF, images (JPG, PNG)
  • Single image ≀ 10MB, PDF ≀ 50MB
  • Maximum support: 100 pages

Output Modality

Text / Image Links / MD Documents

Supported Language

Support Chinese, English, French, Spanish, Russian, German, Japanese, Korean, etc.
For detailed pricing information on GLM-OCR, please visit the Pricing Page.

Usage

Recognize text content from photos, screenshots, documents, and scans, supporting printed text, handwriting, and mathematical formulas. Applicable to diverse scenarios including education, research, and office work.
Identify table structures and content, converting them into HTML-formatted sequences. Suitable for scenarios involving table data entry, conversion, and editing.
Extract key information from various cards, certificates, receipts, and forms, outputting structured JSON data. Supports applications in banking, insurance, government services, legal, logistics, and other industries.
Support high-volume document recognition and parsing with high accuracy and standardized output formats, providing a robust foundation for RAG.

Resources

Introducing GLM-OCR

1

State-of-the-Art Performance, Precision in Action

Thanks to its proprietary CogViT visual encoder and deep scene optimization, GLM-OCR achieves β€œcompact size, high accuracy.”With only 0.9B parameters, GLM-OCR achieved SOTA on the authoritative document parsing benchmark OmniDocBench V1.5 with a score of 94.6. It outperforms multiple specialized OCR models across four key domainsβ€”text, formula, table recognition, and information extractionβ€”with performance approaching that of Gemini-3-Pro.DescriptionBeyond public benchmarks, we conducted internal evaluations across six core real-world scenarios. Results show GLM-OCR delivers significant advantages across dimensions including code documentation, real-world tables, handwriting, multilingual text, seal recognition, and invoice extraction.Description
2

Faster, More Cost-Effective

For speed, we compared different OCR methods under identical hardware and testing conditions (single replica, single concurrency), evaluating their performance in parsing and exporting Markdown files from both image and PDF inputs. Results show GLM-OCR achieves a throughput of 1.86 pages/second for PDF documents and 0.67 images/second for images, significantly outperforming comparable models.DescriptionPricing is uniform for both API input and output, costing just Β₯0.2 per million tokens. Processing one image costs approximately Β₯0.05, while a 100-page PDF requires only Β₯0.06β€”roughly one-tenth the cost of traditional OCR solutions.

Examples

Input

Description

Output

Description

Quick Start

curl --location --request POST 'https://api.z.ai/api/paas/v4/layout_parsing' \
--header 'Authorization: Bearer your-api-key' \
--header 'Content-Type: application/json' \
--data-raw '{
  "model": "glm-ocr",
  "file": "https://cdn.bigmodel.cn/static/logo/introduction.png"
}'