PDFForge
PDF generation API · powered by Typst

Send a template + JSON. Get a print-grade PDF back.

Cheaper than DocRaptor — and no rendering stack to babysit.

PDFForge renders documents from a Typst template and your JSON data — invoices, reports, certificates — with typeset quality and byte-stable output. 100 free renders every month. No card required.

One call

A render is a single POST

Name a built-in template (or send your own Typst source), pass the data as JSON, and the response body is the finished PDF.

curl -X POST https://api.newkwlab.com/pdf/render \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "invoice",
    "data": {
      "seller": { "name": "NewKwLab", "email": "support@newkwlab.com" },
      "buyer":  { "name": "Acme Retail Ltd" },
      "invoice_no": "INV-1001",
      "date": "2026-11-14",
      "items": [
        { "desc": "Widget A",  "qty": 2, "unit_price": 100 },
        { "desc": "Service B", "qty": 3, "unit_price": 33.33 }
      ],
      "tax_rate": 0.1,
      "currency": "USD"
    }
  }' \
  --output invoice.pdf

The response is the binary PDF itself (Content-Type: application/pdf) — no job polling, no download links to chase. The invoice above renders to the sample shown under Templates.

Built-in templates

Three templates in the box

Production-ready layouts you can call by name today — plus your own Typst source whenever you need full control.

"template": "invoice"

Invoice

Seller and buyer blocks, line items, tax and totals — the document every business sends monthly.

Invoice PDF rendered by PDFForge
Real output, rendered by the production API from the request above: subtotal 299.99, tax 30.00, total 329.99 — measured from the rendered file, not a mockup.
"template": "report"

Report

A multi-page document layout with headings, sections and tables — for statements, summaries and deliverables.

"template": "certificate"

Certificate

A formal single-page certificate with recipient name and course title. Full CJK support — Chinese names and titles render as real glyphs, not boxes.

Bring your own Typst template

Send your Typst source as "template_source" instead of a template name and render against the same JSON contract. Your data is passed in as pure data — it is never executed as code — and custom sources render in a sandbox with no file or package access outside the job.

Pricing

Start free. Pay for volume, not seats.

Every plan includes all built-in templates, your own Typst sources, and CJK rendering.

Free
$0 / month
100 renders / month
  • No credit card required
  • All 3 built-in templates
  • Bring your own Typst template
Start free
Ultra
$29 / month
15,000 renders / month
  • Everything in Pro
  • Overage: $0.001 / render
Start with Ultra

Overage gets cheaper as you grow: $0.002→$0.001 per extra render.

Monthly quotas reset and don't roll over. On the NewKwLab gateway, failed renders never consume credits.

Questions

FAQ

Do I need a credit card to start?

No. The Free plan gives you 100 renders every month with no card required — sign up on RapidAPI and make your first call.

Do unused renders roll over to the next month?

No. Monthly quotas reset at the start of each month and unused renders don't roll over.

Am I charged for failed renders?

On the NewKwLab gateway, no: renders that fail (4xx/5xx) never consume credits — you only spend credits on PDFs you actually receive.

Does it support Chinese?

Yes. Chinese text renders with Noto CJK fonts, so names, addresses and document bodies come out as proper glyphs. The built-in certificate template is tested end-to-end with Chinese content.

Can I use the PDFs commercially?

Yes. Documents you generate are yours — invoices, reports and certificates for your business or your clients, with no attribution required.

How is this different from an HTML-to-PDF service?

PDFForge is not an HTML converter. You send a typesetting template plus structured data, so the layout is fixed by the template and every render of the same input is identical and reproducible — no browser quirks, no CSS surprises, nothing to host or maintain on your side.