# Typst to PDF, PNG & SVG API: Compile Typst Documents Online (`jumblemog/typst-to-pdf`) Actor

Compile Typst to PDF, PNG or SVG: reports, resumes, invoices, letters, slides and whole projects from the Typst web app or GitHub. Typst Universe packages, fonts and template inputs work out of the box. Errors give the file, line, column and Typst's hints, so people and AI agents can fix them.

- **URL**: https://apify.com/jumblemog/typst-to-pdf.md
- **Developed by:** [Jumble Mog](https://apify.com/jumblemog) (community)
- **Categories:** Developer tools, AI, Automation
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Typst to PDF, PNG & SVG API: Compile Typst Documents Online

**Compile [Typst](https://typst.app) to PDF, PNG or SVG without installing anything.** Send a Typst document, a link to a whole project (a ZIP downloaded from the Typst web app, a GitHub repository or folder, or a single `.typ` file) or upload it, and get back a **PDF** or **one image per page** with download links. Packages from Typst Universe load automatically, templates can be filled with your data, and when something is wrong you get the **errors with file, line, column, the line of code and Typst's own hints**, so a person or an AI agent can fix them and try again. Many documents per run, pay per document, and documents that don't compile are free.

![A Typst report with an equation, a table and a CeTZ figure, the PDF this Actor made from it, and the JSON results for a compiled document and for one with a mistake](https://api.apify.com/v2/key-value-stores/Km5b4PG3kYHdZSb1E/records/typst-to-pdf-example.png?signature=cjYQkUyUoRZlVG0QLWXm)

### What it does

- **Typst 0.15**, the modern typesetting system that writes like Markdown and typesets like LaTeX: headings, math, tables, figures, references, bibliographies (`.bib` or Hayagriva), footnotes, outlines, page numbers and multi-column layouts.
- **Typst Universe packages**: `#import "@preview/name:version"` just works. Popular packages are already in the Actor, among them CeTZ and cetz-plot (drawings and plots), fletcher (diagrams), Touying and Polylux (slides), Lilaq (charts), codly (code blocks), showybox, physica, unify and zero (science), algo and lovelace (algorithms), glossarium, hydra, tiaoma and cades (barcodes and QR codes), and templates such as modern-cv, basic-resume, brilliant-cv, charged-ieee, elsearticle, ilm, invoice-maker and letter-pro.
- **Fill templates with data**: pass `inputs` (read with `sys.inputs` in Typst) or add a `data.json`, CSV or YAML file and read it with `json()`, `csv()` or `yaml()`. One template with different inputs per document makes a batch of invoices, certificates, letters or reports.
- **PDF, PNG or SVG**: a PDF per document, or one PNG or SVG per page for previews, thumbnails and social images, at the resolution you choose. Export only some pages if you like.
- **Whole projects**: `#include` and `#import` of files in subfolders, images, fonts and data files. The main file is found automatically (`main.typ`, else a template's entry point from `typst.toml`, else the `.typ` file nearest the top), or you name it.
- **Links that just work**: ZIP files, GitHub repository and folder links (downloaded as a ZIP), raw `.typ` links, GitHub file pages, Google Drive and Dropbox share links, and files uploaded in the input form.
- **Errors you can act on**: each error comes back as `{"file", "line", "column", "message", "source", "hints"}`, for example `main.typ:3:2: unknown variable: x-y (at: #(x-y)) Hint: if you meant to use subtraction, try adding spaces around the minus sign`. Warnings tell you about unknown fonts and similar problems.
- **Fonts**: Libertinus Serif, New Computer Modern and DejaVu Sans Mono come with Typst; the Actor adds Roboto, Inter, Lato, Open Sans, Source Sans 3, Noto Sans and Noto Serif (many scripts), Fira Code, Liberation, DejaVu, Linux Libertine, TeX Gyre, WenQuanYi Zen Hei (Chinese, Japanese, Korean), Noto Color Emoji and Font Awesome 7 and 6 (icons in resume templates). Fonts in your project folder are found automatically.
- **The file straight from the API**: the first PDF (or first page image) is also the run's `OUTPUT`, so the run-sync endpoint answers with the file itself, or with the errors as JSON.
- **Safe with untrusted documents**: Typst only reads files inside the project, and the compiler runs as an unprivileged user in a throwaway folder with a time limit.

### Who it's for

- **AI agents and LLM apps** that write documents (reports, resumes, cover letters, invoices, worksheets, slides) and need a PDF or an image to send. Typst is short and easy for models to write, and the error report with hints lets an agent fix its own markup in a loop.
- **Automation builders** in n8n, Make or Zapier who fill templates with data: invoices, certificates, quotes, letters, reports.
- **Developers** who need document rendering in an app without running Typst on their own servers.
- **Writers and researchers** who want a quick PDF from a project or a GitHub repository.

### How to use it

1. Paste a Typst document into **Typst document**, add links in **Links to Typst projects**, or upload a project ZIP.
2. If your project has extra files (images, data, fonts, a `.bib` file), add them in **Extra files**, or include them in the ZIP. Template values go in **Template inputs**.
3. Pick **PDF**, **PNG** or **SVG** and click **Start**. Each document appears in the **Output** tab with its links, or with its errors.

You can also run it through the [Apify API](https://docs.apify.com/api/v2), on a schedule, or from Make, n8n, Zapier and other integrations.

### Input

| Field | What it does |
| --- | --- |
| `typst` | One complete Typst document. |
| `projectUrls` | Links to projects: ZIP files, GitHub repository or folder links, `.typ` files, Google Drive or Dropbox share links. |
| `uploads` | Project ZIPs or `.typ` files uploaded in the input form. |
| `files` | Extra files: objects with a `name` (relative path such as `images/logo.png` or `data.json`) and a `url`, or the `content` of a text file. |
| `inputs` | Values for `sys.inputs`, such as `{"customer": "Acme"}`. Values that aren't strings are passed as JSON text. |
| `format` | `pdf` (default), `png` or `svg`. |
| `ppi` | PNG resolution in pixels per inch (default 144). |
| `pages` | Only these pages, for example `1` or `1,3-5`. |
| `mainFile` | The main `.typ` file inside projects. Empty (default): found automatically. |
| `documents` | More documents: a list of Typst strings, or objects with `typst` or `url` and optional `name`, `mainFile`, `files` and `inputs`. |
| `compileTimeoutSecs` | Time limit per document, 5 to 600 seconds (default 60). |
| `maxDocuments` | Stop after this many documents (default 100). |

Example: one invoice template, two customers:

```json
{
  "documents": [
    {"name": "invoice-acme", "url": "https://example.com/invoice.typ", "inputs": {"customer": "Acme Ltd", "total": "1,200.00"}},
    {"name": "invoice-globex", "url": "https://example.com/invoice.typ", "inputs": {"customer": "Globex", "total": "860.00"}}
  ]
}
```

In the template, `#sys.inputs.at("customer", default: "Customer")` prints the value. For tables of data, pass a list (`"rows": [...]`) and read it with `#let rows = json(bytes(sys.inputs.at("rows")))`, or add a `data.json` file and use `#let data = json("data.json")`.

### Output

Each document becomes one dataset item, and the files are saved in the run's key-value store:

```json
{
  "index": 1,
  "name": "report",
  "status": "ok",
  "format": "pdf",
  "error": null,
  "errors": [],
  "warnings": [],
  "pdfUrl": "https://api.apify.com/v2/key-value-stores/<store>/records/001-report.pdf?signature=...",
  "imageUrls": [],
  "pages": 1,
  "sizeBytes": 31840,
  "mainFile": "main.typ",
  "sourceUrl": null,
  "processingSeconds": 0.4
}
```

With `"format": "png"` or `"svg"`, `imageUrls` lists one link per page instead. When a document has a mistake, the item says where and how to fix it, and isn't billed:

```json
{
  "index": 2,
  "status": "failed",
  "error": "main.typ:3:2: unknown variable: x-y (at: #(x-y)) Hint: if you meant to use subtraction, try adding spaces around the minus sign: `x - y`",
  "errors": [{"file": "main.typ", "line": 3, "column": 2, "message": "unknown variable: x-y", "source": "#(x-y)",
              "hints": ["if you meant to use subtraction, try adding spaces around the minus sign: `x - y`"]}]
}
```

Download your files within your plan's data retention period, or copy them to your own storage, because run storage expires.

### Pricing

You pay per **document compiled**, at the price shown on this page, whatever the format and number of pages. Documents that don't compile are never charged. If you set a maximum cost per run, the Actor stops when the next document wouldn't fit.

### Speed

Typst is fast. Measured on Apify with the default 1 GB of memory: the example report above, CeTZ figure included, compiled in 0.4 seconds, a modern-cv resume in 0.3 seconds, a charged-ieee paper with a bibliography in 0.5 seconds, Touying slides in 0.3 seconds and an invoice filled from inputs in 0.25 seconds, and PNG pages take about as long. A package version that isn't in the Actor yet is downloaded once, which adds about a second. Starting a run adds a few seconds (a run of seven documents took under 7 seconds in all), so send many documents in one run when you can.

### Tips and limits

- Packages are fetched from Typst Universe the first time a version is used; the popular ones are already in the Actor. Pin versions as Typst requires (`@preview/cetz:0.5.3`). Very old package versions may not support Typst 0.15, so prefer recent ones; an error then names the package.
- Paths starting with `/` are relative to the project folder, as in the Typst web app. Files outside the project can't be read.
- Fonts in the project (any folder) are found automatically; set them with `#set text(font: "Name")`. An unknown font is reported as a warning and Typst falls back to its default font.
- Projects can have up to 3,000 files and 300 MB unpacked, and each download up to 100 MB.
- Writing LaTeX instead? Use the [LaTeX to PDF Compiler](https://apify.com/jumblemog/latex-to-pdf).

### For AI agents and developers

This Actor works with the [Apify MCP server](https://mcp.apify.com), so AI agents can call it as a tool: pass the document in `typst` and read `pdfUrl` (or `imageUrls`) from the dataset item. If `status` is `failed`, the `errors` list says what to fix, with the file, line, column, source line and hints: fix it and call again. For a direct API call that waits for the result:

```bash
curl -X POST "https://api.apify.com/v2/acts/jumblemog~typst-to-pdf/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"typst": "= Hello\nThe area of a circle is $A = pi r^2$."}'
```

To get the file itself as the response, call `run-sync` instead. It returns the run's `OUTPUT`, which is the first PDF or page image (or the first document's errors as JSON):

```bash
curl -X POST "https://api.apify.com/v2/acts/jumblemog~typst-to-pdf/run-sync?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"typst": "#set page(width: 1200pt, height: 630pt)\n#align(center + horizon, text(60pt)[Launch day])", "format": "png"}' \
  -o card.png
```

### Credits

- [Typst](https://github.com/typst/typst) (Apache-2.0) and the packages of [Typst Universe](https://typst.app/universe), which keep their own licenses. Fonts: Font Awesome Free (SIL OFL 1.1) and the Debian font packages listed above, under their own free licenses. This Actor isn't affiliated with Typst GmbH.

# Actor input Schema

## `typst` (type: `string`):

A complete Typst document. Packages from Typst Universe (#import "@preview/name:version") are downloaded automatically, and the popular ones are already in the Actor.

## `projectUrls` (type: `array`):

ZIP files of whole projects (for example downloaded from the Typst web app with File > Download all), GitHub repository or folder links, links to single .typ files, or Google Drive and Dropbox share links. The main file is found automatically, or set it in Main file.

## `uploads` (type: `array`):

Upload a project ZIP or a .typ file from your computer, or pick files you already stored in an Apify key-value store.

## `files` (type: `array`):

Files the documents need, such as images, fonts, .bib bibliographies or data files (JSON, CSV, YAML). Each entry has a "name" (a relative path like "images/logo.png" or "data.json") and either a "url" or, for text files, the "content".

## `inputs` (type: `object`):

Values passed to the documents, read in Typst with sys.inputs, for example {"customer": "Acme", "total": "$1,200"} and #sys.inputs.at("customer"). Values that aren't strings (lists, objects, numbers) are passed as JSON text: read one with json(bytes(sys.inputs.at("rows"))). Documents in the batch list can add their own inputs.

## `format` (type: `string`):

PDF (one file per document), or PNG or SVG with one image per page, for previews, social images and thumbnails.

## `ppi` (type: `integer`):

Resolution of PNG images. 144 is sharp on screens; use 300 for print.

## `pages` (type: `string`):

Only these pages, for example 1 or 1,3-5. Empty: all pages.

## `mainFile` (type: `string`):

The main .typ file inside projects, such as thesis.typ or src/main.typ. Empty: main.typ, else the template entry point in typst.toml, else the .typ file nearest the top of the project.

## `documents` (type: `array`):

A list of documents to compile in the same run. Each entry is a Typst string, or an object with "typst" or "url" and optional "name", "mainFile", "files" and "inputs". One template with different inputs per entry makes a batch of invoices, certificates or letters.

## `compileTimeoutSecs` (type: `integer`):

Stop compiling a document after this many seconds. Most documents take well under a second.

## `maxDocuments` (type: `integer`):

Stop after this many documents, so the cost of a run stays predictable.

## Actor input object example

```json
{
  "typst": "#set page(paper: \"a4\", margin: 2.2cm, numbering: \"1\")\n#set text(font: \"Libertinus Serif\", size: 11pt)\n#set heading(numbering: \"1.\")\n#set math.equation(numbering: \"(1)\")\n#set par(justify: true)\n\n#align(center)[\n  #text(18pt, weight: \"bold\")[Compiling Typst in the Cloud]\n  #v(4pt)\n  An AI Agent · October 2026\n]\n\n= Results\nThe roots of $a x^2 + b x + c = 0$ are\n$ x = (-b plus.minus sqrt(b^2 - 4 a c)) / (2 a). $ <quadratic>\nBy @quadratic, there are two real roots when $b^2 > 4 a c$, as @cases shows.\n\n#figure(\n  table(\n    columns: 3,\n    align: (left, center, center),\n    stroke: none,\n    table.hline(),\n    table.header([*Case*], [*Discriminant*], [*Real roots*]),\n    table.hline(stroke: 0.5pt),\n    [Two roots], [$b^2 - 4 a c > 0$], [2],\n    [One root], [$b^2 - 4 a c = 0$], [1],\n    [None], [$b^2 - 4 a c < 0$], [0],\n    table.hline(),\n  ),\n  caption: [Roots of a quadratic equation.],\n) <cases>\n\n#import \"@preview/cetz:0.5.3\": canvas, draw\n#figure(\n  canvas({\n    import draw: *\n    line((-2.5, 0), (2.5, 0), mark: (end: \">\"))\n    line((0, -1.5), (0, 4), mark: (end: \">\"))\n    content((2.75, 0), $x$)\n    content((0, 4.3), $y$)\n    line(..range(-22, 23).map(i => (i / 10, calc.pow(i / 10, 2) - 1)), stroke: blue + 1pt)\n    circle((-1, 0), radius: 0.07, fill: red, stroke: none)\n    circle((1, 0), radius: 0.07, fill: red, stroke: none)\n  }),\n  caption: [$y = x^2 - 1$ crosses the $x$-axis twice.],\n)\n\n= Why Typst\nTypst compiles in milliseconds and its errors point to the exact line, which makes it a good fit for documents\nwritten by programs and AI agents: reports, invoices, resumes, letters and slides.\n",
  "files": [],
  "format": "pdf",
  "ppi": 144,
  "compileTimeoutSecs": 60,
  "maxDocuments": 100
}
```

# Actor output Schema

## `results` (type: `string`):

One item per document: PDF or image links, page count, warnings, or the errors.

## `files` (type: `string`):

The PDFs and images saved in the run's key-value store.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "typst": `#set page(paper: "a4", margin: 2.2cm, numbering: "1")
#set text(font: "Libertinus Serif", size: 11pt)
#set heading(numbering: "1.")
#set math.equation(numbering: "(1)")
#set par(justify: true)

#align(center)[
  #text(18pt, weight: "bold")[Compiling Typst in the Cloud]
  #v(4pt)
  An AI Agent · October 2026
]

= Results
The roots of $a x^2 + b x + c = 0$ are
$ x = (-b plus.minus sqrt(b^2 - 4 a c)) / (2 a). $ <quadratic>
By @quadratic, there are two real roots when $b^2 > 4 a c$, as @cases shows.

#figure(
  table(
    columns: 3,
    align: (left, center, center),
    stroke: none,
    table.hline(),
    table.header([*Case*], [*Discriminant*], [*Real roots*]),
    table.hline(stroke: 0.5pt),
    [Two roots], [$b^2 - 4 a c > 0$], [2],
    [One root], [$b^2 - 4 a c = 0$], [1],
    [None], [$b^2 - 4 a c < 0$], [0],
    table.hline(),
  ),
  caption: [Roots of a quadratic equation.],
) <cases>

#import "@preview/cetz:0.5.3": canvas, draw
#figure(
  canvas({
    import draw: *
    line((-2.5, 0), (2.5, 0), mark: (end: ">"))
    line((0, -1.5), (0, 4), mark: (end: ">"))
    content((2.75, 0), $x$)
    content((0, 4.3), $y$)
    line(..range(-22, 23).map(i => (i / 10, calc.pow(i / 10, 2) - 1)), stroke: blue + 1pt)
    circle((-1, 0), radius: 0.07, fill: red, stroke: none)
    circle((1, 0), radius: 0.07, fill: red, stroke: none)
  }),
  caption: [$y = x^2 - 1$ crosses the $x$-axis twice.],
)

= Why Typst
Typst compiles in milliseconds and its errors point to the exact line, which makes it a good fit for documents
written by programs and AI agents: reports, invoices, resumes, letters and slides.`,
    "files": []
};

// Run the Actor and wait for it to finish
const run = await client.actor("jumblemog/typst-to-pdf").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "typst": """#set page(paper: \"a4\", margin: 2.2cm, numbering: \"1\")
#set text(font: \"Libertinus Serif\", size: 11pt)
#set heading(numbering: \"1.\")
#set math.equation(numbering: \"(1)\")
#set par(justify: true)

#align(center)[
  #text(18pt, weight: \"bold\")[Compiling Typst in the Cloud]
  #v(4pt)
  An AI Agent · October 2026
]

= Results
The roots of $a x^2 + b x + c = 0$ are
$ x = (-b plus.minus sqrt(b^2 - 4 a c)) / (2 a). $ <quadratic>
By @quadratic, there are two real roots when $b^2 > 4 a c$, as @cases shows.

#figure(
  table(
    columns: 3,
    align: (left, center, center),
    stroke: none,
    table.hline(),
    table.header([*Case*], [*Discriminant*], [*Real roots*]),
    table.hline(stroke: 0.5pt),
    [Two roots], [$b^2 - 4 a c > 0$], [2],
    [One root], [$b^2 - 4 a c = 0$], [1],
    [None], [$b^2 - 4 a c < 0$], [0],
    table.hline(),
  ),
  caption: [Roots of a quadratic equation.],
) <cases>

#import \"@preview/cetz:0.5.3\": canvas, draw
#figure(
  canvas({
    import draw: *
    line((-2.5, 0), (2.5, 0), mark: (end: \">\"))
    line((0, -1.5), (0, 4), mark: (end: \">\"))
    content((2.75, 0), $x$)
    content((0, 4.3), $y$)
    line(..range(-22, 23).map(i => (i / 10, calc.pow(i / 10, 2) - 1)), stroke: blue + 1pt)
    circle((-1, 0), radius: 0.07, fill: red, stroke: none)
    circle((1, 0), radius: 0.07, fill: red, stroke: none)
  }),
  caption: [$y = x^2 - 1$ crosses the $x$-axis twice.],
)

= Why Typst
Typst compiles in milliseconds and its errors point to the exact line, which makes it a good fit for documents
written by programs and AI agents: reports, invoices, resumes, letters and slides.
""",
    "files": [],
}

# Run the Actor and wait for it to finish
run = client.actor("jumblemog/typst-to-pdf").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "typst": "#set page(paper: \\"a4\\", margin: 2.2cm, numbering: \\"1\\")\\n#set text(font: \\"Libertinus Serif\\", size: 11pt)\\n#set heading(numbering: \\"1.\\")\\n#set math.equation(numbering: \\"(1)\\")\\n#set par(justify: true)\\n\\n#align(center)[\\n  #text(18pt, weight: \\"bold\\")[Compiling Typst in the Cloud]\\n  #v(4pt)\\n  An AI Agent · October 2026\\n]\\n\\n= Results\\nThe roots of $a x^2 + b x + c = 0$ are\\n$ x = (-b plus.minus sqrt(b^2 - 4 a c)) / (2 a). $ <quadratic>\\nBy @quadratic, there are two real roots when $b^2 > 4 a c$, as @cases shows.\\n\\n#figure(\\n  table(\\n    columns: 3,\\n    align: (left, center, center),\\n    stroke: none,\\n    table.hline(),\\n    table.header([*Case*], [*Discriminant*], [*Real roots*]),\\n    table.hline(stroke: 0.5pt),\\n    [Two roots], [$b^2 - 4 a c > 0$], [2],\\n    [One root], [$b^2 - 4 a c = 0$], [1],\\n    [None], [$b^2 - 4 a c < 0$], [0],\\n    table.hline(),\\n  ),\\n  caption: [Roots of a quadratic equation.],\\n) <cases>\\n\\n#import \\"@preview/cetz:0.5.3\\": canvas, draw\\n#figure(\\n  canvas({\\n    import draw: *\\n    line((-2.5, 0), (2.5, 0), mark: (end: \\">\\"))\\n    line((0, -1.5), (0, 4), mark: (end: \\">\\"))\\n    content((2.75, 0), $x$)\\n    content((0, 4.3), $y$)\\n    line(..range(-22, 23).map(i => (i / 10, calc.pow(i / 10, 2) - 1)), stroke: blue + 1pt)\\n    circle((-1, 0), radius: 0.07, fill: red, stroke: none)\\n    circle((1, 0), radius: 0.07, fill: red, stroke: none)\\n  }),\\n  caption: [$y = x^2 - 1$ crosses the $x$-axis twice.],\\n)\\n\\n= Why Typst\\nTypst compiles in milliseconds and its errors point to the exact line, which makes it a good fit for documents\\nwritten by programs and AI agents: reports, invoices, resumes, letters and slides.\\n",
  "files": []
}' |
apify call jumblemog/typst-to-pdf --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jumblemog/typst-to-pdf"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/TNHg9UH7Kibley8of/builds/8bofQBAaw3sgaDyaS/openapi.json
