Skip to Content
Introduction

Reforgio

Reforgio turns templates into documents. Design an invoice, report, or certificate once in the dashboard , then render it to PDF or XLSX from your code with a single call.

30 seconds to a PDF

render-invoice.ts
import { ReforgioServer } from '@reforgio/sdk-core/server' const reforgio = new ReforgioServer(process.env.REFORGIO_SECRET_KEY!) const doc = await reforgio.render('YOUR_TEMPLATE_ID', { invoice_number: 'INV-2026-001', customer_name: 'ACME Corp', items: [{ name: 'Design work', quantity: 10, price: 120 }], }) console.log(doc.downloadUrl) // presigned URL to the finished PDF

Every render returns the same shape:

FieldTypeMeaning
documentIdstringID of the generated document — use it with GET /v1/downloads/:id to get a fresh link later
status'completed' | 'failed'Render outcome
downloadUrlstringPresigned download URL for the finished file (time-limited)
fileSizeBytesnumberSize of the generated file
renderTimeMsnumberServer-side render duration

How it fits together

  • Dashboard  — sign up, manage API keys, and build templates visually (HTML, table, and canvas sections with typed variables).
  • APIhttps://api.reforg.io, versioned under /v1, authenticated with an x-api-key header. Full interactive reference lives at api.reforg.io/api/v1 .
  • SDKs@reforgio/sdk-core (TypeScript client for browser and Node.js) and @reforgio/sdk-react (provider + hooks).

Two ways to render:

  1. From your backend with a secret key (sk_live_…) — full access, simplest setup. Start here.
  2. Directly from the browser with a public key (pk_live_…) — safe to ship to clients thanks to a domain allowlist and a signed user handshake. See Frontend rendering.