# GLM-OCR

> Z.ai's GLM-OCR document model joins the catalog. It reads text, tables and formulas from page images and extracts typed fields. BYOK only.

- Date: 2026-11-30
- HTML: https://anyrouter.dev/blog/releases/glm-ocr

## Models

- `z-ai/glm-ocr` (GLM-OCR) — 0.9B open-weight document OCR model. Image in, text out, 8,192-token context. MIT license. BYOK.

## Notes

[`z-ai/glm-ocr`](https://anyrouter.dev/model/z-ai/glm-ocr) is Z.ai's 0.9B document OCR model. A CogViT visual encoder feeds a token-downsampling connector and a GLM-0.5B decoder. It parses text, tables and formulas from page images and supports strict JSON extraction for named fields.

The model card reports 94.62 on OmniDocBench V1.5 and 1.86 parsed PDF pages per second at one concurrency. Full-page parsing uses the vendor SDK with PP-DocLayoutV3 layout analysis; the model itself handles regions. The hosted route accepts an 8,192-token window and is **BYOK-only**: add your own key under [Dashboard → BYOK](https://anyrouter.dev/dashboard/byok).

```ts
import { createAnyRouter } from "@anyr/ai-sdk-provider"
import { generateText } from "ai"
const anyrouter = createAnyRouter()
const { text } = await generateText({
  model: anyrouter("z-ai/glm-ocr"),
  messages: [{ role: "user", content: [
    { type: "text", text: "Table Recognition:" },
    { type: "image", image: pageImage },
  ] }],
})
```

_Vision request._

```bash
curl -fsSL https://anyr.dev/cli.sh | bash
anyr login
anyr claude --model "z-ai/glm-ocr"
```

_Coding agent with vision._

Playbooks: [document parsing](https://anyrouter.dev/use-cases/ai-sdk), [vision models](https://anyrouter.dev/models).
