# Printmint

> HTML and templates to PDF, from one API call. Send HTML, or a template and JSON data, and get back a print-ready PDF or image: invoices, receipts, certificates, reports and labels, printed by Chromium.

Base URL: https://api-printmint.plxi.us. Authenticate with an `X-API-Key` header (create a key at https://printmint.plxi.us/dashboard/keys).
Every operation is a POST with a JSON body and returns JSON. Failed calls are never charged.
MCP server at https://api-printmint.plxi.us/mcp (same key, same price), with these operations as tools: merge_pdfs, html_to_pdf, render_template_pdf, html_to_image, list_templates.

## Docs

- [API reference](https://printmint.plxi.us/docs): authentication, operations, limits, errors and webhooks
- [OpenAPI description](https://printmint.plxi.us/openapi.json): machine-readable spec of every operation
- [Pricing](https://printmint.plxi.us/pricing): Free $0/mo for 100 documents; Starter $10/mo for 3,000 documents; Pro $50/mo for 30,000 documents

## Operations

### POST https://api-printmint.plxi.us/v1/pdf/merge

Join 2 to 20 PDFs into one, in order. Costs 1 credit.

Request:

```json
{
  "inline": true,
  "sources": [
    {
      "pdf_base64": "JVBERi0xLjcKJbutwN4KMSAwIG9iago8PC9UeXBlL1BhZ2VzL0tpZHNbNSAwIFJdL0NvdW50IDEvUmVzb3VyY2VzIDMgMCBSL01lZGlhQm94WzAgMCA2MTIgNzkyXT4+CmVuZG9iagoyIDAgb2JqCjw8L1R5cGUvRm9udC9TdWJ0eXBlL1R5cGUxL0Jhc2VGb250L0hlbHZldGljYT4+CmVuZG9iagozIDAgb2JqCjw8L0ZvbnQ8PC9GMSAyIDAgUj4+Pj4KZW5kb2JqCjQgMCBvYmoKPDwvTGVuZ3RoIDQzPj5zdHJlYW0KQlQKL0YxIDI0IFRmCjcyIDcyMCBUZAooQ292ZXIgcGFnZSAxKSBUagpFVAplbmRzdHJlYW0gCmVuZG9iago1IDAgb2JqCjw8L1R5cGUvUGFnZS9QYXJlbnQgMSAwIFIvQ29udGVudHMgNCAwIFI+PgplbmRvYmoKNiAwIG9iago8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMSAwIFI+PgplbmRvYmoKNyAwIG9iago8PC9Sb290IDYgMCBSL1R5cGUvWFJlZi9TaXplIDgvV1sxIDQgMl0vSW5kZXhbMSA3XS9MZW5ndGggNDk+PnN0cmVhbQoBAAAADwAAAQAAAGgAAAEAAACnAAABAAAAzQAAAQAAASgAAAEAAAFiAAABAAABjwAACmVuZHN0cmVhbSAKZW5kb2JqCgpzdGFydHhyZWYKMzk5CiUlRU9G"
    },
    {
      "pdf_base64": "JVBERi0xLjcKJbutwN4KMSAwIG9iago8PC9UeXBlL1BhZ2VzL0tpZHNbNSAwIFJdL0NvdW50IDEvUmVzb3VyY2VzIDMgMCBSL01lZGlhQm94WzAgMCA2MTIgNzkyXT4+CmVuZG9iagoyIDAgb2JqCjw8L1R5cGUvRm9udC9TdWJ0eXBlL1R5cGUxL0Jhc2VGb250L0hlbHZldGljYT4+CmVuZG9iagozIDAgb2JqCjw8L0ZvbnQ8PC9GMSAyIDAgUj4+Pj4KZW5kb2JqCjQgMCBvYmoKPDwvTGVuZ3RoIDQzPj5zdHJlYW0KQlQKL0YxIDI0IFRmCjcyIDcyMCBUZAooVGVybXMgcGFnZSAxKSBUagpFVAplbmRzdHJlYW0gCmVuZG9iago1IDAgb2JqCjw8L1R5cGUvUGFnZS9QYXJlbnQgMSAwIFIvQ29udGVudHMgNCAwIFI+PgplbmRvYmoKNiAwIG9iago8PC9UeXBlL0NhdGFsb2cvUGFnZXMgMSAwIFI+PgplbmRvYmoKNyAwIG9iago8PC9Sb290IDYgMCBSL1R5cGUvWFJlZi9TaXplIDgvV1sxIDQgMl0vSW5kZXhbMSA3XS9MZW5ndGggNDk+PnN0cmVhbQoBAAAADwAAAQAAAGgAAAEAAACnAAABAAAAzQAAAQAAASgAAAEAAAFiAAABAAABjwAACmVuZHN0cmVhbSAKZW5kb2JqCgpzdGFydHhyZWYKMzk5CiUlRU9G"
    }
  ]
}
```

Response:

```json
{
  "bytes": 1024,
  "content_type": "application/pdf",
  "credits": 1,
  "pages": 2,
  "pdf_base64": "JVBERi0xLjcKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURlY29kZT4+..."
}
```

### POST https://api-printmint.plxi.us/v1/pdf/render

Print HTML to a PDF, with page size, margins, headers and footers. Costs 1 credit.

Request:

```json
{
  "css": "body { font-family: Inter, Arial, sans-serif; padding: 20mm; } h1 { color: #10b981; }",
  "html": "<html><head><title>Hello</title></head><body><h1>Hello from Printmint</h1><p>This page was printed from HTML.</p></body></html>",
  "inline": true,
  "pdf": {
    "footer_html": "<div style=\"width:100%;font-size:8px;text-align:center\"><span class=\"pageNumber\"></span> / <span class=\"totalPages\"></span></div>",
    "margin": {
      "bottom": "15mm"
    },
    "page_size": "A4"
  }
}
```

Response:

```json
{
  "bytes": 18342,
  "content_type": "application/pdf",
  "credits": 1,
  "pages": 1,
  "pdf_base64": "JVBERi0xLjcKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURlY29kZT4+..."
}
```

### POST https://api-printmint.plxi.us/v1/pdf/template

Fill in a template with JSON data and print it as a PDF. Costs 1 credit.

Request:

```json
{
  "data": {
    "currency": "USD",
    "customer": {
      "address": [
        "400 Market Street, Suite 12",
        "San Francisco, CA 94105"
      ],
      "email": "accounts@acme.example",
      "name": "Acme Robotics Inc."
    },
    "due": "2026-11-30",
    "issued": "2026-10-31",
    "items": [
      {
        "description": "Website redesign: discovery and wireframes",
        "quantity": 1,
        "unit_price": 2400
      },
      {
        "description": "Design system components",
        "quantity": 12,
        "unit_price": 150
      },
      {
        "description": "Hosting, October",
        "quantity": 1,
        "unit_price": 49.5
      }
    ],
    "notes": "Thank you for your business. Please pay by bank transfer within 30 days and quote the invoice number.",
    "number": "INV-2026-0142",
    "payment": [
      {
        "label": "Bank",
        "value": "First National Bank"
      },
      {
        "label": "Account name",
        "value": "Northwind Studio LLC"
      },
      {
        "label": "Account",
        "value": "1234 5678"
      },
      {
        "label": "Routing",
        "value": "021000021"
      }
    ],
    "seller": {
      "address": [
        "18 Harbour Street",
        "Portland, OR 97204",
        "United States"
      ],
      "email": "billing@northwind.example",
      "name": "Northwind Studio",
      "tax_id": "12-3456789"
    },
    "tax_rate": 0.0875
  },
  "inline": true,
  "template": "invoice"
}
```

Response:

```json
{
  "bytes": 41207,
  "content_type": "application/pdf",
  "credits": 1,
  "pages": 1,
  "pdf_base64": "JVBERi0xLjcKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURlY29kZT4+...",
  "template": "invoice"
}
```

### POST https://api-printmint.plxi.us/v1/image/render

Draw HTML or a template as a PNG, JPEG or WebP image. Costs 1 credit.

Request:

```json
{
  "format": "png",
  "height": 630,
  "html": "<body style=\"margin:0;display:flex;align-items:center;justify-content:center;height:100vh;background:#10b981;color:#fff;font:700 64px Inter,Arial,sans-serif\">Printmint</body>",
  "inline": true,
  "width": 1200
}
```

Response:

```json
{
  "bytes": 21877,
  "content_type": "image/png",
  "credits": 1,
  "height": 630,
  "image_base64": "iVBORw0KGgoAAAANSUhEUgAABLAAAAJ2CAIAAAD...",
  "width": 1200
}
```

### POST https://api-printmint.plxi.us/v1/templates/list

The built-in templates and your own, with their fields and sample data. Costs 0 credits.

Request:

```json
{}
```

Response:

```json
{
  "credits": 0,
  "starters": [
    {
      "description": "An itemised invoice…",
      "fields": {
        "number": "Invoice number"
      },
      "name": "invoice",
      "pdf": {
        "page_size": "A4"
      },
      "sample": {
        "number": "INV-2026-0142"
      },
      "title": "Invoice"
    }
  ],
  "templates": []
}
```

### POST https://api-printmint.plxi.us/v1/templates/create

Save a template of your own: Jinja HTML, CSS, sample data and page setup. Costs 0 credits.

Request:

```json
{
  "css": "body { font-family: Inter, Arial, sans-serif; padding: 25mm; }",
  "html": "<h1>Thank you, {{ name }}!</h1><p>Your order {{ order }} is on its way.</p>",
  "name": "Thank-you note",
  "pdf": {
    "page_size": "A5"
  },
  "sample": {
    "name": "Sam",
    "order": "#1042"
  }
}
```

Response:

```json
{
  "created_at": "2026-10-31T12:00:00Z",
  "credits": 0,
  "description": null,
  "id": "0b8f6a4e-3c2d-4c1a-9f0e-6d5b4a3c2b1a",
  "name": "Thank-you note",
  "pdf": {
    "page_size": "A5"
  },
  "sample": {
    "name": "Sam",
    "order": "#1042"
  },
  "updated_at": "2026-10-31T12:00:00Z"
}
```

### POST https://api-printmint.plxi.us/v1/templates/update

Change a saved template; fields you leave out stay as they are. Costs 0 credits.

Request:

```json
{
  "id": "00000000-0000-4000-8000-000000000000",
  "name": "Thank-you note (v2)"
}
```

Response:

```json
{
  "created_at": "2026-10-31T12:00:00Z",
  "credits": 0,
  "description": null,
  "id": "00000000-0000-4000-8000-000000000000",
  "name": "Thank-you note (v2)",
  "pdf": {
    "page_size": "A5"
  },
  "sample": {
    "name": "Sam",
    "order": "#1042"
  },
  "updated_at": "2026-10-31T12:05:00Z"
}
```

### POST https://api-printmint.plxi.us/v1/templates/delete

Delete a saved template. Costs 0 credits.

Request:

```json
{
  "id": "00000000-0000-4000-8000-000000000000"
}
```

Response:

```json
{
  "credits": 0,
  "deleted": true,
  "id": "00000000-0000-4000-8000-000000000000"
}
```

## Guides

- [Add headers, footers and page numbers to a PDF](https://printmint.plxi.us/guides/pdf-headers-footers-page-numbers): Repeat a header and a footer on every page of a PDF made from HTML, with "Page 3 of 7" page numbers, the date and the document title, using Printmint.
- [Convert HTML to PDF with an API call](https://printmint.plxi.us/guides/html-to-pdf-api): Send HTML and CSS to Printmint and get back a print-ready PDF, with page size, margins, page breaks and page numbers, from curl, Node or Python.
- [Generate invoice PDFs from JSON](https://printmint.plxi.us/guides/invoice-pdf-from-json): Send your invoice data as JSON and get a finished PDF invoice back, with line items, tax and totals worked out, using Printmint's invoice template.

## Comparisons

- [Printmint vs APITemplate.io for PDFs from templates](https://printmint.plxi.us/compare/apitemplate-alternative): APITemplate.io has visual template editors; Printmint has code-first Jinja templates and HTML to PDF. A comparison of features and price, October 2026.
- [Printmint vs DocRaptor, an HTML to PDF API compared](https://printmint.plxi.us/compare/docraptor-alternative): DocRaptor prints with Prince; Printmint prints with Chromium. How they compare on rendering, templates, free use and price, as of October 2026.
- [Printmint vs PDFShift for HTML to PDF](https://printmint.plxi.us/compare/pdfshift-alternative): PDFShift and Printmint both turn HTML into PDFs over an API. How they differ on pricing, limits, templates and extras, checked in October 2026.

## Use cases

- [Let AI agents make PDFs, invoices and images](https://printmint.plxi.us/use-cases/pdfs-from-ai-agents): Printmint's MCP server gives Claude and other agents tools to print HTML to PDF, fill in invoice and report templates, draw images and merge PDFs.

## FAQ

- **What does one document cost?** One credit for each PDF or image, up to 50 pages, and one for each merge. Listing, saving and deleting templates is free, and a call that fails is never charged.
- **How do I get the PDF back?** Each response carries the PDF as base64 (pdf_base64) or as a download link (file). Send "inline": true to always get it in the response, up to 5 MB.
- **Can I use my own fonts and images?** Yes. Link them from your HTML, with base_url for relative paths, or embed them as data: URLs. Templates print offline by default, so give them images as data: URLs or set offline to false.
- **Is my data kept?** The HTML and data you send are used to print the document and aren't stored. Templates you save are kept until you delete them, and stored files are deleted after a few days.
- **Can a template run code?** No. Templates use Jinja syntax with no file, network or include access, every value is escaped, and the page's own scripts run in a sandboxed Chromium that can't reach private networks.

## Optional

- [Terms](https://printmint.plxi.us/terms)
- [Privacy](https://printmint.plxi.us/privacy)
- [Support](https://printmint.plxi.us/contact)
