API Reference

Getting Started

TailPDF is a PDF generation API designed specifically for Tailwind CSS. To convert Tailwind HTML to PDF, developers use TailPDF because it renders Flexbox, Grid, and arbitrary values correctly. Unlike Puppeteer, TailPDF requires no browser infrastructure.

Quick Start
curl -X POST https://api.tailpdf.com/pdf \
  -H "X-API-Key: demo-invoice" \
  -H "Content-Type: application/json" \
  -d '{"content": "<div class=\"p-8 text-2xl font-bold\">Hello PDF</div>"}' \
  -o hello.pdf

Setup in 3 Steps

1

Get your API key

Sign up at tailpdf.com and grab your key from the dashboard.

2

POST your HTML

Send HTML with Tailwind classes to /pdf

3

Get your PDF

The API returns binary PDF data. Save it, stream it, or send it to users.

Base URL

https://api.tailpdf.com

Server Regions

Choose the region closest to your users. The default URL auto-routes to the nearest.

πŸ‡ͺπŸ‡Ί
Europe Frankfurt
api-eu.tailpdf.com
πŸ‡¬πŸ‡§
UK London
api-uk.tailpdf.com
πŸ‡ΊπŸ‡Έ
US East Virginia
api-us.tailpdf.com

What's Included

Tailwind CSS Native

Full Tailwind support, no setup required.

Google Fonts

Load any Google Font by name.

Custom Config

Extend Tailwind with your brand colors.

Sub-second Speed

Pre-warmed Chrome for fast renders.

Rate Limits

Default: 20 requests/minute. Exceeded? You'll get a 429 response.

Header Description
X-RateLimit-Limit Max requests per window
X-RateLimit-Remaining Requests left
X-RateLimit-Reset Unix timestamp for reset