Skip to content

For Typst users

A Typst API: compile Typst to PDF as a service

pdfs.build runs Typst as managed infrastructure. Write a Typst template (or import one, or have the AI assistant write it), give it a JSON schema, and render it over REST: validated data in, application/pdf out, in milliseconds.

Bring your own Typst

A template is ordinary Typst with one convention: a top-level #let render(...) entry function whose named parameters match the template's JSON schema. Everything else is the Typst you already know, including Typst Universe packages via #import "@preview/...", which are fetched automatically.

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 you type, 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

Free tier includes 2 templates and 50 watermarked PDF renders per month. No credit card required.

Start building free