Introduction

What is mkpdfs?

mkpdfs is a PDF generation service built around Handlebars templates. You write an HTML/CSS template with {{variable}} placeholders, upload it once, and then generate pixel-perfect PDFs on demand by sending your data to the API.

It is designed for developers who need to generate invoices, reports, certificates, or any other document at scale — without managing a headless browser yourself.

Three ways to use mkpdfs

REST API — the core interface. Send a POST request with your template ID and data, get back a time-limited URL to a PDF. Authenticate with an API key (x-api-key: tlfy_...). Works from any language or runtime.

CLI (mkp) — a Go-based command-line tool for local workflows. Push and pull templates, generate PDFs from JSON files, and manage your account from the terminal. Install it with Homebrew.

Web dashboard — the visual way to manage templates, create API keys, view usage, and buy credits. Available at mkpdfs.com.

Credits

mkpdfs uses a prepaid credits model. $10 buys 1,000 credits; one credit generates one PDF page. Credits never expire. Every new account receives 10 welcome credits so you can try the service before buying.

What's in these docs

SectionWhat you'll find
Getting StartedSign up, first API call, CLI installation
API ReferenceEvery endpoint — request shape, response fields, error codes
CLIAll mkp commands and flags

Start with Quickstart if you want to generate your first PDF in the next two minutes, or jump straight to API Reference if you already know what you need.