dots.ocr
An open-weight multilingual document parsing vision-language model by Xiaohongshu's rednote-hilab built on a 1.7B LLM backbone, unifying layout detection, reading-order recovery, and table-formula OCR in a single pass.
What you can do
- Scanned complex layout parsing
- Academic two-column and formula OCR
- Multilingual financial table extraction
Input & output
- Input
- Scanned document pages, PDF page images, tables, or formulas paired with parsing task prompts
- Output
- Structured Markdown, HTML/LaTeX tables and formulas, and JSON layout bounding boxes in reading order
Try a prompt like this
Parse all layout elements from this scanned two-column academic page image in correct reading order, outputting bounding boxes, category labels, LaTeX formulas, and HTML tables in JSON format.
Things to know
Total footprint (~1.7B LLM + ~1.2B vision encoder) requires ~7GB–8GB VRAM in BF16 and `trust_remote_code=True` (supported natively in vLLM); MIT licensed, though ultra-dense blurred handwriting still warrants human verification.
All listed models publish open weights for self-hosted deployment; check each repository's license before commercial use.
Call it through the API
The platform exposes an OpenAI-compatible API. Use an official SDK or any HTTP client, then set the gateway URL, API key, and model ID.
- Endpoint
POST/v1/chat/completions- Model repo ID
rednote-hilab/dots.ocr
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["API_BASE_URL"],
api_key=os.environ["API_KEY"],
)
response = client.chat.completions.create(
model="rednote-hilab/dots.ocr",
messages=[{"role": "user", "content": "Parse all layout elements from this scanned two-column academic page image in correct reading order, outputting bounding boxes, category labels, LaTeX formulas, and HTML tables in JSON format."}],
)
print(response.choices[0].message.content)Before running a sample, set the API_BASE_URL (gateway URL) and API_KEY environment variables.
Read the full API guide