# PageRush > PageRush is an HTTP API for fast, accurate PDFs from Typst templates and JSON data, even for long documents. Versioned templates, signed webhooks, idempotency keys, and you never pay for failed renders. PageRush is a hosted HTTP API. Store a Typst template, send JSON data with each request, and receive the PDF. There is no browser involved, so long documents stay fast, and a template version always renders the same document from the same data (unless it reads the current date or loads images from an address). It also has a visual template editor on every plan. It is built for invoices, statements, receipts, reports and certificates. Rendering is hosted in India (Mumbai) first, priced in INR for customers in India and USD everywhere else. Status: live. Renders run on a native Typst compile service in India (Mumbai). Uptime history from a real render every 5 minutes: https://pagerush.dev/status (JSON: https://pagerush.dev/status.json). ## Docs - [API reference](https://pagerush.dev/docs): templates and versions, the data.json convention, render options, async callbacks, signature verification, limits, error codes - [OpenAPI document](https://pagerush.dev/v1/openapi.json): machine-readable description of the API - [Pricing](https://pagerush.dev/pricing): plans and prepaid credits ## Client libraries Official, open source (https://github.com/arsi-consultancy/pagerush-sdks), no runtime dependencies. Each covers templates and versions, sync and async rendering, job status and downloads, and webhook signature checks, and adds an idempotency key to render calls. - Node.js / TypeScript: `npm install pagerush` (Node 20+), docs https://github.com/arsi-consultancy/pagerush-sdks/tree/main/node#readme - Python: `pip install pagerush` (Python 3.9+), docs https://github.com/arsi-consultancy/pagerush-sdks/tree/main/python#readme - PHP: `composer require pagerush/pagerush-php` (PHP 8.1+), docs https://github.com/arsi-consultancy/pagerush-sdks/tree/main/php#readme - Go: `go get github.com/arsi-consultancy/pagerush-sdks/go@latest` (Go 1.21+), docs https://github.com/arsi-consultancy/pagerush-sdks/tree/main/go#readme ## Quick facts - Auth: header `Authorization: Bearer `. API keys and templates are scoped to a project. - Templates: `POST https://pagerush.dev/v1/templates` with `{"name", "source", "files"?, "sample_data"?}` creates a template whose version 1 is live. `source` is the template's `main.typ`; `files` are other files it imports or reads (`{path, content, encoding: "utf8" | "base64"}`). Versions are immutable: add one with `POST /v1/templates//versions`, switch or roll back with `POST /v1/templates//publish` `{"version": n}`. - Render: `POST https://pagerush.dev/v1/templates//render` with `{"data": {...}}`; responds with `application/pdf` (headers `X-Job-Id`, `X-Template-Version`). Optional: `version`, `callback_url`, `metadata`, `delete_after_download`, `filename`. - Data convention: the request's `data` is a virtual `data.json` at the template root; read it with `#let data = json("data.json")`. - Fonts (Typst 0.15.1): Libertinus Serif, New Computer Modern, Noto Sans, Noto Serif, Inter, Noto Sans Mono, JetBrains Mono, DejaVu Sans Mono, Noto Sans Devanagari, Noto Sans Bengali, Noto Sans Tamil, Noto Sans Telugu, Noto Sans Kannada, Noto Sans Malayalam, Noto Sans Gujarati, Noto Sans Gurmukhi, Noto Sans Oriya, New Computer Modern Math. Typst falls back to a font that has the character, so Indian scripts render even if a template only sets a Latin font. - Limits: 10,000 pages and 25 MB per PDF; source plus files up to 1.5 MB per version and 50 files; data up to 2 MB per render (1 MB with callback_url); 100 API requests per 10 seconds per key (429 with Retry-After beyond that); concurrent renders per plan (see Pricing below) (429 CONCURRENCY_LIMIT with Retry-After beyond that, never charged). - Template errors: `422 TEMPLATE_COMPILE_FAILED` with Typst's diagnostics in `errors` (paths like `main.typ:12:5`). - Async: add `callback_url` (public https) to get `202` immediately; the PDF is POSTed to that URL, signed with HMAC-SHA256 (`X-PageRush-Signature: t=,v2=` over `"\n\n\n\n" + raw body`, so the event, job id and metadata headers are covered too; for 24 hours after a secret rotation that keeps the old secret there is a second `v2`, so accept any that matches), retried for about 26 hours. A callback can occasionally arrive twice: ignore repeats using the `X-PageRush-Job-Id` header. - Data retention: render data is used only to compile the document and is not kept after the job finishes. - Download again: every successful PDF is kept for 24 hours; `GET https://pagerush.dev/v1/jobs/` (job id from the `X-Job-Id` header) returns a signed `download_url` without re-rendering or charging. Send `"delete_after_download": true` (or turn it on in the project's settings) to skip this: sync PDFs aren't stored and async PDFs are deleted once delivered or downloaded. - Safe retries: send an `Idempotency-Key` header; a retried request never renders or charges twice. - Billing: failed renders are never charged. Errors are `application/problem+json` with a stable `code`. - Sign-up: email one-time code at https://pagerush.dev/login. Contact: contact@pagerush.dev ## Pricing - Free: free, 50 PDFs per month (once per 50 pages), 2 renders at once, up to 30s per render - Starter: INR 999 per month + 18% GST, 2,000 PDFs per month (once per 50 pages), 5 renders at once, up to 30s per render - Pro: INR 2999 per month + 18% GST, 10,000 PDFs per month (once per 50 pages), 10 renders at once, up to 60s per render - Business: INR 9999 per month + 18% GST, 50,000 PDFs per month (once per 50 pages), 20 renders at once, up to 60s per render Prepaid credits (never expire, used after the monthly quota): - 500 credits: INR 499 + 18% GST - 2,000 credits: INR 1499 + 18% GST - 10,000 credits: INR 5999 + 18% GST ## FAQ ### What is PageRush? PageRush is an HTTP API that renders PDFs from Typst templates and JSON data. Store a template once, then POST your data to /v1/templates/:id/render and get the PDF back, or pass a callback_url and receive it as a signed webhook. ### What is Typst? Typst is a modern typesetting language: markup for text, plus real scripting for loops, conditions and data. It handles page numbers, headers and footers, and table headers that repeat across pages, which makes it a good fit for invoices, statements, reports and certificates. ### How does my template get the data? The data you send with each render is available to the template as a file called data.json. Read it with #let data = json("data.json") and use it anywhere in the document. ### Why not render HTML in a browser? There is no browser to start and no page to load, so a simple two-page invoice compiles in about 5 ms, a GST invoice with a UPI QR code in about 20 ms, and a 300-page report in under 4 seconds. A full API call from India takes about three-quarters of a second, mostly network, authentication and storage. ### Are there client libraries? Yes. Official open-source SDKs for Node.js (npm install pagerush), Python (pip install pagerush), PHP (composer require pagerush/pagerush-php) and Go cover templates, sync and async rendering, downloads and webhook signature checks, with safe retries built in. Any language can also call the HTTP API directly. ### Can I add QR codes, barcodes or charts? Yes. Popular Typst Universe packages are built in, including tiaoma for UPI QR codes and barcodes, CeTZ and Lilaq for charts, and Fletcher for diagrams. Import them at the versions listed in the docs. Nothing is downloaded at render time. ### Is there a visual template editor? Yes, on every plan. Place text, tables, images, charts and barcodes on the page, bind them to your data fields, and see a live preview that compiles in your browser. Add your own images and fonts, check accessibility as you go, and mark a template PDF/UA-1 to get tagged, accessible PDFs from the API. An existing Typst template can be converted into an editable one, though images and complex drawings aren't carried over. Or write Typst by hand: both kinds of template render through the same API. ### Where is it hosted? PDFs are rendered in India (Mumbai), and the API runs next to that service. Account data, templates and stored PDFs are kept on Cloudflare's network, which doesn't guarantee they stay in India. Previews in the visual editor compile in your browser. Customers in India pay in INR and everyone else in USD. We plan to add more rendering regions. ### Am I charged for failed renders? No. A unit of quota is reserved when a request starts and only committed if a valid PDF is produced. Failures, including templates that don't compile, release the reservation automatically. ### Do long documents count as more than one PDF? A PDF of up to 50 pages counts as one. Longer ones count once for every 50 pages started, so a 120-page report counts as three. It is worked out after the render, from the pages actually produced. ### What happens when I run out of my monthly quota? Requests draw from prepaid credits if you have any. Otherwise the API returns HTTP 402 until your plan renews or you top up. ### Do you keep my data? Render data is used only to compile the document and is deleted from our database when the job finishes (database backups expire within 30 days). PDFs are normally kept for 24 hours so you can download them again, or deleted right after download if you ask. ### How do callbacks work? Add callback_url to your request and the API responds immediately with 202. When the PDF is ready it is POSTed to your URL, signed with your project's webhook secret, and retried for up to about 26 hours if your endpoint is down. ### Can I cancel anytime? Yes. Cancelling keeps your plan active until the end of the paid period. Unused credits never expire.