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
- The
templatefield is the entry-point.typsource. - The
inputsfield is a JSON document that’s exposed to the template assys.inputs.data— see Multipart mode for details. - 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.