LightOnOCR-3 4B API

Document OCR that reads PDFs and images into structured Markdown, page by page, with tables, math, charts, image regions, and layout.

LightOnDocument OCRReleased Oct 8, 2026Native InferenceNew

About LightOnOCR-3 4B

Document OCR that reads PDFs and images into structured Markdown, page by page, with tables, math, charts, image regions, and layout.

Also known as LightOnOCR-3-4B

document ocrpdf to markdowntablescharts to datamathlayout and reading orderimage regionsheaders and footers

LightOnOCR-3 4B specs

Model ID
lightonocr-3-4b
Author
LightOn
Category
Document OCR
Released
Oct 8, 2026
Input
ImageDocument
Output
Markdown
Endpoints
POST/v1/ocr
Alternate model IDs
lightonai/lightonocr-3-4b

LightOnOCR-3 4B API pricing

Live pay-as-you-go rates from the EmpirioLabs catalog. You are billed only for what you use, with no monthly minimum.

Type
Spec
Rate
Document OCR
per 1,000 pages, minimum 5 pages per request
$3.00
Compare on the full pricing page

How to call the LightOnOCR-3 4B API

LightOnOCR-3 4B reads PDFs and images through POST /v1/ocr and returns each page as Markdown. Send the PDF's URL in document with the model id lightonocr-3-4b, and list zero-based page numbers in pages to process only those pages. An image works the same way with {"type": "image_url", "image_url": "https://..."}, and either URL can be a base64 data URI. The response lists each page in pages with its index, markdown, images, tables, and dimensions; usage_info.pages_processed counts the pages processed. A request still running after a few minutes returns a job_id to poll at GET /v1/jobs/{job_id}, and a Prefer: respond-async header asks for the job id at once. Get an API key from the EmpirioLabs dashboard.

cURL
curl https://api.empiriolabs.ai/v1/ocr \
  -H "Authorization: Bearer $EMPIRIOLABS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "lightonocr-3-4b",
    "document": {
      "type": "document_url",
      "document_url": "https://arxiv.org/pdf/2412.13663"
    },
    "pages": [0, 1],
    "include_image_base64": false
  }'
Python
import requests

response = requests.post(
    "https://api.empiriolabs.ai/v1/ocr",
    headers={"Authorization": "Bearer YOUR_EMPIRIOLABS_API_KEY"},
    json={
        "model": "lightonocr-3-4b",
        "document": {
            "type": "document_url",
            "document_url": "https://arxiv.org/pdf/2412.13663",
        },
        "pages": [0, 1],
        "include_image_base64": False,
    },
)
result = response.json()
for page in result["pages"]:  # index, markdown, images, tables, dimensions
    print(page["index"], page["markdown"][:200])
print(result["usage_info"]["pages_processed"])
Full LightOnOCR-3 4B API reference

LightOnOCR-3 4B API parameters

Request parameters supported by the LightOnOCR-3 4B API on EmpirioLabs. Defaults apply when a field is omitted.

ParameterTypeDefaultRange / valuesDescription
documentobject--The PDF (document_url) or image (image_url) to read, as a public URL or a base64 data URI, up to 50 MB.
pagesstring--Zero-based pages to read, as a list such as [0, 2] or a string such as 0,2-4. Every page when empty, up to 1,000.
include_image_base64booleanfalse-Return each image region on the page as a JPEG data URI.
table_formatenum-markdown, htmlReturn each table separately in this format. Tables stay in the page Markdown as HTML when unset.
extract_headerbooleanfalse-Move the page header out of the Markdown into its own field.
extract_footerbooleanfalse-Move the page footer out of the Markdown into its own field.
image_limitinteger-min 0Return at most this many images for the whole document, the first ones first.
image_min_sizeinteger-min 0Leave out image regions narrower or shorter than this many pixels.
include_blocksbooleantrue-Include every region of each page in reading order, with its type, position and content.

Good to know

Reads PDFs and images into Markdown, page by page: text in reading order, headings, lists, tables, math, captions, and charts with their data points as a table.

Input

  • One PDF or image per request: PDF, PNG, JPEG, WebP, TIFF, BMP, GIF or AVIF, up to 50 MB, as a public URL or a base64 data URI.
  • Up to 1,000 pages per request. Choose pages with pages, zero-based, as a list such as [0, 2] or a string such as 0,2-4.
  • Structured annotation fields are not supported.

Output

  • Each page as Markdown, with the position of every image region and the page's layout blocks in reading order.
  • include_image_base64 returns each image region as a JPEG data URI.
  • table_format set to markdown or html returns each table separately; otherwise tables stay in the Markdown as HTML.
  • extract_header and extract_footer move headers and footers out of the Markdown into their own fields.

Long documents

  • A request still running after about four and a half minutes returns a job id to poll at GET /v1/jobs/{job_id}. Send Prefer: respond-async to get it at once.

Billing

  • Billed per page read, with a minimum of 5 pages per request. A failed request is not billed for pages it did not return.

Weights

  • FP8.

LightOnOCR-3 4B API: common questions

How much does the LightOnOCR-3 4B API cost?

On EmpirioLabs, LightOnOCR-3 4B is billed pay as you go: Document OCR $3.00 per 1,000 pages, minimum 5 pages per request. The live rate card on this page always matches what the API charges.

Which endpoint does LightOnOCR-3 4B use?

LightOnOCR-3 4B is served through POST /v1/ocr on api.empiriolabs.ai with standard bearer-token authentication.

Can I try LightOnOCR-3 4B in the browser before integrating?

Yes. The EmpirioLabs playground runs LightOnOCR-3 4B in the browser with the same parameters the API exposes, so you can test prompts before writing code.

How do I get a LightOnOCR-3 4B API key?

Create an EmpirioLabs account, then generate a key under API Keys in the dashboard. Billing is pay-as-you-go credits, so you only pay for the requests you make.

Ready to use better endpoints?

Check out our pricing or reach out if you want your own model deployed on our stack.