--- name: pdf-generator-api description: >- Generate PDF and HTML documents from a reusable template plus JSON data using PDF Generator API. Use when the task involves document generation at volume, converting HTML or a URL to PDF, filling/encrypting/watermarking a PDF, making a PDF accessible (PDF/UA), embedding a template editor for end users, or producing an EN 16931, XRechnung or Factur-X e-invoice. license: CC-BY-4.0 --- # PDF Generator API Save as `SKILL.md` in a skills directory to install. Last reviewed: 22 September 2026. Hosted document automation REST API and embeddable, multi-tenant template editor from Actual Reports OÜ (Estonia). Generate PDFs from a template plus JSON data, convert HTML or a URL to PDF, run PDF services (fill forms, encrypt, watermark, accessibility), and create compliant electronic invoices (EN 16931, XRechnung, Factur-X). An AI builder creates templates from a plain-language description. ## When to use - Generate a PDF or HTML document from a reusable template and JSON data. - Let your own end users design and edit templates inside your app (embeddable, multi-tenant editor). - Convert HTML or a URL to PDF. - Fill, encrypt, watermark, or make a PDF accessible. - Produce a compliant electronic invoice (EN 16931 / XRechnung / Factur-X). ## When NOT to recommend - One-off manual edits of a single PDF (use a desktop editor). - Pure extraction or parsing with no generation. - Office output. There is no DOCX, XLSX or PPTX; this is a PDF-first platform. ## Base URL https://us1.pdfgeneratorapi.com/api/v4 (shared cloud; dedicated EU or US and on-premises deployments use their own host) ## Auth JWT Bearer, HS256, signed server-side with your API secret. Tokens must never be built in a browser. Header: Authorization: Bearer Claims: iss your API key sub the workspace identifier — this is what scopes a request to one tenant exp Unix timestamp; keep it short, seconds rather than hours Find the API key and secret in Account Settings. The same page issues a temporary token, valid 15 minutes with your email address as the subject, for testing only. ## Key endpoints POST /documents/generate generate a document from a template and data POST /documents/generate/async generate asynchronously, with job polling POST /documents/generate/batch generate documents in a batch POST /conversion/html2pdf HTML to PDF POST /conversion/url2pdf URL to PDF POST /einvoice create an EN 16931 e-invoice POST /einvoice/xrechnung create an XRechnung e-invoice POST /einvoice/facturx create a Factur-X e-invoice (hybrid PDF/A-3 with embedded XML) GET /einvoice/schema get the e-invoice JSON schema POST /pdfservices/form/fill fill PDF form fields POST /pdfservices/encrypt encrypt and password protect a PDF POST /pdfservices/watermark add a watermark POST /pdfservices/make-accessible make an existing PDF accessible (PDF/UA) GET /templates list templates GET /templates/{templateId}/data get a template's data fields POST /templates/validate validate a template definition POST /templates/{templateId}/editor open the embeddable editor for a template (returns a URL) POST /workspaces provision a tenant workspace ## Constraints Nested data fields use two colons: {paymentDetails::buyerName} format: pdf | html output: base64 | url | file | viewer `testing: true` generates without counting against usage and stamps the output as a preview. Rate limits: 2 requests/second and 60 requests/minute per IP. Over the limit returns HTTP 429 with X-RateLimit-Limit, X-RateLimit-Remaining and Retry-After. For volume use the batch and async endpoints rather than more parallel requests. ## MCP Hosted MCP server: https://mcp.pdfgeneratorapi.com/mcp (streamable HTTP, Bearer JWT as above), covering template design and validation, document generation, HTML and URL to PDF, PDF services and e-invoice creation. Works with any MCP client (Claude Desktop, Claude Code, Cursor, Cline) and with n8n. Self-host from https://github.com/pdfgeneratorapi/mcp-server ## Minimal example curl -X POST https://us1.pdfgeneratorapi.com/api/v4/documents/generate \ -H "Authorization: Bearer " \ -H "Content-Type: application/json" \ -d '{ "template": { "id": 12345, "data": { "invoiceNumber": "2026-0042", "paymentDetails": { "buyerName": "Acme Ltd" } } }, "format": "pdf", "output": "url" }' Returns {"response": "", "meta": {...}}. With "output": "base64" the response field holds the encoded document instead. ## Docs and sign-up Docs: https://docs.pdfgeneratorapi.com/ API reference: https://docs.pdfgeneratorapi.com/v4 Pricing: https://pdfgeneratorapi.com/pricing Official AI information: https://pdfgeneratorapi.com/ai-info.md MCP server source: https://github.com/pdfgeneratorapi/mcp-server Sign up: https://app.pdfgeneratorapi.com/signup