Compile LaTeX (.tex) documents
tex.x.gl/v1/compile
Compile LaTeX (.tex) documents — resumes, CVs, arXiv papers, Beamer slide decks, technical reports, invoices, and TikZ diagrams — inside a hardened networkless TeX Live container, returning base64 PDF, 150-DPI PNG page previews, and structured diagnostics.
POST
https://tex.x.gl/v1/compileUptime100% of 3 checks in 30 days
30 days agoToday
Try it
Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.
The response shows up here.
Call it from an agent
// npm install fourohtwo
import { createPayer } from "fourohtwo";
// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://tex.x.gl/v1/compile", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"bibliography":false,"engine":"pdflatex","files":{"refs.bib":"@article{knuth1984,\n author = {Donald E. Knuth},\n title = {Literate Programming},\n journal = {The Computer Journal},\n year = {1984}\n}"},"include_page_previews":true,"main_tex":"\\documentclass{article}\n\\begin{document}\nHello, TeX402!\n\\end{document}"}),
});
console.log(await res.json());Example input
{
"bibliography": false,
"engine": "pdflatex",
"files": {
"refs.bib": "@article{knuth1984,\n author = {Donald E. Knuth},\n title = {Literate Programming},\n journal = {The Computer Journal},\n year = {1984}\n}"
},
"include_page_previews": true,
"main_tex": "\\documentclass{article}\n\\begin{document}\nHello, TeX402!\n\\end{document}"
}