High-Performance Document Conversion API Platform
Parse, convert, and structure your documents with one command.
- Multi-format support: PDF, Office, HTML, EPUB, Images, Biological Data (FASTA/GenBank), and more
- High performance: Async processing, GPU acceleration, concurrent requests
- Flexible integration: CLI, Python SDK, REST API for any workflow
- Production ready: Docker support, health checks, monitoring
- Consistent output: Markdown format with metadata preservation
- Developer friendly: Clean APIs, comprehensive documentation, type hints
- BioPython integration: Enhanced biological sequence analysis capabilities
| Use Case | Description | Best For |
|---|---|---|
| API Integration | Unified REST API for all formats | Microservices, Web Apps |
| CLI Automation | Batch convert docs in one command | CI/CD, Data Processing Pipelines |
| Web Preview | Gradio UI for instant feedback | Prototyping, User Testing |
| SDK Integration | Python library for custom apps | Data Science, ML Workflows |
| Enterprise | Scalable document processing | Document Management Systems |
# Clone and start services
git clone https://github.com/Tendo33/markio.git
cd markio
docker compose up -d
# Access services
# API Documentation: http://localhost:8000/docs
# Web Interface: http://localhost:7860
# Health Check: http://localhost:8000/health# System dependencies (Ubuntu/Debian)
sudo apt update && sudo apt install -y libreoffice pandoc
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
source ~/.bashrc # or restart terminal
# Clone and install
git clone https://github.com/Tendo33/markio.git
cd markio
uv sync
uv pip install -e .
# Start services
export CUDA_VISIBLE_DEVICES=0
./start_services.sh # or run separately:
# python markio/main.py # API server
# python markio/web/gradio_frontend.py # Web UIMarkio provides three flexible usage methods to meet different scenario requirements:
Suitable for microservice integration and web application development. After starting the service, visit http://localhost:8000/docs to view complete API documentation.
Quick Example:
import httpx
import asyncio
async def parse_pdf():
async with httpx.AsyncClient() as client:
files = {"file": open("document.pdf", "rb")}
resp = await client.post("http://localhost:8000/v1/parse_pdf_file", files=files)
result = resp.json()
print(f"Parsed content: {result['parsed_content'][:200]}...")
return result
asyncio.run(parse_pdf())Core API Endpoints:
| File Format | Endpoint | Description |
|---|---|---|
/v1/parse_pdf_file |
Parse PDF with OCR/VLM support | |
| DOCX/DOC | /v1/parse_docx_file, /v1/parse_doc_file |
Word document parsing |
| PPTX/PPT | /v1/parse_pptx_file, /v1/parse_ppt_file |
PowerPoint parsing |
| XLSX | /v1/parse_xlsx_file |
Excel spreadsheet parsing |
| HTML/URL | /v1/parse_html_file, /v1/parse_url_file |
Web content parsing |
| Image | /v1/parse_image_file |
OCR image recognition |
| FASTA | /v1/parse_fasta_file |
Biological sequence parsing (DNA/Protein) |
| GenBank | /v1/parse_genbank_file |
GenBank record parsing with annotations |
Suitable for batch processing, automation scripts, and CI/CD integration.
Quick Examples:
# PDF conversion
markio pdf document.pdf --save
# Batch processing
markio pdf *.pdf --save --output ./results/
# Office documents
markio docx report.docx --saveπ Detailed Documentation: CLI Usage Guide
Suitable for custom application development and data processing workflows.
Quick Example:
from markio.sdk.markio_sdk import MarkioSDK
import asyncio
async def main():
sdk = MarkioSDK(output_dir="./parsed_docs")
result = await sdk.parse_pdf("document.pdf", save_parsed_content=True)
print(f"Parsing completed: {result['file_name']}")
asyncio.run(main())π Detailed Documentation: SDK Usage Guide
π Supported Formats & Engines
| Format | Engine(s) | Features |
|---|---|---|
| MinerU, VLM, OCR | Layout, OCR, Table, ... | |
| DOCX | docling | ... |
| PPTX | docling | ... |
| DOC | LibreOffice+docling | ... |
| PPT | LibreOffice+docling | ... |
| XLSX | docling | ... |
| HTML | docling | ... |
| URL | jina | ... |
| EPUB | pandoc | ... |
| Images | MinerU | OCR |
| FASTA | Custom Parser | Sequence parsing, Statistics, GC content |
| GenBank | Custom Parser | Metadata, Features, Annotations |
βοΈ Configuration & Project Structure
| Variable | Default | Description | Example |
|---|---|---|---|
LOG_LEVEL |
INFO | Log verbosity level | DEBUG, INFO, WARNING, ERROR |
LOG_DIR |
logs | Log file directory | /var/log/markio |
OUTPUT_DIR |
outputs | Parsed content output directory | /data/outputs |
PDF_PARSE_ENGINE |
pipeline | PDF parsing method | pipeline, vlm-vllm-engine, vlm-vllm-client |
MINERU_DEVICE_MODE |
cuda | MinerU device selection | cuda, cpu, mps |
VLM_SERVER_URL |
- | VLM server endpoint | http://localhost:30000 |
VLM_GPU_MEMORY_UTILIZATION |
0.9 | vLLM GPU memory utilization | 0.0-1.0 |
ENABLE_MCP |
false | Enable MCP server | true, false |
HOST |
0.0.0.0 | Server bind address | 127.0.0.1 |
PORT |
8000 | Server port | 8080 |
MINERU_MIN_BATCH_INFERENCE_SIZE |
256 | MinerU minimum batch inference size | 128, 256, 512 |
MINERU_MODEL_SOURCE |
local | MinerU model source | local, remote |
MINERU_VIRTUAL_VRAM_SIZE |
8192 | MinerU virtual VRAM size in MB | 8192, 16384 |
Create a .env file in the project root:
# Basic configuration
LOG_LEVEL=INFO
OUTPUT_DIR=./parsed_documents
PDF_PARSE_ENGINE=pipeline
# GPU configuration (if available)
MINERU_DEVICE_MODE=cuda
# VLM configuration (if using VLM engine)
VLM_SERVER_URL=http://localhost:30000
# Server configuration
HOST=0.0.0.0
PORT=8000Pipeline Engine (Default)
# Uses MinerU with automatic OCR/VLM selection
PDF_PARSE_ENGINE=pipelineVLM Engine (vLLM)
# Use vLLM engine (MinerU 2.5.0+)
PDF_PARSE_ENGINE=vlm-vllm-engine
# Or use vLLM client mode (requires external vLLM service)
PDF_PARSE_ENGINE=vlm-vllm-client
VLM_SERVER_URL=http://localhost:30000| Variable | Default | Description | Values |
|---|---|---|---|
LOG_LEVEL |
INFO | Logging verbosity | DEBUG, INFO, WARNING, ERROR, CRITICAL |
LOG_DIR |
logs | Directory for log files | Any valid path |
OUTPUT_DIR |
outputs | Default output directory | Any valid path |
HOST |
0.0.0.0 | Server bind address | IP address or hostname |
PORT |
8000 | Server port | 1-65535 |
| Variable | Default | Description | Values |
|---|---|---|---|
PDF_PARSE_ENGINE |
pipeline | PDF parsing method | pipeline, vlm-vllm-engine, vlm-vllm-client |
MINERU_DEVICE_MODE |
cuda | MinerU device selection | cuda, cpu, mps |
MINERU_MIN_BATCH_INFERENCE_SIZE |
256 | MinerU batch size | 1-1024 |
MINERU_MODEL_SOURCE |
local | MinerU model source | local, remote |
MINERU_VIRTUAL_VRAM_SIZE |
8192 | Virtual VRAM size (MB) | 1024-65536 |
| Variable | Default | Description | Values |
|---|---|---|---|
VLM_SERVER_URL |
- | VLM server endpoint | Valid URL |
VLM_GPU_MEMORY_UTILIZATION |
0.9 | vLLM GPU memory utilization | 0.1-1.0 |
| Variable | Default | Description | Values |
|---|---|---|---|
ENABLE_MCP |
false | Enable MCP server | true, false |
markio/
βββ markio/ # Main package
β βββ main.py # FastAPI application entry point
β βββ routers/ # API route definitions
β βββ parsers/ # Document parsing modules
β βββ schemas/ # Data models and validation
β βββ utils/ # Utility functions
β βββ web/ # Web interface (Gradio)
β βββ sdk/ # Python SDK
β βββ mcps/ # MCP server integration
βββ docs/ # Documentation
βββ scripts/ # Utility scripts
βββ tests/ # Test files
βββ Dockerfile # Docker configuration
βββ compose.yaml # Docker Compose configuration
βββ pyproject.toml # Project configuration
- GitHub Issues - Bug reports and feature requests
- GitHub Discussions - General questions and help
- Wiki Documentation - Detailed guides and tutorials
When reporting issues, please include:
- Operating system and version
- Python version (
python --version) - Markio version (
pip show markio) - Error messages and stack traces
- Steps to reproduce the issue
- Sample files (if applicable and non-confidential)
- CLI Usage Guide: docs/cli_usage.md
- SDK Usage Guide: docs/sdk_usage.md
Made with β€οΈ by the Markio Team
