Skip to content

§ PDF generator API

PDF Generator API: an API PDF Generator and PDF Maker API in One Call

Generate PDFs from raw HTML or any live URL with a single HTTP request. Real Chromium rendering, your fonts and CSS intact, and a timestamped copy of every document kept on file. Try the generator below in your browser first.

  • Early access, launching soon
  • No card required
  • Your HTML stays yours

§ Live demo

Runs in your browser. Nothing is uploaded.

Your PDF is downloading. Want this as one API call, with the page archived too?

§ Short answer

A PDF generator API is an HTTP endpoint that takes HTML or a URL and returns a finished PDF, so your application never has to run a browser or a rendering library itself. You send one authenticated request with your markup and page options, and the PDF comes back in the response. Sitepdf does that job in managed Chromium and, unusually for this category, stores a timestamped snapshot of every page it renders, so you keep both the document and a dated record of it.

Last updated July 2026. Written and fact checked by the Sitepdf team.

§ 00

Four ways to generate a PDF from a program, compared

Every team generating documents lands on one of these four approaches. They differ less in output quality than in who carries the operational cost.

Approach What you run Rendering fidelity Ops burden Keeps a dated record?
Headless Chrome library
Puppeteer, Playwright
A browser fleet you host, patch and scale Excellent, it is a real browser High: memory leaks, fonts, render drift, on call No
Legacy HTML engine
wkhtmltopdf
A binary on your server Dated: old WebKit, weak modern CSS and JS Medium: it is stable, but stuck No
Print stylesheet service
PrinceXML based tools
Nothing, it is an API Excellent for print typography and pagination None No
Render plus archive API
Sitepdf
Nothing, it is an API Excellent, managed Chromium with wait for selector None Yes, timestamped snapshot per render

Fidelity and ops columns describe the category, not a benchmark. The honest read: if you already run a browser fleet happily and never need a record, a library is fine. The API earns its money the moment either of those stops being true.

§ 01

What a PDF generator API actually has to get right

Generating a PDF looks trivial until you do it in production. The hard parts are never the happy path. They are the invoice whose web font falls back to Times because the font server was slow. The report whose chart renders after the PDF was already written, leaving an empty box where the revenue graph should be. The statement that breaks across pages mid table, orphaning a single row of numbers on page four.

All three failures have the same root cause: something snapshotted the page before it finished becoming itself. A serious API PDF generator fixes that with a real browser engine and an explicit way to say "wait until this is on screen." Sitepdf renders in managed Chromium, so your CSS grid, your web fonts and your JavaScript all behave exactly as they do in a visitor's browser, and wait_for holds the render until the selector you name exists.

The rest is page mechanics: A4, Letter or Legal, portrait or landscape, margin presets, and header and footer templates with page numbers. Boring, and precisely the boring you should not be writing yourself.

If you are still choosing between rendering your own HTML and merging a Word template with JSON, the wider document generation API comparison sets the two engines side by side and lists what each vendor in the category actually publishes for pricing.

§ 02

The second thing every PDF maker API should return, and almost none do

Here is the gap almost nobody in this category fills. You generate a PDF because a document mattered: an invoice a customer paid against, a quote you honored, a disclosure a regulator will ask about. The file goes to the customer. What stays with you is, at best, a copy in a bucket with no provenance and an editable timestamp.

Sitepdf treats the record as part of the same job. Add archive=true to any render and the page is also stored as a timestamped, immutable snapshot under your account, retrievable by id forever after. The document goes out; the dated record stays in. One call, one bill, no second pipeline to build and no second vendor to buy. Urlbox is the one other vendor that takes records seriously, and we say so on the comparison page; everyone else hands you the file and forgets the page.

If you only need the file, leave archiving off and the render is transient: we return the PDF and store nothing.

§ 03

Generate from HTML you have, or from a URL you point at

Both inputs are the same endpoint. Send html when your app already owns the markup, which is the usual case for invoices, receipts and statements rendered from a template. Send url when the source of truth is a live page: an order confirmation, a published price, a dashboard. The URL to PDF API page covers that path in detail, and the free in-browser converter lets you sanity check output quality on your own markup before you write a line of integration code.

Batch is the same call in a loop, run concurrently against your plan's limit, which is how teams push thousands of month end statements without building a queue of their own.

§ 04

What it costs, honestly

Sitepdf is in early access. The API opens to the list in order, and planned pricing starts at $29 a month, which early access members lock for 12 months after launch. Full tiers are on the pricing page, and every planned feature on this site is labelled planned until it ships, because a vendor that fudges its own status is not one you want holding your records.

Weighing this against the alternatives is a fair thing to do before you commit. We wrote the comparison ourselves: the best HTML to PDF API, seven tools compared, including the cases where a competitor is the better buy.

The API shape early access unlocks: HTML or URL in, PDF plus dated record out.
curl https://api.sitepdf.com/v1/render \
  -H "Authorization: Bearer $SITEPDF_KEY" \
  -F [email protected] \
  -F format=Letter \
  -F margin=normal \
  -F header_template="<span class=pageNumber></span>" \
  -F archive=true

{
  "pdf_url": "https://api.sitepdf.com/v1/documents/doc_4mq07.pdf",
  "pages": 3,
  "rendered_in_ms": 1890,
  "archive": {
    "id": "arc_b41ke",
    "captured_at": "2026-07-14T11:20:07Z",
    "retrieve_url": "https://api.sitepdf.com/v1/archives/arc_b41ke"
  }
}

The API is in early access; this is the documented call shape it opens with. Full request and response walkthrough.

§ 05

Questions about this job

What is a PDF generator API?
A PDF generator API is an HTTP endpoint that turns HTML or a URL into a finished PDF and returns it in the response. Your application sends the markup and the page options; the vendor runs the browser, the fonts and the rendering infrastructure. You get a document without hosting anything.
How much does a PDF generator API cost?
Entry tiers across this category generally start somewhere between roughly $9 and $30 a month for a few thousand renders, and scale by render volume from there. Sitepdf plans to start at $29 a month, locked for 12 months for early access members. Compare the market on our best HTML to PDF API page before you commit.
Is there a free PDF generator API?
Most vendors offer a free trial or a small free tier rather than a genuinely free production API, because every render costs real browser compute. Sitepdf gives you a free in-browser converter for one off jobs and no card is needed to join early access, but the production API is a paid product and we say so plainly.
Should I use an open source PDF generator instead?
If your volume is low, your templates are simple and you already run servers, a library like Puppeteer is a reasonable choice and costs nothing in licence fees. The bill arrives as engineering time: memory leaks, font packages, and a render pipeline that drifts with every Chrome release. Our Puppeteer alternative page runs that trade off honestly.
Can the API generate a PDF from a URL as well as from HTML?
Yes. The same endpoint accepts either a url parameter or a raw html parameter. Use HTML when your app already renders the template, and a URL when the live page is the source of truth, for example an order confirmation or a published pricing page.
Does the API keep a copy of the PDFs it generates?
Only when you ask it to. Renders are transient by default: we return the PDF and store nothing. Set archive=true and the page is stored as a timestamped snapshot under your account, private, retrievable by id, with retention you control and deletion on request.

§ Early access

Get on the early-access list

The API opens to the list first, in order. Early access locks the planned launch rates for 12 months. No card required, launching soon.

Render + archive, one API