DeepSeek
DeepSeek-OCR-2
About
DeepSeek-OCR-2 is a 3.4B open-weight model from DeepSeek. DeepSeek OCR 2 and markdown extraction. It accepts text, images, and documents. Context window is 32K. Released January 27, 2026.
Parameters
3.4B
Published parameter count.
Context window
32K
Tokens of context on a request.
License
MIT
License on the weights.
Pricing
Token rates are US dollars per 1M tokens. Image rates are per 1K images. Audio rates are per 1M audio seconds.
| Rate | Price |
|---|---|
| Input / 1M | $0.25 |
| Cached input / 1M | $0.25 |
| Output / 1M | $0.80 |
Compare
DeepSeek-OCR-2 is one of the catalog's OCR models. The table is each model's published price, size, and context.
| Model | What it does | Price | Parameters | Context |
|---|---|---|---|---|
| DeepSeek-OCR-2 | DeepSeek OCR 2 and markdown extraction. | $0.25 / 1M input | 3.4B | 32K |
| PP-OCRv6 | PaddleOCR PP-OCRv6 medium text detection and recognition; scene OCR JSONL on image chat; text returns plain text; document_url fan-out via text. | $0.02 / 1M input | 20M | — |
| dots.mocr | Multilingual document layout parsing and markdown OCR. | $0.20 / 1M input | 3B | 32K |
| GLM-OCR | Compact multilingual document OCR and markdown extraction. | $0.10 / 1M input | 0.9B | 8K |
Benchmarks
Published scores for DeepSeek-OCR-2, from the OmniDocBench leaderboard.
- OmniDocBench v1.690.25
- Formula CDM91.84
- Table TEDS83.89
| Reading | Example |
|---|---|
| Qualitative | Clear structure, grounded in the input |
| Quantitative | OmniDocBench v1.6: 90.25. |
| Cost and performance | Lower listed rate, mid-pack latency |
Performance
Latency is the end-to-end round trip. Throughput is completion tokens divided by that time. It is a request rate, not decode speed.
Latency
719 ms
Throughput
—
Requests
151
Supported inputs
- textIgnored
A text part beside the media is accepted and ignored. A request with no media part is a
400. - image_urlYes
One per request. A second
image_urlpart is a400. - video_urlNo
Not accepted.
- document_urlYes
One PDF, up to 128 pages, rasterized per page at
document_dpi(default 96). See Document Inputs.
- Default method
markdown. Three methods return the page as a string;grounding_ocrlocates a phrase and returns region boxes instead. - Context window 32,768 tokens, with a maximum output of 8,192 tokens.
- Weights:
deepseek-ai/DeepSeek-OCR-2. Aliases are listed below.
Methods
Methods this model serves. Payload shapes are in the docs.
| Method | Returns |
|---|---|
| markdown | Reading-order Markdown string (default) |
| ocr | Markdown via the grounded conversion prompt; grounding tags are stripped from the output |
| free_ocr | Free-form plain read of the page |
| grounding_ocr | Region items with bbox_xywh and the matched text |
Text mode emits the string alone for one image, and one <document> / <page> block per PDF page. In JSON mode an image content is the string, or the region container for grounding_ocr, and a document page content is always doc.page.blocks. See Methods & Response Format.
The model grounds on a fixed 0-1000 grid; the Gateway normalizes every box to 0-1 against the image or rasterized page, at precision decimals (default 4). Grounding regions carry bbox_xywh and text only: no polygon and no score.
Method parameters
| Parameter | Default | Description |
|---|---|---|
prompt | none | grounding_ocr only: the full grounding prompt, with the phrase to locate wrapped in the model's ref markers. See Grounding. |
Grounding
grounding_ocr answers "where does this appear on the page". Pass the full grounding prompt via method_params.prompt, with the phrase to locate wrapped in the model's ref markers:
The reply is the region container, alone in text mode and under content in JSON mode:
On a PDF each page's content is doc.page.blocks, with one block per located region carrying the same bbox_xywh and text.
Aliases
deepseek-ai/deepseek-ocr-2 (preferred), deepseek-ocr-2, and deepseek-ai/DeepSeek-OCR-2 all resolve to this model.
Estimate cost
Estimate. A page is 1,200 input tokens and 1,000 output tokens.
$1.10
Quick start
Call this model on the OpenAI-compatible gateway. The model id is already filled in.
Response
One <document> block per PDF, one <page> block per page, each carrying format="markdown":
Page 0
Annual Report 2024
Overview
The company reported revenue of $1.2M.
Page 1
| Metric | 2023 | 2024 |
| Revenue | 0.9M | 1.2M |
A single image returns the Markdown string alone, with no wrapper.
