npm install, packaged as a Docker image:
http://localhost:3000 (substitute your deployment). Authentication is optional: set the FORME_API_KEY environment variable on the container and pass it as a Bearer token; with no key set, endpoints are open. See Self-Hosting for full setup.
The hosted API at api.formepdf.com has been retired — Forme is open-source only. If you’d rather not run a server at all, every operation here is also a function call in @formepdf/core.
Render PDF (sync)
POST /v1/render/:slug
Renders a PDF from a template and returns the file directly.
Path params: slug — your template’s URL slug.
Body: JSON object passed as template data. All fields are forwarded to your JSX template function.
Optional fields:
s3— upload the PDF to your S3 bucket instead of returning bytes (see S3 Upload below)save—boolean, defaulttrue. Every render is auto-saved to your Documents withsource: "generated". Setfalseto skip saving.saveName—string, optional custom document name. Default:{slug}-{YYYY-MM-DD}(e.g.invoice-2026-04-03).metadata—object, optional developer-defined key-value pairs stored on the saved document. Useful for tagging renders with your own identifiers (customer ID, department, environment, etc.). See Metadata below.
200 OK with Content-Type: application/pdf body.
Extract Embedded Data
POST /v1/extract
Extract embedded JSON data from a PDF that was rendered with embedData.
Send the raw PDF bytes as the request body with Content-Type: application/pdf.
200 OK
404 if no embedded data is found.
Flatten Forms
POST /v1/render/:slug?flattenForms=true
Render a PDF with all form fields flattened — interactive fields are converted to static content. Useful for filling a form template with data and sending a non-editable PDF.
Pass flattenForms=true as a query parameter on any render endpoint (sync or async).
Error Format
All errors return JSON:400— Invalid request (missing fields, bad S3 config)401— Missing or invalid API key404— Template or resource not found429— Rate limit or usage limit exceeded502— S3 upload failed500— Internal server error