glmocr-sdk

Extract structured text, tables, formulas, and labeled regions from images and PDFs.

458|40|Updated Mar 30, 2026
One-click install
npx skills add https://github.com/zai-org/GLM-skills --skill glmocr-sdk
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: glmocr-sdk
Source: https://github.com/zai-org/GLM-skills/tree/main/skills/glmocr-sdk
Command: npx skills add https://github.com/zai-org/GLM-skills --skill glmocr-sdk

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill turns scanned pages, screenshots, and PDFs into machine-readable outputs so agents and pipelines can extract text, tables, formulas, and layout regions without manual copying or rekeying.

Core Features & Use Cases

  • OCR with layout awareness: Produces labeled regions (title, text, table, formula, figure, etc.) with normalized bounding boxes on a 0–1000 scale.
  • Dual interfaces: Works as a one-line Python API or a CLI for batch processing, stdout-first outputs, and agent-friendly piping to tools like jq.
  • Rich serialization and visualization: Exports JSON and Markdown, saves cropped images and optional layout visualizations, and supports MaaS/cloud or selfhosted modes for different deployment needs.
  • Use Case: Convert a multi-page research paper or a folder of invoice scans into structured JSON for downstream analytics and summarization.

Quick Start

Call the glmocr CLI or the Python API to parse 'document.pdf' and return JSON regions plus a Markdown version.

Frequently Asked Questions about glmocr-sdk

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract text and tables from a scanned PDF document?

You can extract tables from images and PDFs using layout-aware OCR. It processes scanned pages and returns normalized JSON with labeled table regions, bounding boxes, and Markdown rendering.

What is layout-aware extraction for academic papers and invoices?

Layout-aware extraction identifies structural regions like titles, text, tables, formulas, and figures in academic papers. It normalizes bounding boxes on a 0–1000 scale and exports structured JSON for downstream analytics.

Can I use a CLI for batch OCR processing on multiple PDF pages?

Yes, batch OCR processing is supported through a CLI interface. It enables stdout-first outputs and agent-friendly piping to tools like jq for handling folders of invoice scans or multi-page research papers.

Does the extraction API work with Python for agent pipelines?

Yes, the extraction API works with Python through a one-line interface. It integrates into agent pipelines to extract structured text, tables, and formulas from images and PDFs without manual copying.

What is the best way to convert multi-page PDFs into normalized JSON?

The best way to convert multi-page PDFs into normalized JSON is using dual OCR interfaces. You can call the Python API or CLI to parse documents, returning labeled regions and bounding boxes while honoring timeout options.