Skip to content

Built on Typst

A Typst API: Typst PDF generation as a service

pdfs.build runs Typst as managed infrastructure. You do not write the Typst: describe the document to the AI assistant, start from a gallery design, or import a .docx, and it becomes a Typst template with a JSON schema. Then render it over REST: validated data in, application/pdf out, in milliseconds.

How a template is shaped

Under the hood a template is ordinary Typst with one convention: a top-level #let render(...) entry function whose named parameters match the template's JSON schema. Whoever wrote it, the AI or our designers, can use Typst Universe packages, which are fetched automatically. A small one looks like this:

typst quote-standard
#let render(client: "", quote_nr: "", items: ()) = {
set text(font: "Inter", size: 10pt)
heading[Quotation {quote_nr}]
[Prepared for *{client}*]
table(
columns: (1fr, auto, auto),
table.header[Description][Qty][Price],
..items.map(i => (i.description, str(i.qty), str(i.price))).flatten()
)
}

Rendering it is one call to the REST API with a JSON payload matching the parameters. Data is validated against the schema before the compiler ever runs, so a malformed payload is a clear 400, never a wrong document.

What "as a service" adds over the CLI

The Typst compiler is open source and excellent, and for static documents in CI you may not need us at all. A managed service earns its keep when Typst becomes part of a product:

Pinned, consistent engine versions

We run Typst 0.15.0 everywhere: the browser preview, the render service, and the publish gate, verified by compiling #sys.version on each. Here is why that discipline exists.

Fonts, managed

Install any Google Font by name or upload your brand's font files once; they are available to every render. No font directory to mount, no missing-glyph surprises between environments.

A live editor non-developers can use

Templates recompile in the browser as they change, with sample data keeping the preview honest. The AI assistant edits Typst, schema and sample data together, and compile-checks every change.

The data layer

Schema validation, draft/publish states, versioning, render logs, webhooks, async batch mode, and an embeddable editor for your own users. This is the part that does not exist in the CLI at all.

How this relates to typst.app and the CLI

typst.app is the Typst team's collaborative web editor: the right tool for humans writing documents together, and the project this whole category owes its existence to. pdfs.build is a different shape: an API product for documents generated from data, with schemas, render endpoints, and agents in the loop. We build on the open-source compiler and gladly send anyone writing a thesis to the official app.

Self-hosting the CLI is free and entirely reasonable for static documents built in CI. What you take on is everything around the binary: version upgrades across environments, font provisioning, package caching, concurrency, and the whole schema-validation and templating layer between your JSON and the compiler. If that list reads like your actual product roadmap, self-host. If it reads like a distraction from it, that is what this service is for.

And if you are coming from LaTeX pipelines or headless browsers entirely, start with why we compile documents instead of printing web pages.

Ship Typst without running Typst

Pro is free for 7 days, then $49 a month. Plans start at $19 a month.

Start 7-day free trial