Skip to navigation

LightOnOCR-3 4B

LightOnOCR-3 4B
LightOn · Document OCR
POST /v1/ocr

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

At a glance

FieldValue
Model idlightonocr-3-4b
Model release date2026-10-08
Input modalitiesImage, Document
Output modalitiesText
Context window-
Weight precisionFP8
Featuresdocument_ocr, pdf_to_markdown, tables, charts_to_data, math, layout_and_reading_order, image_regions, headers_and_footers
Native inferenceYes
NewYes
Supported endpointsPOST /v1/ocr
Alternate model idslightonai/lightonocr-3-4b

Pricing

ChargeSpecRate
Document OCRper 1,000 pages, minimum 5 pages per request$3.00

Example request

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://example.com/report.pdf"}}'

Parameters

ParameterTypeRequiredDefaultDescription
documentobjectyes-The PDF (document_url) or image (image_url) to read, as a public URL or a base64 data URI, up to 50 MB.
pagesstringno-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_base64booleannofalseReturn each image region on the page as a JPEG data URI.
table_formatenumno-Return each table separately in this format. Tables stay in the page Markdown as HTML when unset. · Allowed: markdown, html
extract_headerbooleannofalseMove the page header out of the Markdown into its own field.
extract_footerbooleannofalseMove the page footer out of the Markdown into its own field.
image_limitintegerno-Return at most this many images for the whole document, the first ones first. · Min: 0
image_min_sizeintegerno-Leave out image regions narrower or shorter than this many pixels. · Min: 0
include_blocksbooleannotrueInclude every region of each page in reading order, with its type, position and content.

Notes

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.

Machine-readable schema: GET https://api.empiriolabs.ai/v1/models/lightonocr-3-4b.