REST API · Serverless · Pay as you go

PDF generation for developers who have real work to do.

Convert HTML, URLs, Markdown and Office documents to PDF, merge and watermark PDFs, extract data, and generate barcodes with one transparent, serverless REST API. $1 a month plus usage, no limits.

Headless Chrome · wkhtmltopdf · LibreOffice · 1,400+ paying customers since 2018

python example
import requests

api_key = 'your-api-key'
endpoint = 'https://v2.api2pdf.com/chrome/pdf/html'

response = requests.post(
    endpoint,
    json={'html': '<h1>Hello World</h1>'},
    headers={'Authorization': api_key}
)
print(response.json()['FileUrl'])

See the API in action.

Use these starter requests to understand the shape of the API, then jump into the full docs when you are ready. Every response is JSON with a FileUrl that stays valid for 24 hours.

The fast path when your app already has HTML ready to go.

POST /chrome/pdf/html
curl -X POST 'https://v2.api2pdf.com/chrome/pdf/html' \
  -H 'Authorization: your-api-key' \
  -H 'Content-Type: application/json' \
  -d '{"html":"<h1>Hello World</h1>","options":{"printBackground":true}}'

Great for dashboards, invoices, reports, or anything already hosted.

POST /chrome/pdf/url
curl -X POST 'https://v2.api2pdf.com/chrome/pdf/url' \
  -H 'Authorization: your-api-key' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://www.github.com","options":{"landscape":true}}'

Send Word, Excel or PowerPoint files through LibreOffice without owning the infrastructure.

POST /libreoffice/any-to-pdf
curl -X POST 'https://v2.api2pdf.com/libreoffice/any-to-pdf' \
  -H 'Authorization: your-api-key' \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com/sample.docx"}'

Pass a list of PDF URLs and get one combined document back.

POST /pdfsharp/merge
curl -X POST 'https://v2.api2pdf.com/pdfsharp/merge' \
  -H 'Authorization: your-api-key' \
  -H 'Content-Type: application/json' \
  -d '{"urls":["https://example.com/a.pdf","https://example.com/b.pdf"]}'

Markdown in, a clean PDF out. Ideal for reports generated by LLMs.

POST /chrome/pdf/markdown
curl -X POST 'https://v2.api2pdf.com/chrome/pdf/markdown' \
  -H 'Authorization: your-api-key' \
  -H 'Content-Type: application/json' \
  -d '{"markdown":"# Quarterly report\n\n| Region | Revenue |\n|---|---|\n| EU | 1.2M |"}'

A better experience for teams that just need PDF stuff to work.

Mission statement

API2PDF exists to make generating PDFs for application developers not completely miserable. Fast, cheap and without arbitrary limits. Popular libraries and APIs such as iTextSharp, PDFCrowd and DocRaptor are unreasonably expensive; you should not have to break the bank to convert HTML to PDF.

Transparency

Most services hide what they run under the hood. API2PDF does the opposite: Headless Chrome, wkhtmltopdf, LibreOffice and PdfSharp are named up front, so you know exactly what you are buying and can test your HTML locally first.

Serverless, so it stays cheap

Every request runs in its own container on Google Cloud Run with 2 GB of RAM and 90 seconds of compute (more on the V2 XL endpoints). There are no queues, no rate limits and no file size limits, and you pay $1 a month plus a fraction of a cent per request. See the pricing page and the comparison with 18 other PDF APIs.

Built for developers and their agents

One REST API, client libraries for Python, Node, PHP, C# and Java, an MCP server for AI coding assistants, x402 pay-per-request for autonomous agents, and a plain-English fact sheet about infrastructure and data handling.

Get your API key and start shipping.

Start free, hit the docs, and move from prototype to production without turning PDF generation into its own internal platform project.