Generation API
A rendering engine you can pin, inspect, and run yourself
Structured data in, typeset PDF out, over REST. The engine version is yours to pin, the output is byte-reproducible, and the payload never leaves your network.
REST · LaTeX or Typst · Deterministic output
curl -X POST $WRAFT/api/v1/builds \
-H "Authorization: Bearer $TOKEN" \
-d '{
"template": "invoice@v12",
"engine": "typst",
"data": { "account": "NW-4471" }
}'
← 201 { "build": "b_9f2a", "state": "queued" } Which page do you want
This page is the developer contract — the API surface, the typesetting engines, and how output behaves. If you are replacing a manual process rather than integrating a system, the automation page covers pipelines, approval routing and batch runs instead. Same engine underneath.
The API surface
Everything the interface does, over REST
There is no privileged internal API. The web interface is a client of the same endpoints you get, which is the only reliable guarantee that they stay complete.
Builds
POST a template reference and a data source; get a build id back. Poll it, or let a webhook tell you when the artifact is ready.
Templates
Create, version and publish templates over the API. Template revisions are addressable, so a build can pin the exact version it used.
Data sources
Push a payload inline, or point a build at a connected source — Sheets, Shopify, Airtable, or a database connection you configured.
Artifacts
Fetch the rendered file, its hash, and the build metadata. Files land in your own object store, so you can also read them directly.
Webhooks
Build completion, failure, approval transitions and signature events, delivered with a signature you can verify.
Auth and tenancy
API tokens scoped per application, SSO for humans, and per-organisation isolation enforced in the data layer.
Two engines
Pick per document, not per platform
Both are real typesetting systems rather than browsers pretending to be one. The choice is about compilation speed against typographic tradition.
LaTeX
For documents where typographic convention matters — legal instruments, academic output, anything with footnotes, cross-references, or a house style that has existed for decades.
Typst
Markedly faster compilation with a modern scripting model. The better default for catalogs, statements, and any batch large enough that build time is a real cost.
Same template contract
Both engines consume the same field mapping, so switching is a per-template decision rather than a rewrite. Pick per document, not per platform.
An honest comparison
Against a hosted rendering API
Hosted rendering services are well-built and much faster to adopt — you can be generating documents in an afternoon. The differences below are architectural.
Describes the common architecture of hosted rendering services, not any single vendor. Some offer VPC or on-premise deployment at enterprise tiers.
What a build records
Enough to explain any document you ever shipped
Every build stores what produced it. When someone asks why last quarter's statement looks different, the answer is a lookup.
- 01 Template version Pinned at submission, so the build is reproducible later.
- 02 Input record The exact payload, retained with the build.
- 03 Engine and config Which engine, which version, which package set.
- 04 Artifact hash A checksum of the output, so tampering is detectable.
Integrations
Where the data usually comes from
Connectors for the common sources, and REST for everything else. Nothing here is a paid add-on.
Before you integrate