Back to Models
GLM OCR
zhipuzhipu/glm-ocr
Media Generation Capabilities
ocr
- input_formats
- png
- jpg
- jpeg
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
| source | URL | retrieved | |
|---|---|---|---|
| Release date | huggingface.co β | 2026-06-09 | verified |
| License | huggingface.co β | 2026-06-09 | verified |
| Total parameters | arxiv.org β | 2026-06-09 | verified |
| Minimum GPU VRAM | pasqualepillitteri.it β | 2026-06-09 | to verify |
| PDF throughput (single concurrency) | huggingface.co β | 2026-06-09 | verified |
| Image throughput (single concurrency) | huggingface.co β | 2026-06-09 | verified |
| MTP decoding speed | arxiv.org β | 2026-06-09 | verified |
| Training cutoff | β | β | unknown |
| OmniDocBench V1.5 | huggingface.co β | 2026-06-09 | verified |
| GLM-OCR technical paper published on arXiv | arxiv.org β | 2026-06-09 | verified |
| Does GLM-OCR handle handwritten text and stamps? | huggingface.co β | 2026-06-09 | to verify |
| Should I use the API directly or the GLM-OCR SDK for document parsing? | huggingface.co β | 2026-06-09 | to verify |
| Can GLM-OCR run locally, and what are the hardware requirements? | huggingface.co β | 2026-06-09 | to verify |