HuggingFace has launched VLM Run Gateway, an OpenAI-compatible API designed to streamline the use of open-weight OCR and visual language models (VLMs) for document processing. The tool allows users to switch between multiple open-weight OCR models, such as DeepSeek-OCR-2, GLM-OCR, and dots.mocr, with minimal effort. By integrating these models into a single endpoint, the Gateway simplifies tasks like document parsing, layout analysis, and OCR, reducing costs and complexity for developers and teams. The platform also supports JSON mode for structured output and provides a cost-efficient parsing solution for long-form documents. This initiative aims to address the challenges of selecting the right model for specific use cases, such as healthcare forms, construction drawings, and legal contracts, where accuracy requirements vary. Source: huggingface
The Gateway supports a range of open-weight OCR models, including PP-OCRv6 (22M), GLM-OCR (0.9B), dots.mocr (3B), and DeepSeek-OCR-2 (3B), allowing users to compare performance and costs across different models. According to HuggingFace, using these models can be significantly cheaper than relying on frontier VLMs, with costs often 10 times lower at production scale. The platform also includes a Model Catalog that enables users to run the same documents through multiple models and compare exact costs using the 'usage.cost' metric. This feature empowers teams to evaluate and optimize their document processing workflows effectively. Source: huggingface
HuggingFace emphasized that while frontier VLMs remain suitable for open-ended reasoning tasks, open-weight OCR models are better suited for structured tasks like extraction, layout analysis, and parsing. The Gateway handles document orchestration by rasterizing PDFs, distributing pages across workers, preserving page order, and streaming completed pages. It also includes features like retrying failed pages and isolating out-of-memory errors. Additionally, the platform supports an MCP (Model Control Protocol) server, enabling clients like Claude Code and Codex to consume visual content natively. HuggingFace encourages users to test the Gateway with their own documents to validate outputs and compare costs. Source: huggingface