> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.empiriolabs.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.empiriolabs.ai/_mcp/server.

# LightOnOCR-3 4B

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

![LightOnOCR-3 4B](https://media.empiriolabs.ai/model-logos/lightonocr-3-4b.png)

[LightOn](/providers/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

| Field               | Value                                                                                                                     |
| ------------------- | ------------------------------------------------------------------------------------------------------------------------- |
| Model id            | `lightonocr-3-4b`                                                                                                         |
| Model release date  | 2026-10-08                                                                                                                |
| Input modalities    | Image, Document                                                                                                           |
| Output modalities   | Text                                                                                                                      |
| Context window      | -                                                                                                                         |
| Weight precision    | FP8                                                                                                                       |
| Features            | document_ocr, pdf_to_markdown, tables, charts_to_data, math, layout_and_reading_order, image_regions, headers_and_footers |
| Native inference    | Yes                                                                                                                       |
| New                 | Yes                                                                                                                       |
| Supported endpoints | `POST /v1/ocr`                                                                                                            |
| Alternate model ids | `lightonai/lightonocr-3-4b`                                                                                               |

## Pricing

| Charge       | Spec                                         | Rate   |
| ------------ | -------------------------------------------- | ------ |
| Document OCR | per 1,000 pages, minimum 5 pages per request | \$3.00 |

## Example request

```bash
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

| Parameter              | Type    | Required | Default | Description                                                                                                                     |
| ---------------------- | ------- | -------- | ------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `document`             | object  | yes      | -       | The PDF (document_url) or image (image_url) to read, as a public URL or a base64 data URI, up to 50 MB.                         |
| `pages`                | string  | no       | -       | 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_base64` | boolean | no       | false   | Return each image region on the page as a JPEG data URI.                                                                        |
| `table_format`         | enum    | no       | -       | Return each table separately in this format. Tables stay in the page Markdown as HTML when unset. · Allowed: `markdown`, `html` |
| `extract_header`       | boolean | no       | false   | Move the page header out of the Markdown into its own field.                                                                    |
| `extract_footer`       | boolean | no       | false   | Move the page footer out of the Markdown into its own field.                                                                    |
| `image_limit`          | integer | no       | -       | Return at most this many images for the whole document, the first ones first. · Min: 0                                          |
| `image_min_size`       | integer | no       | -       | Leave out image regions narrower or shorter than this many pixels. · Min: 0                                                     |
| `include_blocks`       | boolean | no       | true    | Include 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/&#123;job_id&#125;`. 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`.