Introduction
What LaTeX API is, where it lives and how to talk to it.
LaTeX API compiles LaTeX projects to PDF over HTTP. You send a .tex file, a set of files or a zip; the server runs pdfLaTeX, XeLaTeX or LuaLaTeX from TeX Live 2026 inside a throwaway container and returns the PDF together with a parsed log: every error and warning with its file, line and context.
It is open source (MIT) and self-hostable. A public instance runs at the base URL below.
Base URL
https://latex-api.crafter.runAll API routes live under /v1. The OpenAPI 3.1 document is served at /openapi.json and an interactive reference at /reference.
Authentication
Protected routes take an API key in either header:
Authorization: Bearer <key>
X-API-Key: <key>Keys are issued by whoever operates the instance. See Authentication for the public endpoints and rate limits.
Content types
| You send | Content-Type | Notes |
|---|---|---|
| A single document | text/x-tex | Body is the file; ?entrypoint= names it (main.tex) |
| Several files as JSON | application/json | files[] with path, content, optional encoding |
| Files or a zip as form fields | multipart/form-data | files parts and/or a project zip part |
| A zip archive | application/zip | Options go in the query string |
Responses are a PDF (application/pdf) or, with Accept: application/json, a JSON job envelope. Errors are always application/problem+json (RFC 9457); see Errors.