Renderly for developers
Renderly turns HTML (or a saved template) into print-ready documents — PDF or PNG — through a single API call. This documentation covers every detail: authentication, the render endpoint, templates, variables, verifiable documents, errors and limits.
If you have 5 minutes, start here. The steps below take you from zero to your first PDF — and the rest of the documentation digs into each concept.
What Renderly does
Generating documents on the server is usually painful: PDF libraries that do not understand modern CSS, headless browsers to maintain, print layouts that break. Renderly solves this as a service. You describe the document in HTML — or build a template in the visual editor — and we return the rendered file, faithful to what you designed.
Real HTML, real rendering
Raw HTML with variable substitution, or a saved template that compiles tables, QR codes and charts. Your CSS behaves just like in a browser.
Two paths, one route
Send html (raw HTML) or template (a saved slug). The same endpoint resolves both. You never maintain a headless browser.
Verifiable documents
Every render produces a SHA-256 of the bytes and a public /verify page. Tamper-proof integrity, built in.
Synchronous and direct
The request response is the binary itself (PDF or PNG). No polling, no queue for the common case.
Your first 5 minutes
Three steps, from zero to a file on your disk.
1. Get your API key
In the Dashboard you generate a key in the format rndr_live_.... It appears only once — copy it and store it in a secrets vault.
2. Make your first call
Send a POST to /v1/render with a template and your data. The PDF comes back in the response — in ~10ms via the native engine.
3. Download the binary
The response is the file. With curl, use --output; in code, read the body as bytes and save it. Done.
In practice, your first call looks exactly like this:
curl -X POST https://api.renderly.dev/v1/render \
-H "Authorization: Bearer rndr_live_SEU_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"html": "<h1>Olá, {{nome}}</h1><p>Seu primeiro PDF pela Renderly.</p>",
"data": { "nome": "Maria" },
"format": "pdf"
}' --output ola.pdfhtml has a {{nome}} and the data carries { "nome": "Maria" }. Renderly substitutes the variable before rendering. It is the same variable syntax used in templates — see Data & variables.How rendering works, under the hood
Every call goes through the same pipeline, and understanding it helps you debug and optimize:
- 1Authentication. Your API key is validated and mapped to an organization.
- 2Quota. We check how many renders the organization has already made in the current month against the plan limit.
- 3Resolution. We decide what to render: a saved template (compiled with your data) or the raw HTML you sent.
- 4Render. A two-track router picks the engine: native (deterministic, no browser) for compatible documents, or Chromium for raw HTML, PNG and complex layouts.
- 5Issuance. We compute the SHA-256 of the bytes, log the issuance for verification, and respond with the file + diagnostic headers.
X-Render-Engine response header tells you whether that document came out of the native engine or chromium. You do not choose — the router decides based on the document structure. Both produce the same output contract.Where to go next
This documentation is organized from basics to advanced:
Renderly