Core feature

Describe it. Get a template.

Magic Templates turns a plain-English description into a reusable, print-ready PDF template in about a minute. No HTML, no CSS, no design tools — then it's one API call per document, forever.

Try it free — included on every plan
POST /v1/templates/magic
Describe your document
Understanding your request
Writing HTML & CSS
Rendering print-ready PDF
template.html

How it works

Three steps, about a minute, no design skills required.

1

Describe it

Send a sentence to POST /v1/templates/magic — "a modern invoice with my brand colors and French labels." Optionally include a sample data payload.

2

We build it

The AI writes a self-contained HTML/CSS template with mustache placeholders ({{fields}}, loops, conditionals) and saves it to your account as custom:name.

3

Use it forever

Call POST /v1/generate with your data and that template name. Same template, unlimited documents — no AI cost after the first build.

People describe things like…

If you can describe it, PDFMint can build it.

"A freelance invoice with a logo, hourly line items and a tax row"
"An event ticket with a QR placeholder and seat number"
"A rental agreement with signature lines"
"A gym membership card, dark theme"
"A shipping label with barcode area"
"A medical prescription, clinic letterhead"
"A restaurant menu, two columns, elegant serif"

One request to create, one to reuse

Create the template once, then generate as many documents as you like.

# 1. Create a reusable template from a description
curl -X POST https://pdfmintapi.com/v1/templates/magic \
  -H "Authorization: Bearer pm_your_key" \
  -H "Content-Type: application/json" \
  -d '{"description":"A clean invoice with a navy header, itemized table with tax, and a PAID stamp","name":"studio-invoice"}'
# → { "template": "custom:studio-invoice", ... }

# 2. Generate documents from it — forever, no AI cost
curl -X POST https://pdfmintapi.com/v1/generate \
  -H "Authorization: Bearer pm_your_key" \
  -H "Content-Type: application/json" \
  -d '{"template":"custom:studio-invoice","data":{ ... }}' --output invoice.pdf

Your next template is one sentence away

Free tier includes Magic Templates — no credit card, 100 PDFs a month.

Get your free API key →