FormaTeX

\usepackage{integrations}

Drop into any stack.

FormaTeX is a plain HTTP API. If your language can make a POST request, it can compile LaTeX. Here are ready-to-use examples for the most common stacks.

npm SDK

formatex · Node.js · Bun · Deno

\install

bash
npm install formatex-sdk
compile.ts
import { writeFileSync } from "node:fs";
import { FormaTexClient } from "formatex-sdk";

const client = new FormaTexClient(process.env.FORMATEX_API_KEY!);

const latex = `
\\documentclass{article}
\\begin{document}
  Hello, FormaTeX!
\\end{document}`;

const result = await client.compile(latex);
writeFileSync("output.pdf", result.pdf);

\env

bash
# .env
FORMATEX_API_URL=https://api.formatex.io
FORMATEX_API_KEY=fex_...   # from your dashboard

Using an AI coding agent?

FormaTeX has a native MCP server — Claude, Cursor, Windsurf, Zed and others can compile LaTeX directly in your conversation, no HTTP calls needed.

\and{more}

Any language. Any runtime.

FormaTeX is plain HTTP with JSON. If it runs on a server and can make a POST request, it works.

RustJavaKotlinSwiftC#ElixirHaskellScalaDartLuaJuliaRMATLAB

Get your API key in 30 seconds.

15 free compilations every month. No credit card required.

One quick thing

We track anonymous usage — page views, feature usage, compilation events — to understand what works and what doesn't. No ads, no personal data, no third-party sharing.

Cookie policy