# 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. ```bash curl -X POST https://html-pdf.com/v1/pdf \ -H "Authorization: Bearer $HTML_PDF_KEY" \ -H "Content-Type: application/json" \ -d '{"html": "

Hello

"}' -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](https://www.api2pdf.com/pricing/). 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. - **You need more than HTML to PDF.** Word, Excel and PowerPoint to PDF, merging, watermarks, PDF to HTML, barcodes and image output are all built in. We don't do any of those. - **You still depend on wkhtmltopdf output.** Api2Pdf lets you keep it while you migrate templates. (wkhtmltopdf itself is archived. See our [wkhtmltopdf alternative](https://html-pdf.com/wkhtmltopdf-alternative) guide.) - **Your renders are heavy.** 90 seconds and 2 GB of RAM per request, with a larger tier, is more headroom than our 30-second render limit. - **You render very many small documents.** Usage billing can come out well below one cent per PDF. ## When html-pdf.com is the better choice html-pdf.com fits better in these cases. - **AI agents create your PDFs.** Claude, ChatGPT, Cursor, VS Code and Codex connect to `https://html-pdf.com/mcp` with a key, no install. Tools: `html_to_pdf`, `url_to_pdf`, `get_credits`, `buy_credits`. - **You want the PDF in the response.** By default you get the bytes back, so there is no second download step. - **You want predictable costs.** 1 page = 1 credit, `max_pages` fails a runaway render without charge, and credits never expire. - **You prefer flat options.** Margins take CSS units (`"10mm"`), and headers and footers are top-level fields. ## Migrating from Api2Pdf Switching takes one changed request. Here is the same invoice on both services. **Before (Api2Pdf, Chrome endpoint):** ```bash curl -X POST https://v2.api2pdf.com/chrome/pdf/html \ -H "Authorization: $API2PDF_KEY" \ -H "Content-Type: application/json" \ -d '{"html": "

Invoice #42

", "fileName": "invoice.pdf", "options": {"landscape": false, "printBackground": true, "marginTop": 0.5, "marginBottom": 0.5, "displayHeaderFooter": true, "footerTemplate": "
Page of
"}}' # returns JSON; download FileUrl in a second request ``` **After (html-pdf.com):** ```bash curl -X POST https://html-pdf.com/v1/pdf \ -H "Authorization: Bearer $HTML_PDF_KEY" \ -H "Content-Type: application/json" \ -d '{"html": "

Invoice #42

", "filename": "invoice.pdf", "landscape": false, "print_background": true, "margin": {"top": "0.5in", "right": "0.5in", "bottom": "0.5in", "left": "0.5in"}, "footer_html": "
Page of
"}' \ -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. ### Can I reuse my Api2Pdf header and footer templates? 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. ```bash 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](https://html-pdf.com/pdfshift-alternative) ยท [DocRaptor alternative](https://html-pdf.com/docraptor-alternative). Reference: [API docs](https://html-pdf.com/docs).