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
| Method | Path | Purpose |
|---|---|---|
POST | /v1/generate/html | Render an HTML string to PDF. |
POST | /v1/generate/url | Render a live URL to PDF. |
POST | /v1/generate/template | Render a stored HTML template with data. |
See Generate.
Templates
HTML/blocks templates authored in the dashboard.
| Method | Path | Purpose |
|---|---|---|
GET | /v1/templates | List your templates. |
POST | /v1/templates | Create a template. |
GET | /v1/templates/:id | Get one template. |
PUT | /v1/templates/:id | Update a template. |
DELETE | /v1/templates/:id | Delete a template. |
POST | /v1/templates/:id/preview | Render a preview. |
PDF templates
An imported PDF + {{variables}}, filled with new data.
| Method | Path | Purpose |
|---|---|---|
GET | /v1/pdf-templates | List your PDF templates. |
POST | /v1/pdf-templates | Create a template from a base PDF + variable map. |
GET | /v1/pdf-templates/:id | Get one template (incl. base PDF). |
POST | /v1/pdf-templates/:id/render | Fill 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.
| Method | Path | Purpose |
|---|---|---|
POST | /v1/pdf/merge | Concatenate PDFs. |
POST | /v1/pdf/split | One PDF per page. |
POST | /v1/pdf/rotate | Rotate pages. |
POST | /v1/pdf/extract-pages | Keep a subset of pages. |
POST | /v1/pdf/remove-pages | Drop a subset of pages. |
POST | /v1/pdf/compress | Shrink file size. |
POST | /v1/pdf/from-images | Build a PDF from images. |
POST | /v1/pdf/from-url | Render a URL to PDF. |
POST | /v1/pdf/to-image | Rasterize pages to PNG. |
POST | /v1/pdf/thumbnail | Page 1 → PNG thumbnail. |
POST | /v1/pdf/watermark | Stamp a text/image watermark. |
POST | /v1/pdf/protect | Encrypt with a password. |
POST | /v1/pdf/unlock | Remove a known password. |
POST | /v1/pdf/inspect | Quality/structure report (JSON). |
POST | /v1/pdf/redact | True redaction — remove content under regions. |
POST | /v1/pdf/import | Restamp: same design, replaced text. |
POST | /v1/pdf/annotate | Burn editor objects into pages. |
POST | /v1/pdf/info | Basic document info (JSON). |
POST | /v1/pdf/perceive | Structured element/region map (JSON). |
POST | /v1/pdf/extract-text | Extract text spans (JSON). |
POST | /v1/pdf/ocr | OCR scanned pages. |
POST | /v1/pdf/edit-text | Rewrite text in place by id. |
POST | /v1/pdf/form/inspect | Detect native AcroForm fields (JSON). |
POST | /v1/pdf/form/fill | Fill native AcroForm fields. |
POST | /v1/pdf/strip-watermark | Structurally remove overlay watermarks. |
POST | /v1/pdf/page-numbers | Stamp page numbers. |
Legacy top-level aliases POST /v1/merge and POST /v1/split are kept for
back-compat. See PDF tools.
Account
| Method | Path | Purpose |
|---|---|---|
GET | /v1/usage | Current usage & quota. |
GET | /v1/logs | Recent request logs. |
GET | /v1/keys | List API keys. |
POST | /v1/keys | Create an API key. |
DELETE | /v1/keys/:id | Revoke a key. |
POST | /v1/keys/:id/rotate | Rotate a key. |
GET | /v1/jobs | List async jobs. |
GET | /v1/jobs/:id | Get one job. |
Next steps
- Authentication — get and send your key.
- Your first PDF — a working request in five minutes.
- JavaScript SDK — a typed client over this surface.