API built with Python (FastAPI + MarkItDown) to convert documents (DOCX, PDF, PPTX, images, etc.) into Markdown. Includes API Key authentication and is configured to run in Docker/Coolify, with a built-in healthcheck.
- Convert common document formats to Markdown (
.docx,.pdf,.pptx,.xlsx,.html, images, etc.). - Secure file upload via
multipart/form-data. - API Key protection (via
X-API-Keyheader). /healthendpoint for monitoring.- Ready for Docker and DevContainer environments.
pip install -r requirements.txt
uvicorn app:api --reloadAccess the API at: http://localhost:8000/docs
docker build -t doc2md-api .docker run -e API_KEY=supersecret -p 8000:8000 doc2md-apiAll requests must include the header:
X-API-Key: supersecretSet your API key via the API_KEY environment variable.
GET /healthResponse:
{ "status": "ok" }POST /convertHeaders:
X-API-Key: supersecret
Body (form-data):
file: document file (.docx,.pdf, etc.)
Example using curl:
curl -H "X-API-Key: supersecret" \
-F "[email protected]" \
http://localhost:8000/convertResponse:
{
"filename": "mydocument.md",
"markdown": "# Title\n\nConverted content in Markdown..."
}The project includes VS Code DevContainer support. Open it in VS Code and select “Reopen in Container” to start with a fully prepared development environment.
MIT – you are free to use, modify, and contribute.
💰 Donations
This initiative is open-source and free to use. If you find it valuable and would like to contribute, you can make a donation as a way to support the continuation of this work.
Project powered by FastAPI and MarkItDown.