A lightweight API that compiles LaTeX projects into PDFs. Send a ZIP archive containing your .tex files, get a compiled PDF back.
Compile a LaTeX project.
Headers:
X-Latex-Main-Path(required) — relative path to the main.texfile inside the ZIPAuthorization: Bearer <API_KEY>(optional) — required ifAPI_KEYenv var is set
Body: ZIP file containing your LaTeX project
Response: application/pdf on success, plain text error on failure
Example:
zip -r project.zip resume.tex
curl -X POST https://your-service.onrender.com \
-H "X-Latex-Main-Path: resume.tex" \
-H "Authorization: Bearer YOUR_API_KEY" \
--data-binary @project.zip \
-o output.pdfHealth check. Returns {"status": "ok"}.
| Variable | Default | Description |
|---|---|---|
API_KEY |
(none) | If set, requires Bearer token auth |
COMPILE_TIMEOUT |
120 |
Max seconds per pdflatex run |
MAX_PASSES |
2 |
Number of pdflatex passes (for references/TOC) |
MAX_BODY_SIZE |
10MB |
Max upload size |
MAX_EXTRACTED_SIZE |
50MB |
Max extracted ZIP size |
- Connect your GitHub repo
- Select Docker environment
- Set
API_KEYenv var (optional)
docker build -t latex-compiler .
docker run -p 8080:8080 -e API_KEY=your_secret latex-compiler