canonical: https://jentic.com/apis/pdftemplateapi.com/pdftemplateapi

# Pdftemplateapi TemplateFox API

Jentic publishes the only available OpenAPI specification for TemplateFox API, keeping it validated and agent-ready. TemplateFox API generates PDF documents from HTML/CSS templates with Jinja2 templating support. The service offers both synchronous and asynchronous PDF creation, template management with field extraction, job tracking, account monitoring, and S3 integration for direct file delivery. It provides 12 endpoints covering the full document generation lifecycle from template upload to PDF output.

## For AI agents

Generate PDFs from HTML/CSS templates with Jinja2 data binding. Supports sync and async generation, template management, job tracking, and S3 delivery integration.

## Scope

Does not handle URL-to-PDF conversion, visual template design via API, or document signing - use for HTML/CSS/Jinja2 template-to-PDF generation only.

## Capabilities

- Generate PDFs from HTML/CSS templates with Jinja2 variable substitution
- Process PDF generation asynchronously with job status tracking
- Extract template field definitions for dynamic data binding
- Deliver generated PDFs directly to an S3 bucket via integration
- Monitor account usage and transaction history
- Manage templates with listing and field introspection

## Use cases

### Dynamic Document Generation from Templates

Generate personalized PDF documents by rendering HTML/CSS templates with Jinja2 variable substitution. TemplateFox accepts template data as JSON and produces formatted PDFs with full CSS styling support. This enables non-developers to maintain document layouts in HTML while developers supply dynamic data via API calls.

Example prompt: POST to `/v1/pdf/create` with template ID and Jinja2 data variables to generate a PDF document synchronously

### Async Batch Document Processing

Queue multiple PDF generation jobs and track them independently. POST to `/v1/pdf/create-async` to start generation, then poll `/v1/pdf/jobs/{job_id}` for status. This handles high-volume scenarios where generating hundreds of documents without blocking the calling application is required.

Example prompt: POST to `/v1/pdf/create-async` with template data, then GET `/v1/pdf/jobs/{job_id}` to poll until the job status shows completion

### Template Field Discovery and Validation

Extract the list of required fields from a template before generating a document. GET `/v1/templates/{template_id}/fields` returns the variable names expected by the Jinja2 template, enabling upstream systems to validate data completeness before submitting a generation request.

Example prompt: GET `/v1/templates/{template_id}/fields` to retrieve required field names, then validate the data payload contains all fields before calling `/v1/pdf/create`

### AI Agent PDF Workflow via Jentic

AI agents produce PDF documents as part of automated pipelines by calling TemplateFox through Jentic. The agent discovers template operations, inspects required fields, and generates documents without managing API keys or understanding Jinja2 template syntax directly.

Example prompt: Search Jentic for 'generate PDF from HTML template', load the `/v1/pdf/create` operation schema, and execute with template ID and data variables

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/pdf/create` | Generate a PDF synchronously from a template |
| POST | `/v1/pdf/create-async` | Queue async PDF generation from a template |
| GET | `/v1/pdf/jobs/{job_id}` | Check the status of an async PDF job |
| GET | `/v1/pdf/jobs` | List all PDF generation jobs |
| GET | `/v1/templates` | List all available templates |
| GET | `/v1/templates/{template_id}/fields` | Get required fields for a template |
| GET | `/v1/account` | Retrieve account details and usage |
| POST | `/v1/integrations/s3` | Configure S3 integration for PDF delivery |

## Key resources

- **PDF Generation** — Create PDFs synchronously or asynchronously from HTML/CSS templates
- **Jobs** — Track async PDF generation job status and retrieve results
- **Templates** — List templates and extract required field definitions
- **Account** — Monitor account details and transaction history
- **S3 Integration** — Configure and test S3 bucket integration for PDF delivery

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 65 / 100
- **Maturity:** AI-Aware
- **Dimensions:**
  - Foundational Compliance: 90 / 100
  - Developer Experience & Jentic Compatibility: 63 / 100
  - AI-Readiness & Agent Experience: 47 / 100
  - Agent Usability: 94 / 100
  - Security: 50 / 100
  - AI Discoverability: 100 / 100
- **View full report:** https://jentic.com/apis/pdftemplateapi.com/pdftemplateapi/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring TemplateFox by hand means setting the x-api-key header, deciding between synchronous `/v1/pdf/create` and the async job flow with its status polling, and threading template IDs and data variables yourself. Through Jentic you install once, import the TemplateFox API from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** TemplateFox puts the identifier in the URL path for job and template reads (`/v1/pdf/jobs/{job_id}`, `/v1/templates/{template_id}/fields`), and you choose the operations the agent may call: a rule can allow rendering PDFs and reading job status while excluding the S3 integration setup unless you add it.
- **Credential handling:** Your TemplateFox API key is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'generate a PDF from an HTML template', and Jentic returns the matching TemplateFox operation with its input schema for template ID and data variables so the agent calls the right endpoint without browsing the reference docs.

## Related APIs

- **CraftMyPDF API** — Template-based PDF generation with a visual drag-and-drop editor
- **PDFMonkey API** — Template-based PDF generation with document card management
- **CloudConvert API** — Multi-format file conversion for post-processing PDFs

## FAQ

### Why is there no official OpenAPI spec for TemplateFox API?

TemplateFox (pdftemplateapi.com) does not publish an OpenAPI specification. Jentic generates and maintains this spec so that AI agents and developers can call TemplateFox 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 TemplateFox API use?

TemplateFox API uses an API key passed in the x-api-key header. You obtain the key from your account dashboard. Through Jentic, this key is stored encrypted in the vault and injected into request headers automatically.

### What templating language does TemplateFox support?

TemplateFox uses Jinja2 for template variable substitution within HTML/CSS templates. You define variables with double curly braces in your HTML template, then pass corresponding values as JSON in the API request body.

### How do I check which fields a template requires?

GET `/v1/templates/{template_id}/fields` returns the list of Jinja2 variable names expected by the template. Use this to validate your data payload before submitting a generation request to `/v1/pdf/create.`

### How do I generate PDFs through Jentic with TemplateFox?

Install with pip install jentic, search for 'generate PDF from HTML template', and Jentic returns the `/v1/pdf/create` operation schema. Execute with your template ID and data variables. Jentic handles the x-api-key header injection automatically.

### Can I deliver generated PDFs directly to S3?

Yes. Configure your S3 bucket credentials via POST `/v1/integrations/s3`, test the connection with `/v1/integrations/s3/test`, and generated PDFs will be delivered directly to your bucket without needing to download them from the API response.

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

Yes. Because you run Jentic One yourself, your own rules decide which TemplateFox operations and credentials the agent can use. For example, you can allow it to render PDFs with `/v1/pdf/create` and read job status at `/v1/pdf/jobs/{job_id}` while excluding the S3 integration setup at `/v1/integrations/s3` unless you add it. Your API key stays in your own instance and is injected only for the operations you have permitted.
