> ## Documentation Index
> Fetch the complete documentation index at: https://documentation.datalab.to/llms.txt
> Use this file to discover all available pages before exploring further.

# API

> Our on-prem container's API mimics Datalab's API.

Our cloud-hosted API documentation can be found [here](https://documentation.datalab.to/docs/welcome/api). With caveats and exceptions detailed below, the container image shares the same API.

# Supported endpoints

The container currently supports:

* `/api/v1/convert` (and the legacy alias `/api/v1/marker`) — document conversion to markdown, HTML, JSON, or chunks. Uses both the Marker and Chandra models.
* `/api/v1/ocr` documented [here](https://documentation.datalab.to/docs/welcome/api#ocr).
* `/api/v1/extract` — structured extraction via JSON schema. Supports `fast` and `turbo` extraction modes. Requires the Chandra model with the Lift model enabled; `balanced` mode is not available on-prem.
* `/api/v1/usage` documented [here](/docs/on-prem/usage-analytics) — provides usage analytics and performance metrics for your on-prem deployment.

## Chandra-specific parameters

The following parameters are available on `/api/v1/convert` when running a Chandra-mode container (v1.5.0+):

| Parameter             | Type   | Description                                                                                                                                                                                                                                                     |
| --------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `exclude_block_types` | string | Comma-separated list of block type names to remove from the output (e.g., `Footnote,PageFooter`). Applied before rendering, so the filtered blocks are absent from all output formats (markdown, html, json, chunks). Invalid block type names return HTTP 400. |

Example — strip page headers and footers from output:

```bash theme={null}
curl -X POST http://localhost:8000/api/v1/convert \
  -F "file=@document.pdf" \
  -F "exclude_block_types=PageHeader,PageFooter"
```

<Note>
  `exclude_block_types` is available on Chandra-mode containers (v1.5.0+) only. Marker-mode containers do not support this parameter.
</Note>

# Authentication

API authentication is not supported in the container. We assume customers will be running our image on their own infrastructure in private networks.

You may send the `X-API-Key` header detailed [here](https://documentation.datalab.to/docs/welcome/api#authentication), but it will be ignored and any value works.

# PDFs and images are supported, document conversion not yet supported

Datalab's API supports [many file types](https://documentation.datalab.to/docs/common/supportedfiletypes).

The container currently supports PDFs and image file types. Other file types are not yet supported, but will be supported in an upcoming release.

## Feature Parity

| Feature                                       | Cloud API | On-Premises                                                                              |
| --------------------------------------------- | --------- | ---------------------------------------------------------------------------------------- |
| Document conversion (`/marker`)               | Yes       | Yes                                                                                      |
| OCR (`/ocr`)                                  | Yes       | Yes                                                                                      |
| Output formats (markdown, html, json, chunks) | Yes       | Yes                                                                                      |
| Parse quality scoring                         | Yes       | Yes                                                                                      |
| Chart understanding                           | Yes       | Yes (Chandra containers only)                                                            |
| Page range selection                          | Yes       | Yes                                                                                      |
| Block IDs                                     | Yes       | Yes                                                                                      |
| Token-efficient markdown                      | Yes       | Yes                                                                                      |
| Form filling (`/fill`)                        | Yes       | **No**                                                                                   |
| Create document (`/create-document`)          | Yes       | **No**                                                                                   |
| Thumbnails                                    | Yes       | **No**                                                                                   |
| Accurate mode                                 | Yes       | **No**                                                                                   |
| Fast mode                                     | Yes       | **No**                                                                                   |
| Link extraction                               | Yes       | **No**                                                                                   |
| Checkpoints                                   | Yes       | **No**                                                                                   |
| File URL download                             | Yes       | **No**                                                                                   |
| Structured extraction (`/extract`)            | Yes       | Yes — `fast` and `turbo` modes only (requires Lift model); `balanced` mode not available |
| Document segmentation                         | Yes       | **No**                                                                                   |
| `exclude_block_types` parameter               | **No**    | Yes — Chandra containers v1.5.0+ only                                                    |

<Info>
  On-premises containers do not require API key authentication. Implement access control at the network or reverse proxy level.
</Info>

## Next Steps

<CardGroup cols={2}>
  <Card title="Usage Analytics" icon="chart-line" href="/docs/on-prem/usage-analytics">
    Monitor request volumes, performance metrics, and system status.
  </Card>

  <Card title="Running the Container" icon="server" href="/docs/on-prem/running-the-container">
    Get the on-prem container up and running in minutes.
  </Card>

  <Card title="Cloud API Reference" icon="book" href="/docs/welcome/api">
    Full REST API reference that the on-prem container mirrors.
  </Card>

  <Card title="On-Prem Overview" icon="building" href="/docs/on-prem/overview">
    Compare open-source and paid on-prem options.
  </Card>
</CardGroup>
