FormaTeX

\usecases{FormaTeX}

What will you build?

FormaTeX is a LaTeX compilation API. Any stack that can make an HTTP request can generate production-quality PDFs. Here are the most common patterns.

01

\input{ai-pipelines}

AI & LLM pipelines

LLMs write LaTeX. FormaTeX compiles it.

Chain any LLM with FormaTeX and you have a pipeline that goes from a natural-language prompt to a typeset PDF — no local TeX installation, no infrastructure. Works with Claude, OpenAI, Gemini, Groq, or any model that outputs text. The MCP server lets Claude Code compile LaTeX directly inside an AI chat without writing any code at all.

AI developersLLM tool buildersAgentic workflowsClaude Code users
ai-pipeline.js
// Generate LaTeX with any LLM, compile with FormaTeX
const latex = await anthropic.messages.create({
  model: "claude-opus-4-6",
  messages: [{ role: "user", content: "Write a project summary as a LaTeX document" }],
}).then(r => r.content[0].text);

const pdf = await fetch("https://api.formatex.io/api/v1/compile/sync", {
  method: "POST",
  headers: {
    "X-API-Key": process.env.FORMATEX_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ latex, engine: "pdflatex" }),
});

// Binary PDF in response body — pipe directly to storage or user
await writeFile("output.pdf", Buffer.from(await pdf.arrayBuffer()));
02

\input{automation}

Document automation

Invoices, contracts, certificates — at API speed.

Define a LaTeX template once, expose a JSON endpoint, and let your backend generate PDFs on demand. The templates API accepts {{variable}} placeholders — callers POST plain JSON and receive a compiled PDF. Scale to thousands of documents per hour using the async queue. No PDF library quirks, no rendering drift between runs.

SaaS buildersBackend engineersFintechLegaltech
invoice.textemplate

Dear ...

client_name:{{client_name}}
amount:{{amount}}
due_date:{{due_date}}
invoice_no:{{invoice_no}}
POST /templates/:id/compile
Batch queue3 jobs
INV-2026-00421.2s
INV-2026-00430.9s
INV-2026-0044
2 PDFs ready · 1 compilingasync queue
03

\input{edtech}

EdTech & scientific platforms

Math typesetting that actually works.

Render math-heavy exams, worksheets, lecture notes, and research papers server-side. amsmath, TikZ, pgfplots, bibliography management — all supported. No client-side rendering, no MathJax inconsistencies. A compile call returns a PDF that prints identically every time, across every device.

EdTech companiesUniversitiesResearch platformsPublishers
exam-calculus-ii.pdf
compiled · 2.1s

Calculus II — Final Examination

University of Sciences · Spring 2026 · 90 minutes

ab f (x) dx = F(b) − F(a)

Fundamental Theorem of Calculus

1.

Let f(x) = x² + 3x − 2. Find all critical points and classify each.

2.

Evaluate the definite integral using the Fundamental Theorem of Calculus.

3.

Prove that lim(x→∞) of 1/x = 0 using the ε-δ definition.

amsmath · pgfplots · TikZPage 1 of 4
enginepdflatex
·amsmath, TikZ, pgfplots supported
04

\input{ci-cd}

GitHub Actions & CI/CD

PDF artifacts from your LaTeX source. On every push.

Compile LaTeX in any CI pipeline with a single API call — no TeX Live installation, no Docker image maintenance. Use the async endpoint for large documents, pipe the binary response to your artifact store, and attach the PDF to your release. Works in GitHub Actions, GitLab CI, CircleCI, or any shell that has curl.

DevOps engineersBackend developersOpen-source maintainersTechnical writers
.github/workflows/pdf.yml
name: Compile LaTeX to PDF
on: [push]

jobs:
  compile:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Compile with FormaTeX
        run: |
          curl -X POST https://api.formatex.io/api/v1/compile/sync \
            -H "X-API-Key: ${{ secrets.FORMATEX_API_KEY }}" \
            -H "Content-Type: application/json" \
            -d "{\"latex\": $(jq -Rs . < main.tex), \"engine\": \"latexmk\"}" \
            --output thesis.pdf

      - uses: actions/upload-artifact@v4
        with:
          name: thesis-pdf
          path: thesis.pdf
05

\input{mcp}

MCP / AI agent tools

Your AI agent compiles LaTeX natively.

FormaTeX ships a first-class MCP server. Add it to Claude Code, Cursor, Windsurf, or any MCP-compatible client and the AI gains direct access to a full LaTeX compilation stack — compile documents, fill templates, check syntax — all from within an AI conversation. No terminal switching, no context breaks. Available on all plans.

Claude Code usersCursor usersAI tool buildersResearchers
mcp-config.json
{
  "mcpServers": {
    "formatex": {
      "command": "formatex-mcp",
      "env": {
        "FORMATEX_API_KEY": "fex_a8k2mP9..."
      }
    }
  }
}

Claude can now compile documents, fill templates, check syntax — all from chat. Works with Claude Code, Cursor, VS Code, Windsurf, Cline, and any MCP client.

06

\input{resume}

Resume & CV builders

LaTeX quality. SaaS reliability.

LaTeX produces the finest typographic output for resumes and CVs — and FormaTeX makes it an API call. Accept user input, inject it into a LaTeX template, compile with xelatex, and return a pixel-perfect PDF. No local TeX, no per-server setup. The templates API handles variable substitution — you call the endpoint and pipe the binary response back.

SaaS foundersIndie developersCareer platformsRecruitment tech
jane-doe-cv.pdf
xelatex · 1.4s

Jane Doe

jane@doe.dev · London, UK · github.com/janedoe

Experience

Senior Engineer

2023 – present

Acme Corp · London

Software Engineer

2021 – 2023

Meridian Labs · Remote

Skills

TypeScriptReactGoPostgreSQLAWS
Download PDF
·pixel-perfect on every device

\subsection{Also used for}

More patterns

Financial reports

Quarterly reports and prospectuses where layout precision is non-negotiable.

Academic journals

Paper formatting for arXiv, IEEE, ACM, and institutional repositories.

Certificate generation

Diploma systems with custom typography and institutional branding.

Technical docs

Generate versioned PDF docs from source — auto-built on every release.

Legal documents

Contracts and term sheets where consistent formatting matters.

Book publishing

Chapter-by-chapter LaTeX to final PDF with TOC, bibliography, cross-refs.

Arabic & multilingual docs

RTL languages, bidirectional text, and Unicode fonts via XeLaTeX and polyglossia.

Start building 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