api2pdf alternative: html-pdf.com

api2pdf alternative: html-pdf.com

Looking for an api2pdf alternative? Compare per-page credits that never expire with usage billing, plus a native remote MCP server and a quick migration.

Api2Pdf is a broad document API. It converts HTML and URLs to PDF with headless Chrome or wkhtmltopdf, converts Office files with LibreOffice, merges files, makes barcodes and more, all billed on usage.

html-pdf.com does one job. It turns HTML or a URL into a PDF with headless Chromium, using prepaid credits, and it has an official MCP server for AI agents. Here is an honest comparison, including when Api2Pdf is the better pick.

Quick answer: send your HTML to one endpoint and get the PDF back.

curl -X POST https://html-pdf.com/v1/pdf \
  -H "Authorization: Bearer $HTML_PDF_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html": "<h1>Hello</h1>"}' -o hello.pdf

Api2Pdf vs html-pdf.com at a glance

This table shows the main differences side by side.

Api2Pdf html-pdf.com
Pricing model $1/month base fee plus usage (bandwidth and compute) One-time credit packs, no subscription
Billing unit Per MB of output and per second of compute 1 credit per PDF page
Free start One month of free credit for new accounts 100 credits once your email is confirmed
Engines Headless Chrome, wkhtmltopdf, LibreOffice Headless Chromium (via Gotenberg)
Other conversions Office to PDF, HTML/URL to image, merge, watermark, barcodes, PDF to HTML HTML and URL to PDF only
Response JSON with a FileUrl (hosted 24 hours) PDF bytes by default; base64 or a 24-hour link on request
MCP for AI agents Via third-party Composio toolkit Official remote MCP server at https://html-pdf.com/mcp
Agent self-signup No Yes (OAuth login from the MCP client, or POST /v1/signup)
Limits 2 GB RAM and 90 seconds per request (larger tier available) 20 MB request, 30 s render, 120 requests/min

Prices checked October 2026 on Api2Pdf's pricing page. It lists $1/month, bandwidth at $0.001 per MB, compute at $0.00019551 per second, and one month of free credit for new accounts. Api2Pdf's own example estimates about $5.91 for 10,000 PDFs of 0.1 MB that take 2 seconds each.

How the pricing models differ

Here is how each service turns your usage into a bill.

Api2Pdf bills what the conversion consumes, which is output size and render time. Small, fast documents are very cheap, and the bill moves with your volume each month. You also pay the $1 base fee in months you render nothing.

html-pdf.com bills pages. A one-page invoice costs 1 credit and a 12-page report costs 12. Packs are $10 for 1,000 credits, $25 for 3,000, $50 for 7,000, $100 for 15,000 and $250 for 50,000, so $0.01 down to $0.005 per page.

Purchased credits never expire, and failed renders cost nothing.

If you render high volumes of small, quick PDFs, Api2Pdf's usage pricing will usually cost less. If you want to know the price of a document before you render it, or your volume is irregular, per-page credits are easier to predict. Run a sample of your own documents through both before deciding.

When Api2Pdf is the better choice

Api2Pdf wins in these cases.

When html-pdf.com is the better choice

html-pdf.com fits better in these cases.

Migrating from Api2Pdf

Switching takes one changed request. Here is the same invoice on both services.

Before (Api2Pdf, Chrome endpoint):

curl -X POST https://v2.api2pdf.com/chrome/pdf/html \
  -H "Authorization: $API2PDF_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html": "<h1>Invoice #42</h1>", "fileName": "invoice.pdf",
       "options": {"landscape": false, "printBackground": true,
                   "marginTop": 0.5, "marginBottom": 0.5,
                   "displayHeaderFooter": true,
                   "footerTemplate": "<div style=\"font-size:10px;width:100%;text-align:center\">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></div>"}}'
# returns JSON; download FileUrl in a second request

After (html-pdf.com):

curl -X POST https://html-pdf.com/v1/pdf \
  -H "Authorization: Bearer $HTML_PDF_KEY" \
  -H "Content-Type: application/json" \
  -d '{"html": "<h1>Invoice #42</h1>", "filename": "invoice.pdf",
       "landscape": false, "print_background": true,
       "margin": {"top": "0.5in", "right": "0.5in", "bottom": "0.5in", "left": "0.5in"},
       "footer_html": "<div style=\"font-size:10px;width:100%;text-align:center\">Page <span class=\"pageNumber\"></span> of <span class=\"totalPages\"></span></div>"}' \
  -o invoice.pdf

Your Chrome header and footer templates work unchanged, because both services use Chrome's pageNumber and totalPages classes.

Parameter mapping

Use this table to translate each Api2Pdf option.

Api2Pdf html-pdf.com
POST /chrome/pdf/html with html POST /v1/pdf with html
POST /chrome/pdf/url with url POST /v1/pdf with url (public pages)
fileName filename
options.landscape landscape
options.printBackground print_background (default true)
options.marginTop etc. (inches) margin as "10mm" or {top, right, bottom, left} with units
options.displayHeaderFooter + headerTemplate / footerTemplate header_html / footer_html (set a margin so they have room)
options.scale, options.pageRanges scale, page_ranges
FileUrl in JSON response "response": "url" returns JSON with a url valid 24 hours
Cost, MbOut in JSON X-Pages, X-Credits-Used, X-Credits-Remaining headers

Errors come back as JSON {"error": {"code", "message", "hint"}}. A 402 insufficient_credits means it's time to top up, or turn on auto top-up.

FAQ

Is there a free Api2Pdf alternative?

html-pdf.com gives you 100 free credits once you confirm your email, with no card needed. One credit is one PDF page, so that covers 100 pages.

Is html-pdf.com cheaper than Api2Pdf?

It depends on your documents. Api2Pdf's usage billing is often cheaper for many small, fast PDFs, while html-pdf.com costs a fixed $0.01 to $0.005 per page and is easier to predict.

Do html-pdf.com credits expire?

No. Purchased credits never expire, there is no monthly fee, and failed renders cost nothing.

Yes. Both services use Chrome's pageNumber and totalPages classes, so you can paste your templates into header_html and footer_html as they are.

Try it free

Create an account and key with one request.

curl -X POST https://html-pdf.com/v1/signup -H "Content-Type: application/json" -d '{"email": "you@example.com"}'

You get an API key right away, and 100 free credits once you open the link we email you to confirm your address. Or sign in at https://html-pdf.com/login. Also compared: PDFShift alternative · DocRaptor alternative. Reference: API docs.

This page as markdown · text