Cleanse Dark Data for the AI Age
View on GitHubIlios (แผผฮปฮนฮฟฯ), ancient Greek for "to cleanse", is a high-performance document-to-markdown conversion API that unlocks dark data trapped in documents.
Most organizational data sits inaccessible in PDFs, images, and legacy formats โ invisible to modern AI systems. Before you can leverage vector databases, knowledge graphs, or RAG systems, your documents must be transformed into clean, structured markdown suitable for embeddings and ontological analysis.
Ilios v2 solves this with a fully local, zero-data-retention pipeline: documents are converted entirely in-memory by anydoc, a pure-Rust engine (~4ms median per document). No files are stored, no content is persisted, and no bytes ever leave your server โ all on the Bun runtime with native APIs.
| v1 (Mistral + S3) | v2 (Local Engine) | |
|---|---|---|
| Conversion | Mistral OCR API (network) | anydoc local Rust engine (in-process) |
| p50 latency | ~6.1 s | ~40 ms (150x faster) |
| Data retention | Content in DB + originals in S3 | None โ nothing stored |
| Third-party data sharing | Files uploaded to Mistral | None โ bytes never leave the process |
| Per-page cost | $0.01/page | $0.00 |
| Storage | S3 (Tigris) + SQLite content blobs | In-memory only; ephemeral cache wiped per request |
| Database | SQLite/Turso with documents, batches, job queue | Pure Bun SQLite โ anonymous usage analytics only |
| Processing model | Async worker threads polling a queue | Synchronous in-process (faster than dispatch) |
| API framework | Hono | oRPC with generated OpenAPI |
| Scanned/image PDFs | Supported via OCR | Rejected (HTTP 415) โ by design, zero retention |
/docsDeploy your own Ilios instance in under 60 seconds:
git clone https://github.com/tobalo/ilios.git
cd ilios
bun install
bun run db:push
bun run dev
Configure environment variables in .env based on .env.example.
The API will be available at http://localhost:1337.
Modern AI infrastructure demands clean, structured data. Yet 80% of enterprise data remains trapped in unstructured formats โ PDFs, scanned documents, legacy archives.
Before you can:
...you must first cleanse your documents into machine-readable formats.
1. Document Ingestion โ Upload PDFs, Office docs, OpenDocument files, e-books, spreadsheets, or legacy formats
2. Local Conversion โ anydoc parses bytes in-memory (~4ms) โ nothing touches disk
3. Markdown Output โ Clean GitHub-Flavored Markdown returned directly in the response
4. Ephemeral Wipe โ Request completes; no content retained anywhere
5. Vector Pipeline โ Feed to embedding models, chunk for RAG, or enrich for knowledge graphs
Powered by the anydoc engine, Ilios converts a wide range of document formats entirely locally and in-memory. Format detection is content-based (magic-byte signatures) with filename-extension fallback, so mislabeled files still convert correctly.
| Category | Formats |
|---|---|
pdf (text-based) | |
| Word Processing | docx, docm, doc, odt, rtf |
| Presentations | pptx, ppt, ppsx, odp |
| Spreadsheets | xlsx, xlsm, xls, ods, csv |
| E-Books | epub |
Note: Image-only/scanned PDFs and image files require OCR and are rejected (HTTP 415) by design โ the local engine performs no network OCR, keeping zero data retention intact.
API key authentication is optional but strongly recommended for production.
When enabled via the API_KEY environment variable, all endpoints require authentication except
public paths (/health, /docs, /openapi.json).
Include your API key in the Authorization header with Bearer scheme:
Authorization: Bearer YOUR_API_KEY
Set multiple API keys (comma-separated) to support different teams or clients with isolated usage tracking:
API_KEY=team-alpha-key,team-beta-key,admin-master-key
Each key's operations are tracked independently in the database for billing and auditing. Usage endpoints automatically filter results to the authenticated key.
Ilios v2 exposes a single synchronous conversion endpoint โ no queues, no status polling, no storage:
POST /v1/convert
Synchronous in-memory conversion via the local anydoc engine. Returns JSON with markdown content and metadata in milliseconds. Zero data retention โ content is never stored. Supports files up to 1GB (staged through an ephemeral cache that is wiped immediately). Accepts PDF, Word, PowerPoint, Excel, OpenDocument, RTF, EPUB, CSV, and more โ see Supported Formats.
GET /api/usage/summary
Anonymous usage analytics: request counts, pages processed, bytes converted, and average processing time โ filtered to your API key.
GET /api/usage/breakdown
Per-operation breakdown of conversion volume, latency, and cost.
GET /health
Service health including database connectivity and engine status. No authentication required.
curl -X POST https://ilios.sh/v1/convert \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "[email protected]"
{
"id": "a54d311a-68ad-4641-a8c1-a84e3e1dd170",
"content": "| name | role |\n| --- | --- |\n...",
"metadata": {
"model": "anydoc-local",
"engine": "anydoc",
"processingTimeMs": 5,
"extractedPages": 38,
"fileName": "data.csv",
"fileSize": 102400
},
"retention": "none"
}
Note: v1's async endpoints (/api/documents/*, /v1/batch/*)
were removed in v2 โ they required server-side document storage, which is incompatible with
zero-data retention. For bulk workloads, convert files in parallel against /v1/convert;
at ~40ms per document, batching is unnecessary.
v2 benchmark results: local anydoc engine and full HTTP endpoint (concurrent x5) across small/medium/large documents in CSV, RTF, DOCX, and PDF formats. For reference, the v1 Mistral-based pipeline measured p50 โ 6.1s on the same endpoint.
Full results โ latency percentiles, throughput, per-document breakdowns, and size analysis โ are available on the dedicated benchmarks page.