API reference

Endpoints overview

Every /v1 endpoint — pending the generated OpenAPI reference.

Every endpoint lives under https://api.pdf-forge.dev and requires an API key in the Authorization: Bearer pf_... header. Requests and responses are JSON, except the generation and tool endpoints that return the application/pdf binary directly.

Generated reference coming

This is a hand-written panorama of the /v1 surface. A full OpenAPI reference (per-endpoint request/response schemas) is on the way.

Generation

MethodPathPurpose
POST/v1/generate/htmlRender an HTML string to PDF.
POST/v1/generate/urlRender a live URL to PDF.
POST/v1/generate/templateRender a stored HTML template with data.

See Generate.

Templates

HTML/blocks templates authored in the dashboard.

MethodPathPurpose
GET/v1/templatesList your templates.
POST/v1/templatesCreate a template.
GET/v1/templates/:idGet one template.
PUT/v1/templates/:idUpdate a template.
DELETE/v1/templates/:idDelete a template.
POST/v1/templates/:id/previewRender a preview.

See Templates & variables.

PDF templates

An imported PDF + {{variables}}, filled with new data.

MethodPathPurpose
GET/v1/pdf-templatesList your PDF templates.
POST/v1/pdf-templatesCreate a template from a base PDF + variable map.
GET/v1/pdf-templates/:idGet one template (incl. base PDF).
POST/v1/pdf-templates/:id/renderFill the variables → PDF binary.

See PDF templates.

Tools

The /v1/pdf/* toolkit. Each takes a base64 pdf (or pdfs/images) and mostly returns a PDF binary; the perception/inspection ops return JSON.

MethodPathPurpose
POST/v1/pdf/mergeConcatenate PDFs.
POST/v1/pdf/splitOne PDF per page.
POST/v1/pdf/rotateRotate pages.
POST/v1/pdf/extract-pagesKeep a subset of pages.
POST/v1/pdf/remove-pagesDrop a subset of pages.
POST/v1/pdf/compressShrink file size.
POST/v1/pdf/from-imagesBuild a PDF from images.
POST/v1/pdf/from-urlRender a URL to PDF.
POST/v1/pdf/to-imageRasterize pages to PNG.
POST/v1/pdf/thumbnailPage 1 → PNG thumbnail.
POST/v1/pdf/watermarkStamp a text/image watermark.
POST/v1/pdf/protectEncrypt with a password.
POST/v1/pdf/unlockRemove a known password.
POST/v1/pdf/inspectQuality/structure report (JSON).
POST/v1/pdf/redactTrue redaction — remove content under regions.
POST/v1/pdf/importRestamp: same design, replaced text.
POST/v1/pdf/annotateBurn editor objects into pages.
POST/v1/pdf/infoBasic document info (JSON).
POST/v1/pdf/perceiveStructured element/region map (JSON).
POST/v1/pdf/extract-textExtract text spans (JSON).
POST/v1/pdf/ocrOCR scanned pages.
POST/v1/pdf/edit-textRewrite text in place by id.
POST/v1/pdf/form/inspectDetect native AcroForm fields (JSON).
POST/v1/pdf/form/fillFill native AcroForm fields.
POST/v1/pdf/strip-watermarkStructurally remove overlay watermarks.
POST/v1/pdf/page-numbersStamp page numbers.

Legacy top-level aliases POST /v1/merge and POST /v1/split are kept for back-compat. See PDF tools.

Account

MethodPathPurpose
GET/v1/usageCurrent usage & quota.
GET/v1/logsRecent request logs.
GET/v1/keysList API keys.
POST/v1/keysCreate an API key.
DELETE/v1/keys/:idRevoke a key.
POST/v1/keys/:id/rotateRotate a key.
GET/v1/jobsList async jobs.
GET/v1/jobs/:idGet one job.

Next steps

On this page