PDF sandbox: render HTML to PDF, free
Edit the HTML (or pick a JSON template) and press Render PDF. This calls the real POST /v1/pdf endpoint with the public sandbox key: no signup, 5 free sandbox renders per day per network, 1 page, up to 50 KB, with a faint SANDBOX watermark. JavaScript in your HTML is not run.
Like the result? A free key gives you 100 documents a month, up to 10 pages each, with no watermark. Paid plans start at $7 for 1,000 documents a month, with a hard cap (never billed for overage).
Same request from your code
Each snippet runs as-is with the public sandbox key. With your own key, set RENDLET_API_KEY. Full reference: docs · OpenAPI 3.1.
# Works as-is with the public sandbox key. With your own key: export RENDLET_API_KEY=YOUR_API_KEY
curl -X POST https://rendlet.com/v1/pdf \
-H "Authorization: Bearer ${RENDLET_API_KEY:-sandbox}" \
-H "Content-Type: application/json" \
-d '{"html":"<h1>Hello</h1><p>Rendered by Rendlet.</p>","options":{"format":"A4","margin":"15mm"}}' \
-o hello.pdf// Node 18+ (built-in fetch). Save as render.mjs and run: node render.mjs
// Uses the public sandbox key unless you set RENDLET_API_KEY=YOUR_API_KEY
import { writeFile } from "node:fs/promises";
const res = await fetch("https://rendlet.com/v1/pdf", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.RENDLET_API_KEY ?? "sandbox"}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
html: "<h1>Hello</h1><p>Rendered by Rendlet.</p>",
options: { format: "A4", margin: "15mm" },
}),
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
await writeFile("hello.pdf", Buffer.from(await res.arrayBuffer()));
console.log("saved hello.pdf;", res.headers.get("x-quota-remaining"), "renders left");# Python 3 + requests (pip install requests). Save as render.py and run: python render.py
# Uses the public sandbox key unless you set RENDLET_API_KEY=YOUR_API_KEY
import os
import requests
r = requests.post(
"https://rendlet.com/v1/pdf",
headers={"Authorization": "Bearer " + os.environ.get("RENDLET_API_KEY", "sandbox")},
json={
"html": "<h1>Hello</h1><p>Rendered by Rendlet.</p>",
"options": {"format": "A4", "margin": "15mm"},
},
timeout=60,
)
r.raise_for_status()
with open("hello.pdf", "wb") as f:
f.write(r.content)
print("saved hello.pdf;", r.headers.get("X-Quota-Remaining"), "renders left")Add "response":"base64" to the body to get JSON with the PDF as base64, which is handy for AI agents and serverless code.