# Docs

> mdworker converts HTML, DOCX, PDF, PPTX and XLSX files to clean Markdown over one HTTP request, with OCR for scans and pictures, billed in credits per page.

mdworker is an HTTP API that turns documents into Markdown. Send a file to `POST /v1/convert` with an API key and get Markdown back: headings, lists, tables and links come from the file itself, and an OCR model reads scans and pictures. You pay credits for the pages converted and nothing when a conversion fails.

- Base URL: `https://api.md.tlelabs.com`
- Formats: PDF, DOCX, PPTX, XLSX, HTML, detected from the file’s bytes.
- Price: 1 credit per page read from the file, 3 credits per OCR page with `ocr_model=auto`.
- Files up to 50 MB. Service health: [status.md.tlelabs.com](https://status.md.tlelabs.com/).

## Start here

- [Quickstart](https://md.tlelabs.com/docs/quickstart/): create a key and convert your first file.
- [Authentication](https://md.tlelabs.com/docs/authentication/): API keys, rotation and the one 401.

## API reference

- [Convert a file](https://md.tlelabs.com/docs/convert/): `POST /v1/convert`, its options and both response types.
- [Quote before converting](https://md.tlelabs.com/docs/quote/): `POST /v1/quote`, the price of up to 10 files without converting them.
- [Wallet](https://md.tlelabs.com/docs/wallet/): `GET /v1/wallet` and `GET /v1/wallet/transactions`.
- [Health and status](https://md.tlelabs.com/docs/health-and-status/): `GET /v1/health` and the public status page.

## Concepts

- [OCR models](https://md.tlelabs.com/docs/ocr-models/): `ocr_model`, the `auto` chains and the price of each model.
- [Formats, pages and pricing](https://md.tlelabs.com/docs/formats-and-pricing/): what is extracted, how pages are counted, limits.
- [Errors](https://md.tlelabs.com/docs/errors/): the error format and every error code.
- [Rate limits](https://md.tlelabs.com/docs/rate-limits/): concurrent conversions and retries.

These pages are also available as Markdown for tools and language models: add `.md` to a page URL (for example [`/docs/convert.md`](https://md.tlelabs.com/docs/convert.md)), or read [`/llms.txt`](https://md.tlelabs.com/llms.txt) and [`/llms-full.txt`](https://md.tlelabs.com/llms-full.txt).
