GLM-OCR goes beyond character detection. It analyzes document layout and semantic structure, enabling accurate reconstruction of content in a format that mirrors the original document. Headings remain headings, lists stay structured, tables retain alignment, and multi-column layouts are interpreted correctly.
This structural awareness significantly reduces the need for post-processing. Instead of spending time cleaning unstructured text, developers and enterprises receive output that is immediately usable in automation pipelines, databases, content systems, or AI-powered applications.
GLM-OCR processes a wide variety of inputs, including scanned PDFs, photographed documents, screenshots, and multi-column layouts. It performs reliably even on documents that mix text blocks, tables, and graphical elements.
Tables are often the most challenging component of document digitization. GLM-OCR detects table boundaries, column relationships, header structures, and multi-row formatting with high precision. Instead of flattening tables into fragmented lines of text, it reconstructs them in structured Markdown format, preserving alignment and hierarchy.
GLM-OCR seamlessly handles multi-page documents while maintaining section continuity and structural hierarchy. Page order is preserved, and logical relationships between sections remain intact.
GLM-OCR supports standard image formats such as JPEG and PNG, along with scanned and digital PDF files. Multi-page processing is handled natively, eliminating the need for page-by-page orchestration.
The output is delivered as structured Markdown, designed to preserve formatting and document hierarchy while remaining easy to transform into other structured formats when required.
Automate repetitive document processing tasks in finance, legal, HR, and operations. Extract structured data directly from PDFs and scanned files without manual entry.
Feed clean Markdown into search indexes, retrieval-augmented generation systems, and enterprise AI assistants to improve accuracy and reduce noise.
Extract line items, totals, dates, and structured financial data from invoices and statements with formatting preserved.
Convert scanned academic papers and multi-page research documents into structured, searchable text.
Measured on the AI/ML API gateway across live traffic. Figures are medians unless stated. Last updated 2026-10-12.
Document text extraction: GLM-OCR is documented as suitable for extracting text from PDFs, DOCX, PPTX, XLSX, HTML, images, and scanned documents, including mixed text-image documents.
Scanned business documents: It is documented as suitable for processing scanned documents such as invoices, contracts, forms, reports, receipts, certificates, and cards, with structured JSON output for key information extraction.
Tables and structured layouts: GLM-OCR is documented as suitable for text extraction from tables and other structured layouts, including complex tables with merged cells and multi-level headers, with HTML or Markdown-style output.
Formula and mathematical content: It is documented as suitable for recognizing formulas and mathematical expressions, including structured output for equations and notation.
import requests headers = {"Authorization": "Bearer " + AIMLAPI_KEY} res = requests.post( "https://api.aimlapi.com/v1/ocr", headers=headers, json={ "model": "zhipu/glm-ocr", "document": "https://example.com/invoice.pdf" }, ).json() print(res)
const res = await fetch("https://api.aimlapi.com/v1/ocr", { method: "POST", headers: { Authorization: `Bearer ${AIMLAPI_KEY}`, "Content-Type": "application/json", }, body: JSON.stringify({ model: "zhipu/glm-ocr", document: "https://example.com/invoice.pdf", }), }).then((r) => r.json()); console.log(res);
curl -s https://api.aimlapi.com/v1/ocr \ -H "Authorization: Bearer $AIMLAPI_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "zhipu/glm-ocr", "document": "https://example.com/invoice.pdf" }'
OpenAI-compatible — swap the base URL and it works with your existing SDK.
| Type | Price |
|---|---|
| Output | |
| Benchmark | Score | What it measures | Source | Retrieved |
|---|---|---|---|---|
| OCRBench | 94% | Text recognition + reasoning over images of text | Source | July 12, 2026 |
| Model | Input | Output | Context | Best for |
|---|---|---|---|---|
GLM-OCR This page | Document text extraction | |||
| Document text extraction | ||||
| Document text extraction | ||||
| Document text extraction |
GLM-OCR takes document, image as input and returns text.
GLM-OCR became available on February 9, 2026.
GLM-OCR is priced at $0.013 / page.
GLM-OCR is billed per generation — a fixed charge per output rather than by prompt length.
GLM-OCR was built by Zhipu AI.
Use zhipu/glm-ocr as the model id on AI/ML API.
Yes. GLM-OCR is served through AI/ML API, so the same key and endpoint format used for other models applies.
GLM-OCR is described as a document understanding model that extracts text and structured content from images and documents, not just plain OCR.