---
title: "DeepSeek-OCR 2 API hosted in the EU: documents to Markdown"
description: "Run DeepSeek-OCR 2 on inference.eu: a 3B open OCR model that turns scans and PDFs into Markdown, processed in EU data centres, not in China."
canonical: "https://inference.eu/models/deepseek-ocr-2/"
language: "en"
---

OCR and documents · DeepSeek

# Run DeepSeek-OCR 2 in the EU to turn documents into Markdown through an OpenAI-compatible API

DeepSeek-OCR 2 is a compact open model that reads document images and returns their text, usually as Markdown with headings, tables and layout preserved. It suits invoices, contracts, forms and scanned archives. On inference.eu you call it with the OpenAI request format, with your documents processed in EU data centres, never sent to China and never used for training.

[Contact sales](https://inference.eu/contact/)[Example request](#example)

1.  013B
2.  02EU data centres
3.  03Apache 2.0

## What DeepSeek-OCR 2 is

DeepSeek-OCR 2 was released by DeepSeek in January 2026 under the Apache 2.0 licence. It has about 3 billion parameters and pairs a new vision encoder, DeepEncoder V2, with a small mixture-of-experts language decoder. Its paper, titled Visual Causal Flow, describes an encoder that reorders visual information in a reading order closer to how people scan a page.

The model compresses each page into a small number of visual tokens: with dynamic resolution, between 256 and 1,120 tokens per page. That keeps processing cheap even for dense pages. DeepSeek reports a 3.73 percent improvement over the first DeepSeek-OCR on the OmniDocBench document parsing benchmark.

## What it does well, and where it falls short

DeepSeek-OCR 2 is built for document parsing: converting pages into structured Markdown with headings, lists and tables, or extracting plain text. It handles complex layouts such as multi-column pages and forms, and its small size makes it practical for large back-office archives where thousands of pages are processed every day.

It is a specialised model, not a general assistant. It reads and transcribes, but does not reason well about the content or answer open questions about it; pass its output to a chat model such as Qwen3.8 27B or DeepSeek V4 Flash for that. Handwriting, very low-quality scans and unusual scripts can reduce accuracy, so check results on samples of your own documents.

## Calling DeepSeek-OCR 2 through the API

inference.eu uses the OpenAI request format. Set the base URL to the inference.eu API, use your inference.eu key and set the model to `deepseek-ocr-2`. Send one page image per request as an `image_url` content part, with a short text prompt in the same message.

DeepSeek's model card shows two prompts: `Convert the document to markdown.` for structured output with layout, and `Free OCR.` for plain text. For PDFs, render each page to an image first and send pages in parallel. Store the Markdown result next to the original file, then embed it with bge-m3 or Qwen3 Embedding 8B to make the archive searchable.

## Data residency for DeepSeek-OCR 2

Documents sent to an OCR model are often the most sensitive files a company holds: identity documents, payslips, medical letters and signed contracts. On inference.eu, DeepSeek-OCR 2 runs on infrastructure in the European Union. Page images and extracted text are processed in EU data centres, are not sent to DeepSeek or to China, and are never used to train any model.

Every customer receives a data processing agreement under Article 28 of the GDPR and our subprocessor list, so your records of processing can name every party involved. Billing is in euros. The Apache 2.0 licence allows commercial use without user limits.

## DeepSeek-OCR 2

Maker

DeepSeek

Made in

China

Type

OCR and documents

Parameters

3B

Context window

8,192 tokens

Licence

[Apache 2.0](https://huggingface.co/deepseek-ai/DeepSeek-OCR-2/blob/main/LICENSE.txt)

Released

January 2026

Model ID

deepseek-ocr-2

Processing

EU data centres

Training on your data

Never

Source

[huggingface.co](https://huggingface.co/deepseek-ai/DeepSeek-OCR-2)

deepseek-ocr-2 · Python

```
import os
from openai import OpenAI

client = OpenAI(base_url="https://api.inference.eu/v1", api_key=os.environ["INFERENCE_EU_API_KEY"])

response = client.chat.completions.create(
    model="deepseek-ocr-2",
    messages=[{"role": "user", "content": "Summarise this contract in five bullet points."}],
)
print(response.choices[0].message.content)
```

## What teams use it for

-   1

    ### Invoice and receipt capture

    Extract supplier, amounts and line items from scanned invoices before posting them to accounting.

-   2

    ### Digitising paper archives

    Turn scanned contracts, letters and reports into searchable Markdown for document management and RAG.

-   3

    ### Forms and applications

    Read filled-in forms in insurance, banking or public administration and pass the text to validation steps.

## DeepSeek-OCR 2: common questions

The questions buyers, developers and legal teams ask us most. Something missing? Ask us directly.

Compliance depends on how you process data. On inference.eu, page images and extracted text are processed in EU data centres, not used for training and covered by a data processing agreement under Article 28 GDPR with a published subprocessor list. Nothing is sent to DeepSeek or to China.

Using DeepSeek's own app or API sends data to China. DeepSeek-OCR 2 is different: its weights are open, and on inference.eu it runs in EU data centres, so your documents never reach DeepSeek's servers. The model only transcribes text, which limits concerns about generated content.

With the prompt \`Convert the document to markdown.\` it returns Markdown with headings, lists and tables. With \`Free OCR.\` it returns plain text without layout. Markdown is usually best when the output feeds a search index, a RAG system or a chat model.

It reads images, so convert each PDF page to an image before sending it, for example at around 150 to 200 DPI. Send pages as separate requests in parallel and join the Markdown afterwards. Digital PDFs with a text layer may not need OCR at all.

Yes. DeepSeek-OCR 2 is released under the Apache 2.0 licence, which allows commercial use, modification and redistribution without fees or user limits. You can use it in paid products and internal document workflows without an agreement with DeepSeek.

DeepSeek lists the model as multilingual. It reads Latin-script European languages such as German and French, along with English and Chinese. DeepSeek does not publish a full language list, so test accuracy on documents in each language you need.

DeepSeek-OCR 2 replaces the encoder with DeepEncoder V2, which follows a more natural reading order on complex pages. DeepSeek reports a 3.73 percent gain on OmniDocBench. For new projects it is the version to use.

DeepSeek-OCR 2 is designed mainly for printed documents. Clear handwriting may be read, but accuracy drops for cursive, faint or messy writing. If handwritten forms matter to you, test a representative sample and keep a manual review step for low-confidence pages.

Use DeepSeek-OCR 2 when you need faithful transcription of many pages at low cost. Use a vision chat model such as Qwen3.8 27B when you need to ask questions about a page or pull specific fields with reasoning. Many pipelines use both in sequence.

Create an OpenAI client with the inference.eu base URL and your key, then call \`chat.completions.create\` with \`model\` set to \`deepseek-ocr-2\` and a user message containing the page as \`image\_url\` and the text \`Convert the document to markdown.\`

[Ask a question](https://inference.eu/contact/)

## Related

[All models](https://inference.eu/models/#directory)

-   [Qwen3.8 27BRun Qwen3.8 27B on inference.eu: a dense open model with image and video input, adjustable reasoning and 256K context, OpenAI-compatible, processed in the EU.Reasoning](https://inference.eu/models/qwen3-8-27b/)
-   [DeepSeek V4 FlashRun DeepSeek V4 Flash (0731) on inference.eu: a 1M-token open reasoning model behind an OpenAI-compatible API, processed in EU data centres, not in China.Reasoning](https://inference.eu/models/deepseek-v4-flash/)
-   [BGE-M3Run bge-m3 on inference.eu: a compact multilingual embedding model for search and RAG, 100+ languages and 8192-token inputs, processed in the EU.Embeddings](https://inference.eu/models/bge-m3/)

## Move your AI workloads to EU infrastructure

Tell us which models you use and roughly how much traffic you have. We reply within one working day with pricing and next steps.

-   Reply within one working day
-   Pricing for your volume
-   DPA ready to sign
