No description
- Python 96%
- Dockerfile 4%
| .forgejo/workflows | ||
| .vscode | ||
| app | ||
| tests | ||
| .gitignore | ||
| .python-version | ||
| docker-compose.yml | ||
| Dockerfile | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
docs-api
A documents management and extraction API.
PDFs are processed with PyMuPDF4LLM; all other formats are handled by Pandoc.
Requirements
- Python 3.13+
- uv
Running
uv sync
uv run fastapi dev app/main.py
Endpoints
GET /
Health check. Returns a description string.
POST /extract/
Converts a remote document to Markdown.
Request body (application/json):
| Field | Type | Description |
|---|---|---|
file_url |
string |
Publicly accessible URL to a file. |
Response: text/markdown with the extracted content.
Example:
curl -X POST http://localhost:8000/extract/ \
-H "Content-Type: application/json" \
-d '{"file_url": "https://example.com/document.pdf"}'
Error responses:
| Status | Reason |
|---|---|
400 |
URL unreachable, unsupported content type, or file exceeds 10 MB |
500 |
Conversion failed |
Supported Formats
The API accepts files whose Content-Type matches one of the following:
| Format | MIME Type |
|---|---|
application/pdf |
|
| DOCX | application/vnd.openxmlformats-officedocument.wordprocessingml.document |
| ODT | application/vnd.oasis.opendocument.text |
| PPTX | application/vnd.openxmlformats-officedocument.presentationml.presentation |
| XLSX | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet |
| EPUB | application/epub+zip |
| HTML | text/html |
| Markdown | text/markdown |
| LaTeX | text/x-tex |
| reStructuredText | text/x-rst |
| CSV | text/csv |
| TSV | text/tab-separated-values |
| JSON | application/json |
| XML | application/xml |
| RTF | application/rtf |
| Org | text/org |
| Typst | application/x-typst |
| Jupyter Notebook | application/x-ipynb+json |
| BibTeX / BibLaTeX | application/x-bibtex |
| …and more | (all formats supported by Pandoc) |
File size limit: 10 MB
© 2026 | tbdsux