tectonic-api

A simple axum API for compiling TeX/LaTeX with Tectonic, hosted on Hugging Face Spaces.

Stars
0
Committers
3

tectonic-api

A simple axum API for compiling TeX/LaTeX with Tectonic, hosted on Hugging Face Spaces.

Usage

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}"
 }'

Development

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