A simple axum API for compiling TeX/LaTeX with Tectonic, hosted on Hugging Face Spaces.
A simple axum API for compiling TeX/LaTeX with Tectonic, hosted on Hugging Face Spaces.
Simply cURL the endpoint like in the following.
curl -O 'https://winstxnhdw-tectonic-api.hf.space/api/v1/compile' \
-H 'Content-Type: application/json' \
-d \
'{
"latex": "\\\documentclass{article}\\\begin{document}Hello, world!\\\end{document}"
}'
You can spin the server up locally with the following.
docker build -f Dockerfile.build -t tectonic-api .
docker run --rm -e APP_PORT=7860 -p 7860:7860 tectonic-api