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

Quickstart

Compile a one-page PDF with curl.

1. Create a template

// hello.typ
#let d = json.decode(sys.inputs.data)

= Hello, #d.name!

You requested #d.items.len() items:

#for item in d.items [
  - #item
]

2. Create the inputs

{ "name": "Domonkos", "items": ["axum", "typst", "PDFs"] }

Save as hello.inputs.json.

3. Call the API

curl -sS -o hello.pdf \
  -X POST https://typst.floomatik.com/render \
  -F "template=@hello.typ" \
  -F "inputs=<hello.inputs.json"

file hello.pdf
# hello.pdf: PDF document, version 1.7, 1 page(s)

That’s it. Open hello.pdf and you’ll see the rendered list.

What’s happening

  1. The template field is the entry-point .typ source.
  2. The inputs field is a JSON document that’s exposed to the template as sys.inputs.data — see Multipart mode for details.
  3. The response body is the compiled PDF with Content-Type: application/pdf.

For workflows where the template lives in cloud storage, or you want the PDF written straight to a bucket, see URL mode.