Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Overview

flootypst is a small HTTP service that compiles Typst templates to PDF. It exposes two request shapes:

  • Multipart modePOST /render with the template, optional JSON inputs, and any image/asset files in a single multipart body. The PDF is returned synchronously in the response.
  • URL modePOST /render-uri with a JSON document that points to a publicly-fetchable template, optional asset URLs, and an upload destination. The service downloads everything, compiles, uploads the PDF to the destination, and returns a small JSON ack. Designed for GCS signed URLs in both directions.

Why two modes?

Multipart is the simplest path: one HTTP request in, one PDF out. Good for small templates and quick clients.

URL mode keeps request bodies small (just URLs and inputs) even when the template ships with large images, and avoids streaming a big PDF back through the API tier. The caller signs short-lived URLs against its own storage bucket, hands them to flootypst, and the bytes flow directly between flootypst and the bucket.

What it is not

  • It does not hold credentials for any storage backend. Authorization is delegated entirely to whoever signs the URLs.
  • It does not download Typst packages from @preview/... or anywhere else. Templates must be self-contained.
  • It does not see the host filesystem. Templates and assets you supply are the only files visible to the compiler.

Endpoints

MethodPathPurpose
POST/renderMultipart compile, PDF response
POST/render-uriURL-driven compile, uploads PDF to a URL
GET/healthLiveness probe (returns ok)
GET/docs/This documentation