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

# Mint PDFMint API

The PDFMint API renders HTML, Markdown, a public URL, or a stored template into a PDF, and screenshots the same sources to PNG or JPEG. Renders return binary bytes, a temporary hosted link, or base64, and can run asynchronously with a job you poll or a webhook notified on completion. Page options cover formats from A0 to Ledger, margins, headers and footers, page numbers, cover pages, watermarks, and password encryption, and a merge operation combines up to 50 PDFs into one. Stored templates with {{placeholders}} are filled from a data object at render time.

## For AI agents

Render HTML, Markdown, URLs, or stored templates to PDF or PNG/JPEG, merge PDFs, and poll async render jobs with PDFMint. Authenticated with a Bearer key or an x-api-key header.

## Scope

Does not handle PDF text extraction, OCR, form filling of existing PDFs, or e-signatures. Use for rendering HTML, Markdown, URLs, and templates to PDF or images, and merging PDFs only.

## Capabilities

- Render HTML, Markdown, or a public URL to a PDF with page format, margin, and landscape options
- Fill a stored template's {{placeholders}} from a data object and render it to PDF
- Screenshot HTML, Markdown, or a URL to PNG or JPEG, including full-page captures
- Merge up to 50 PDFs from URLs or base64 into a single document
- Queue a render asynchronously with a webhookUrl and poll the job until it finishes
- Add watermarks, page numbers, a cover page, and password protection to a generated PDF
- Check the account's credit balance and plan before running a batch

## Use cases

### Agent-Generated Documents Through Jentic

An AI agent that drafts a report or invoice in HTML or Markdown calls PDFMint to turn it into a downloadable PDF and returns a hosted link to the user. Through Jentic the agent finds the PDF render operation by intent, sends the markdown or html field with output set to url, and receives a temporary file link without handling the key itself.

Example prompt: Render a Markdown weekly report headed '# Weekly Report' to an A4 PDF with pageNumbers true and output 'url', then return the hosted link

### Templated Invoices and Certificates

Billing and training systems store an HTML template once under a name, then render it per customer by passing values for its {{placeholders}} in data. Strict mode refuses to return a document with unfilled placeholders, so a missing field fails loudly instead of producing a blank invoice.

Example prompt: Store a template named 'invoice' with HTML containing {{customer}} and {{total}}, then render it to PDF with data {"customer": "Acme Ltd", "total": "$420.00"} and strict true

### Web Page Archiving and Screenshots

Teams capture a public page as a PDF for records, or as a PNG or JPEG for previews and social cards, with control over viewport width, device scale factor, and full-page capture. A waitFor option holds the render until a selector appears or the network is idle so dynamic content is included.

Example prompt: Screenshot 'https://example.com' as a full-page PNG at width 1280 and return it as base64

### Combining Documents into One PDF

Document workflows that produce separate files, such as a cover letter, a contract, and an appendix, merge them into one PDF from public URLs or base64 inputs, up to 50 per request, and set metadata such as title and author on the result.

Example prompt: Merge three PDFs from their public URLs into one file named 'contract-pack.pdf' and return a hosted link

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/pdf` | Render HTML, Markdown, a URL, or a template to PDF |
| POST | `/v1/image` | Render HTML, Markdown, or a URL to PNG or JPEG |
| POST | `/v1/merge` | Merge 2-50 PDFs into one |
| GET | `/v1/jobs/{id}` | Poll an asynchronous render job |
| PUT | `/v1/templates/{name}` | Create or replace a stored template |
| GET | `/v1/templates` | List stored templates |
| GET | `/v1/me` | Account balance and plan |

## Key resources

- **PDF Renders** — HTML, Markdown, URL, or template renders to PDF with page, header, footer, and security options
- **Image Renders** — PNG or JPEG screenshots of HTML, Markdown, or a URL
- **Merges** — Combine 2 to 50 PDFs into one document
- **Jobs** — Asynchronous render jobs you poll or cancel by id
- **Templates** — Stored HTML templates with {{placeholders}} filled at render time
- **API Keys** — Issue, list, and revoke account keys

## 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:** 51 / 100
- **Maturity:** Foundational
- **Dimensions:**
  - Foundational Compliance: 76 / 100
  - Developer Experience & Jentic Compatibility: 64 / 100
  - AI-Readiness & Agent Experience: 26 / 100
  - Agent Usability: 94 / 100
  - Security: 55 / 100
  - AI Discoverability: 80 / 100
- **View full report:** https://jentic.com/apis/mintapis.com/mintapis/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 PDFMint by hand means choosing between its Bearer and x-api-key header styles, handling binary, url, or base64 responses, and polling async jobs or wiring a webhook. Through Jentic you install once, import PDFMint from the API Directory, store the key once, and your agent calls it.
- **Permission scoping:** PDFMint puts the template name in the URL path (`/v1/templates/{name}`), so a rule can pin template reads and writes to one named template. Render content travels in the request body, so for renders rules bound which operations your agent may call, not what it renders, and sensitive ones like issuing or revoking API keys are not included unless you add them.
- **Credential handling:** Your PDFMint 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 'convert HTML to PDF' or 'merge PDF files', and Jentic returns the matching PDFMint operation with its input schema so the agent calls the right endpoint without reading the reference docs.

## Related APIs

- **PDFMonkey** — Template-based PDF generation from stored document templates
- **Html2PDF** — HTML and URL to PDF conversion API
- **Urlbox** — Website screenshot and rendering API
- **PDF.co** — PDF parsing, extraction, and editing tools

## FAQ

### What authentication does the PDFMint API use?

Per its OpenAPI spec, the PDFMint API accepts a key either as `Authorization: Bearer <key>` or in the `x-api-key` header, with keys starting `pm_live_`. A few operations are public and need no credential: the keyless HTML demo render and the forgot-password and reset-password flows. Through Jentic the key is stored once, encrypted, by your own Jentic One instance and injected at call time.

### Can I fill a template with data and render it to PDF with the PDFMint API?

Yes. Store HTML containing {{placeholders}} with the create-or-replace template operation, then call the PDF render with template set to the stored name and data holding the values. The template response lists the placeholders it uses, and strict mode returns a 400 instead of a document with unfilled fields.

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

Yes. For example, write a rule that allows only the PDF render, image render, and job-poll operations, so the agent can produce documents and check async jobs while key issuance, key revocation, and template deletion stay out of reach, and every call it makes is logged.

### What are the rate limits for the PDFMint API?

The PDFMint OpenAPI spec states that every authenticated endpoint is limited to 120 requests per minute per account with a burst of 30, reported in the X-RateLimit-Limit, X-RateLimit-Burst, and X-RateLimit-Remaining headers. A 429 response carries Retry-After. Each render or merge costs 1 credit.

### How do I render a PDF with PDFMint through Jentic?

Search Jentic for the intent 'convert HTML to PDF', which returns the PDFMint render operation on `/v1/pdf` with its input schema; the agent sends html, markdown, url, or template plus any page options, and gets the PDF back as binary, a hosted url, or base64. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Is there a PDFMint MCP server?

You don't need an MCP server to give your agent the PDFMint API. Jentic connects it directly from the API Directory: import it, store your key once, and your agent calls the render, merge, and template operations. Operations are discovered on demand, so no extra tool definitions are loaded into the agent's context.
