返回模型列表
GLM OCR
zhipuzhipu/glm-ocr
媒体生成能力
ocr
- input_formats
- png
- jpg
- jpeg
API 使用指南
文档解析(PDF / 图片 → 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."
}
]
}
]
}'关键信息提取(→ 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" }
}'事实档案 — 本页每条断言可在此回溯来源
| 来源 | URL | 采集于 | |
|---|---|---|---|
| 发布日期 | huggingface.co ↗ | 2026-06-09 | 已核实 |
| 许可 | huggingface.co ↗ | 2026-06-09 | 已核实 |
| 参数总量 | arxiv.org ↗ | 2026-06-09 | 已核实 |
| 最低显存要求 | pasqualepillitteri.it ↗ | 2026-06-09 | 待核实 |
| PDF 吞吐(单并发) | huggingface.co ↗ | 2026-06-09 | 已核实 |
| 图片吞吐(单并发) | huggingface.co ↗ | 2026-06-09 | 已核实 |
| MTP 解码速度 | arxiv.org ↗ | 2026-06-09 | 已核实 |
| 训练数据截止 | — | — | 未知 |
| OmniDocBench V1.5 | huggingface.co ↗ | 2026-06-09 | 已核实 |
| GLM-OCR 技术报告发布于 arXiv | arxiv.org ↗ | 2026-06-09 | 已核实 |
| GLM-OCR 能处理手写文本和印章吗? | huggingface.co ↗ | 2026-06-09 | 待核实 |
| 文档解析应该直接调用 API 还是使用 GLM-OCR SDK? | huggingface.co ↗ | 2026-06-09 | 待核实 |
| GLM-OCR 可以在本地运行吗?硬件要求是什么? | huggingface.co ↗ | 2026-06-09 | 待核实 |