mirror of
https://github.com/delibae/claude-prism.git
synced 2026-08-28 05:14:59 +00:00
973 B
973 B
LaTeX API
A simple LaTeX compilation API service built with Hono + Node.js.
API
POST /builds/sync
Compiles LaTeX documents and returns PDF.
Request:
{
"compiler": "pdflatex",
"resources": [
{
"path": "main.tex",
"content": "\\documentclass{article}\\begin{document}Hello\\end{document}",
"main": true
},
{
"path": "image.png",
"file": "<base64-encoded-content>"
}
]
}
Response:
- Success:
application/pdfbinary - Failure:
application/jsonwith{ error, log_files }
Local Development
# Install dependencies (from workspace root)
pnpm install
# Run development server
pnpm dev
# Test
curl -X POST http://localhost:3001/builds/sync \
-H "Content-Type: application/json" \
-d '{"compiler":"pdflatex","resources":[{"main":true,"content":"\\documentclass{article}\\begin{document}Hello\\end{document}"}]}'
Requires TeX Live installed locally for development.