Compile LaTeX through an HTTP API

LaTeX-on-HTTP takes your LaTeX sources — inline content, files or remote URLs — and returns the compiled PDF. No local TeX installation required: call it from server code, CI pipelines or the browser.

Quickstart

The quickest way to compile is the synchronous builds endpoint. Pass your document in a content parameter — the response body is the PDF:

curl -G https://latex.ytotech.com/builds/sync \
    --data-urlencode 'content=\documentclass{article} \begin{document} Hello World LaTeX-On-HTTP \end{document}' \
    --output hello_world.pdf

Open the playground to try every endpoint from your browser, with no setup at all.

Where to call it from

API summary

Endpoint Methods Purpose
/builds/sync GET POST Compile a LaTeX document (querystring, JSON or multipart input) and get back the PDF.
/texlive/information GET TeXLive installation information (version, modules, tlmgr revision).
/fonts GET List fonts usable in compilations.
/packages, /packages/<name> GET List installed LaTeX packages, or get one package's details.
/caches/resources GET DELETE Inspect or reset the resources cache.
/caches/resources/check_cached POST Check whether resources (by content hash) are already cached server-side.

Running your own instance

The service is available as an open beta on latex.ytotech.com. You can also run it yourself with Docker:

git clone https://github.com/YtoTech/latex-on-http.git
cd latex-on-http
docker compose up
# The service is available on http://localhost:8088

Prebuilt Docker images are also published: yoant/latexonhttp-python (Python + TeXLive) and yoant/docker-texlive (the base TeXLive distribution). See the README for details.