返回模型列表

GLM OCR

zhipuzhipu/glm-ocr

媒体生成能力

ocr
input_formats
  • png
  • jpg
  • jpeg
  • pdf

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.5huggingface.co ↗2026-06-09已核实
GLM-OCR 技术报告发布于 arXivarxiv.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待核实
帮助与联系