canonical: https://jentic.com/apis/pdfgeneratorapi.com/pdfgeneratorapi-main

# PDF Generator API

Jentic publishes the only available OpenAPI specification for PDF Generator API, keeping it validated and agent-ready. PDF Generator API enables programmatic generation of transactional PDF documents from reusable templates. Users design templates using a browser-based drag-and-drop editor, then populate them with dynamic data via the API to produce invoices, contracts, reports, and other documents. The service supports workspace-based organization and template copying for multi-tenant use cases.

## For AI agents

Generate PDF documents from reusable templates populated with dynamic data. Manage templates, workspaces, and PDF output through a REST interface.

## Scope

Does not handle HTML-to-PDF conversion, file format conversion, or e-signature - use for template-based PDF generation and template management only.

## Capabilities

- Generate PDF documents by merging dynamic data into pre-designed templates
- Manage document templates with create, copy, and delete operations
- Produce PDF output directly from a template with a single API call
- Organize templates and access across isolated workspaces
- Open the browser-based template editor for visual design via API
- Batch-generate PDFs from template collections with merged datasets

## Use cases

### Transactional Document Generation

Generate invoices, receipts, and order confirmations by merging transaction data into pre-designed PDF templates. PDF Generator API accepts a template ID and a JSON data payload, then returns a rendered PDF. This approach separates document design from application logic, allowing non-developers to update templates without code changes.

Example prompt: POST to /templates/{templateId}/output with order data JSON to generate a completed invoice PDF

### Multi-Tenant Document Management

Organize document templates across workspaces for SaaS platforms serving multiple clients. Each workspace isolates templates and access, enabling white-label document generation where each tenant has their own branded templates without cross-contamination.

Example prompt: GET /workspaces/{workspaceId} to retrieve workspace configuration, then GET /templates to list templates available in that workspace

### Contract and Agreement Generation

Produce legal contracts, NDAs, and service agreements from standardized templates populated with party details, dates, and terms. The drag-and-drop editor allows legal teams to maintain templates independently, while the API handles high-volume generation for sales and onboarding workflows.

Example prompt: Copy a template via POST /templates/{templateId}/copy, then generate the contract PDF with party data using POST /templates/{newTemplateId}/output

### AI Agent Document Workflow via Jentic

AI agents generate PDF documents as part of automated workflows by calling PDF Generator API through Jentic. The agent discovers template operations via intent search, loads the schema, and executes calls to list templates and generate output without manual API integration or JWT management.

Example prompt: Search Jentic for 'generate PDF from template', load the /templates/{templateId}/output operation, and execute with dynamic data to produce a PDF

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| GET | /templates | List all available templates |
| POST | /templates/output | Generate PDF from template data without saving |
| GET | /templates/templateId | Retrieve a specific template by ID |
| POST | /templates/templateId/copy | Create a copy of an existing template |
| GET | /templates/templateId/editor | Open the template editor |
| POST | /templates/templateId/output | Generate PDF output from a specific template |
| GET | /workspaces/workspaceId | Retrieve workspace details |

## Key resources

- **Templates** — Create, list, copy, delete, and open editor for document templates
- **Template Output** — Generate PDF output from a template merged with data
- **Workspaces** — Manage isolated workspaces for multi-tenant template organization

## Why Jentic

- **Setup:** Wiring the PDF Generator API by hand means signing JWT bearer tokens with your API secret, carrying workspace context, and sequencing template listing, output, and workspace calls against the us1 host yourself. Through Jentic you install once, import PDF Generator API from the API Directory, store the credentials once, and your agent calls it.
- **Permission scoping:** PDF Generator API carries its data and options in the request body and identifies a template by id in the path, so scope the agent by the operations it needs, such as listing templates or generating output from a template. You choose that set, so operations like copying a template are not included unless you add them.
- **Credential handling:** Your PDF Generator API secret is stored once, encrypted, by your own Jentic One instance, which signs and rotates the scoped JWT and injects it at execution time. The raw secret never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'generate a PDF from a template', and Jentic returns the matching PDF Generator API operation with its input schema so the agent calls the right endpoint without working out JWT signing from the reference docs.

## Related APIs

- **PDF Generator API (alternate spec)** — Same service with an alternate API specification version
- **CraftMyPDF API** — Template-based PDF generation with a visual editor
- **PDFMonkey API** — Template-based PDF generation with async document processing

## FAQ

### Why is there no official OpenAPI spec for PDF Generator API?

PDF Generator API does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call PDF Generator API via structured tooling. It is validated against the live API and kept up to date. Get started with Jentic One, the self-hosted execution layer.

### What authentication does the PDF Generator API use?

PDF Generator API uses JWT (JSON Web Token) bearer authentication. You sign a token with your API secret and workspace identifier, then pass it in the Authorization header. Through Jentic, JWT generation and rotation are handled automatically in the credential vault.

### Can I generate a PDF from a template with dynamic data?

Yes. POST to /templates/{templateId}/output with a JSON body containing your data fields. The API merges the data into the template placeholders and returns a rendered PDF document.

### How do workspaces work in the PDF Generator API?

Workspaces isolate templates and access for multi-tenant scenarios. Each workspace has its own set of templates. You access workspace details via GET /workspaces/{workspaceId} and templates are scoped to the workspace specified in your JWT.

### How do I generate PDFs through Jentic with this API?

Install the SDK with pip install jentic, then search for 'generate PDF from template'. Jentic returns the /templates/{templateId}/output operation schema. Execute with your template ID and data payload. Jentic handles JWT signing and workspace scoping automatically.

### Can I copy an existing template to create a variant?

Yes. POST to /templates/{templateId}/copy creates a duplicate of the specified template. You can then modify the copy independently, which is useful for creating client-specific variants from a base template.

### Can I limit what my agent is allowed to do with the PDF Generator API?

Yes. Because you run Jentic One yourself, your own rules decide which PDF Generator API operations and credentials the agent may use. You can grant only the calls it needs, such as listing templates with GET /templates or generating output from a template with POST /templates/{templateId}/output, and leave out others. Operations like copying a template with POST /templates/{templateId}/copy stay unavailable unless you add them.
