# DeepSeek OCR

Turns document images into markdown with layout preserved. DeepSeek OCR model for document-to-markdown conversion. Served on GraphN managed inference behind an OpenAI-compatible API as `deepseek-ocr`.

## Overview

DeepSeek-OCR is a roughly 3B vision-language model from DeepSeek's "Contexts Optical Compression" work, aimed at reading document images. A grounding prompt makes it emit markdown that keeps the page's structure. The checkpoint defines several resolution modes (Tiny through Large, plus a tiled Gundam mode); this deployment runs one fixed mode, and the mode is not selectable per request.

## Strengths

- Markdown output with layout grounding
- MIT licensed

## Use cases

- PDF and scan to markdown conversion
- Reading dense multi-column pages

## Good to know

A conversion utility rather than an assistant -- it is deliberately kept out of the agent and chat model pickers.

## Specifications

- **Type**: OCR
- **Parameters**: ~3B
- **License**: MIT
- **Family**: DeepSeek-OCR
- **Weights**: deepseek-ai/DeepSeek-OCR
- **Pricing**: Input $0.10/1M · Output $0.30/1M

## API access

### curl

```bash
# OCR models are called through the
# platform APIs and workflows; list what is deployed:
curl https://model.graphn.ai/v1/models \
  -H "Authorization: Bearer $GRAPHN_API_KEY"
```

### CLI

```bash
graphn model get deepseek-ocr
```

### Function SDK

```python
@function
async def read_document(image_url: str) -> str:
    return await vision.extract_text(image_url)
```

[Start free](https://graphn.ai/signup?next=%2Fplayground%3Fmodel%3Ddeepseek-ocr)

[Model card](https://huggingface.co/deepseek-ai/DeepSeek-OCR) · [Managed inference](https://graphn.ai/) · [Pricing](https://graphn.ai/pricing) · [Inference quickstart](https://graphn.ai/docs/inference-quickstart)
