Back to Models

GLM OCR

zhipuzhipu/glm-ocr

Media Generation Capabilities

ocr
input_formats
  • png
  • jpg
  • jpeg
  • pdf

API guide

Document parsing (PDF / image β†’ Markdown)

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zhipu/glm-ocr",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "image_url",
            "image_url": { "url": "https://therouter.ai/assets/vision-sample.png" }
          },
          {
            "type": "text",
            "text": "Convert this document to structured Markdown. Preserve tables, headings, and list structure exactly."
          }
        ]
      }
    ]
  }'

Key Information Extraction (β†’ JSON)

cURL
curl https://api.therouter.ai/v1/chat/completions \
  -H "Authorization: Bearer $THEROUTER_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "zhipu/glm-ocr",
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "image_url",
            "image_url": { "url": "https://therouter.ai/assets/vision-sample.png" }
          },
          {
            "type": "text",
            "text": "Extract the following fields as JSON: invoice_number, date, vendor_name, total_amount, currency."
          }
        ]
      }
    ],
    "response_format": { "type": "json_object" }
  }'
Fact ledger β€” every claim on this page traces here
sourceURLretrieved
Release datehuggingface.co β†—2026-06-09verified
Licensehuggingface.co β†—2026-06-09verified
Total parametersarxiv.org β†—2026-06-09verified
Minimum GPU VRAMpasqualepillitteri.it β†—2026-06-09to verify
PDF throughput (single concurrency)huggingface.co β†—2026-06-09verified
Image throughput (single concurrency)huggingface.co β†—2026-06-09verified
MTP decoding speedarxiv.org β†—2026-06-09verified
Training cutoffβ€”β€”unknown
OmniDocBench V1.5huggingface.co β†—2026-06-09verified
GLM-OCR technical paper published on arXivarxiv.org β†—2026-06-09verified
Does GLM-OCR handle handwritten text and stamps?huggingface.co β†—2026-06-09to verify
Should I use the API directly or the GLM-OCR SDK for document parsing?huggingface.co β†—2026-06-09to verify
Can GLM-OCR run locally, and what are the hardware requirements?huggingface.co β†—2026-06-09to verify
Help & contact