Skip to content
Regolo Logo

DeepSeek-OCR-2

DeepSeek‑OCR‑2 is a 3B‑parameter, Apache‑2.0 vision–language model with DeepEncoder V2, delivering SOTA document OCR and layout understanding using up to 20× fewer tokens and supporting industrial‑scale PDF ingestion.
Core Model
OCR

Get Started

pip install requestsCode language: Bash (bash)
import requests


api_url = "https://api.regolo.ai/v1/chat/completions"
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer YOUR_REGOLO_KEY"
}
data = {
  "model": "deepseek-ocr-2",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "Free OCR."
        },
        {
          "type": "image_url",
          "image_url": {
            "url": "https://jeroen.github.io/images/bowers.jpg"
          }
        }
      ]
    }
  ],
  "skip_special_tokens": false
}

response = requests.post(api_url, headers=headers, json=data)
print(response.json())Code language: Python (python)

Output

{
  "id": "chatcmpl-82da8b967457e3ae",
  "created": 1773771452,
  "model": "deepseek-ocr-2",
  "object": "chat.completion",
  "choices": [
    {
      "finish_reason": "stop",
      "index": 0,
      "message": {
        "content": "# The Life and Work of  \nFredson Bowers  \n\nby  \nG. THOMAS TANSELLE  \n\n---\n\nIn every field of endeavor there are a few figures whose accomplishment and influence cause them to be the symbols of their age; their careers and oeuvres become the touchstones by which the field is measured and its history told. In the related pursuits of analytical and descriptive bibliography, textual criticism, and scholarly editing, Fredson Bowers was such a figure, dominating the four decades after 1949, when his *Principles of Bibliographical Description* was published. By 1973 the period was already being called “the age of Bowers”: in that year Norman Sanders, writing the chapter on textual scholarship for Stanley Wells’s *Shakespeare: Select Bibliographies*, gave this title to a section of his essay. For most people, it would be achievement enough to rise to such a position in a field as complex as Shakespearean textual studies; but Bowers played an equally important role in other areas. Editors of nineteenth-century American authors, for example, would also have to call the recent past “the age of Bowers,” as would the writers of descriptive bibliographies of authors and presses. His ubiquity in the broad field of bibliographical and textual study, his seemingly complete possession of it, distinguished him from his illustrious predecessors and made him the personification of bibliographical scholarship in his time.  \n\nWhen in 1969 Bowers was awarded the Gold Medal of the Bibliographical Society in London, John Carter’s citation referred to the *Principles* as “majestic,” called Bowers’s current projects “formidable,” said that he had “imposed critical discipline” on the texts of several authors, described *Studies in Bibliography* as a “great and continuing achievement,” and included among his characteristics “uncompromising seriousness of purpose” and “professional intensity.” Bowers was not unaccustomed to such encomia, but he had also experienced his share of attacks: his scholarly positions were not universally popular, and he expressed them with an aggressiveness that almost seemed calculated to",
        "role": "assistant"
      }
    }
  ],
  "usage": {
    "completion_tokens": 427,
    "prompt_tokens": 1126,
    "total_tokens": 1553
  }
}Code language: JSON / JSON with Comments (json)

Applications & Use Cases

  • Privacy‑sensitive enterprise workflows where an open, Apache‑licensed OCR model can be deployed on‑premises without proprietary dependencies.
  • High‑fidelity OCR for complex documents on OmniDocBench‑style workloads, including tables, multi-column layouts, charts, and formulas.
  • Large‑scale document ingestion pipelines that process up to ~200k pages per day per A100 GPU thanks to vision-token compression and dynamic resolution.
  • Markdown, HTML, or JSON structured extraction from PDFs and images using prompts like “Convert the document to markdown” via the built‑in infer API.
  • Domain‑specific OCR models fine‑tuned with Unsloth, achieving 57–86% character error rate reductions on challenging languages such as Persian.