All models

Baidu

Unlimited-OCR

About

Unlimited-OCR is a 3B open-weight model from Baidu. Long-horizon document parsing with batched multi-page OCR. It accepts text, images, and documents. Context window is 32K. Released June 19, 2026.

  • Parameters

    3B

    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.

RatePrice
Input / 1M$0.25
Cached input / 1M$0.03
Output / 1M$0.55

Compare

Unlimited-OCR is one of the catalog's OCR models. The table is each model's published price, size, and context.

ModelWhat it doesPriceParametersContext
Unlimited-OCRLong-horizon document parsing with batched multi-page OCR.$0.25 / 1M input3B32K
PP-OCRv6PaddleOCR 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 input20M—
DeepSeek-OCR-2DeepSeek OCR 2 and markdown extraction.$0.25 / 1M input3.4B32K
dots.mocrMultilingual document layout parsing and markdown OCR.$0.20 / 1M input3B32K

Benchmarks

Published scores for Unlimited-OCR, from the Unlimited-OCR paper.

Evals
ReadingExample
QualitativeClear structure, grounded in the input
QuantitativeOmniDocBench v1.6: 93.92.
Cost and performanceLower listed rate, mid-pack latency

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_url part is a 400.

  • 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; multi_page reads the document through an 8-page sliding window.
  • Context window 32,768 tokens, with a maximum output of 24,576 tokens.
  • Aliases: baidu/Unlimited-OCR, unlimited-ocr.
  • Weights: baidu/Unlimited-OCR.

Methods

Methods this model serves. Payload shapes are in the docs.

MethodReturns
markdown (default)Reading-order Markdown, one <page> block per page
multi_pageContinuous plain text from an 8-page sliding window, no <page> blocks

Both methods return the Markdown-kind payload. multi_page reads an 8-page sliding window per model call by default. Set method_params.window_size to change the window size.

Text mode emits a bare payload string for one image, and one <document> block for a PDF. With markdown, the document contains one <page> block per page of Markdown. The model's own grounding markup is stripped before the reply, so a page reads like any other markdown-kind method. With multi_page, the <document> block carries continuous plain text with no <page> blocks. In JSON mode the reply is the flat document object, with top-level model and method and one record per page under pages. See Methods & Response Format.

Method parameters

ParameterDefaultDescription
window_size8multi_page only: pages read per model call as a sliding window over the document, up to the engine's ceiling of 40.
window_overlap1multi_page only: pages of the previous window re-read as context. Their output is dropped, not billed twice.
window_page_output_tokens1600multi_page only: expected Markdown tokens per page. Raise it for dense pages; the window shrinks to fit.
window_context_tokens32768multi_page only: the model context the window is sized against. Lower it only to leave headroom.

Estimate cost

Estimate. A page is 2,500 input tokens and 1,000 output tokens.

$1.18

Quick start

Call this model on the OpenAI-compatible gateway. The model id is already filled in.

from openai import OpenAI

client = OpenAI(
    base_url="https://gateway.vlm.run/v1/openai",
    api_key="<VLMRUN_API_KEY>",
)

response = client.chat.completions.create(
    model="baidu/unlimited-ocr",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "document_url",
                    "document_url": {
                        "url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/finance.sec-filings/tsla-8k.pdf"
                    },
                },
            ],
        }
    ],
    extra_body={"method": "markdown"},
)

print(response.choices[0].message.content)

To read a document in sliding windows, use multi_page and set window_size:

response = client.chat.completions.create(
    model="baidu/unlimited-ocr",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "document_url",
                    "document_url": {
                        "url": "https://storage.googleapis.com/vlm-data-public-prod/hub/examples/finance.sec-filings/tsla-8k.pdf"
                    },
                }
            ],
        }
    ],
    extra_body={
        "method": "multi_page",
        "method_params": {"window_size": 8},
    },
)

Response

With markdown, a PDF returns one <document> block with one <page> block per page:

tsla-8k.pdf5 pages

Page 0

UNITED STATES SECURITIES AND EXCHANGE COMMISSION

WASHINGTON, DC 20549

…

Title of each classTrading Symbol(s)…

…

A single image returns the payload string alone, with no wrapper. With multi_page, the <document> block carries continuous plain text with no <page> blocks.

Get an API key. Ship vision today.