OCRRouter

GLM-OCR vs Phi-4-multimodal

Pick GLM-OCR for high-volume PDF to Markdown, academic papers with formulas and schema-based field extraction from forms. It is much cheaper to call ($0.03 per million tokens) and is only 0.9B parameters. Pick Phi-4-multimodal for English document Q&A or pipelines that mix audio and images, and check GLM-OCR's table and repetition issues before trusting it on financial tables.

GLM-OCRzai/glm-ocrPhi-4-multimodalmicrosoft/phi-4-multimodal
TypeOpen sourceVision model
Price6 credits / page2 credits / page
Per 1,000 pages$6.00$2.00
Typical speed1.3 s / page2.5 s / page
Best forLow-cost general documentsSmall model for OCR and questions
InputsPDF, imagesimages
Languages100+ languagesEnglish for vision
Max pages per request500500
Tables✓ Yes✓ Yes
HandwritingNoNo
Math✓ Yes✓ Yes
Bounding boxes✓ YesNo
Confidence✓ YesNo
FormsNoNo
Multilingual✓ YesNo
On OCRRouterAvailableAvailable

Prices are what you pay on OCRRouter. Speed is the provider's typical figure, not a benchmark we ran.

Which to choose

Choose GLM-OCR if

  • Its API costs $0.03 per million tokens for input and output, and self-hosting is free apart from compute.
  • It can extract fields into a user-defined JSON schema, which suits forms, and it scores 94.62 on OmniDocBench v1.5 per its model card.
  • It runs on vLLM, SGLang, Ollama or transformers at 0.9B parameters, and the authors measured 1.86 PDF pages per second on a single replica.

Choose Phi-4-multimodal if

  • It scores 93.2 on DocVQA and 84.4 on OCRBench at 5.6B parameters, so it fits document question answering on modest GPUs.
  • It takes audio as well as images in one model, so mixed audio and image pipelines need only one model.
  • It has a 128K token context and an MIT licence, and it can run through Azure AI Foundry as well as self-hosted.

Key differences

GLM-OCRPhi-4-multimodal
Model size0.9B, with PP-DocLayout-V3 layout analysis and a GLM decoder5.6B, takes text, image and audio input
How you run itZ.ai API, or self-host with vLLM, SGLang, Ollama or transformersSelf-host, or use Azure AI Foundry
Price$0.03 per million tokens via Z.ai API; free self-hosted (you pay for compute)Free self-hosted (you pay for compute); Azure pricing not published
LicenceMIT for model weights; SDK repo and bundled PP-DocLayoutV3 are Apache-2.0MIT
Benchmarks (authors)OmniDocBench v1.5 94.62; olmOCR-Bench 75.2; ParseBench mean 29.6 (independent)DocVQA 93.2; OCRBench 84.4; ChartQA 81.4; InfoVQA 72.7
LanguagesNot publishedVision is English only; performance drops in non-English languages
Known failures and limitsRepeated output unless a stop sequence is set; drops table footer and summary rows; loses comma decimal separators; no aarch64 Linux; API caps of 100 pages, 50 MB per PDF and 10 MB per imageRepetitive or inconsistent output in long chats; eager attention needed on V100 and older GPUs; no coordinates or layout

Sources

What each one is

GLM-OCR

Small open-source OCR model from Z.ai with layout regions. MIT licensed.

GLM-OCR details

Phi-4-multimodal

Microsoft's 5.6B text, vision and audio model (February 2025). Scores 84.4 on OCRBench per its model card.

Phi-4-multimodal details

Try both on your own file

Run the file once with each model and compare the output.

PDF, PNG, JPG, WebP, HEIC. Up to 20 MB each, 10 files.No file?

Use one, fall back to the other

{"model": "zai/glm-ocr","fallbacks": ["microsoft/phi-4-multimodal"],"file_url": "https://example.com/document.pdf"}

Questions

More comparisons

GLM-OCR alternativesPhi-4-multimodal alternativesBest OCR models in 2026