Render — Screenshots & PDFs
Generate pixel-perfect screenshots and PDFs from any public URL or HTML string. Powered by Puppeteer and headless Chromium running on the waypoints VPS. Output is stored in MinIO and returned as a presigned URL valid for 24 hours.
/api/v1/render/screenshotCapture a screenshot of a URL or rendered HTML. Provide either url or html — at least one is required.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| url | string | one of | — | Public URL to screenshot |
| html | string | one of | — | Raw HTML string to render |
| width | number | no | 1280 | Viewport width in pixels |
| height | number | no | 800 | Viewport height in pixels |
| fullPage | boolean | no | false | Capture the full scrollable page |
| darkMode | boolean | no | false | Enable prefers-color-scheme: dark |
| delay | number | no | 0 | Wait N milliseconds before capture |
| format | string | no | "png" | Output format: png or jpeg |
cURL
curl -X POST https://api.waypoints.tech/v1/render/screenshot \
-H "x-api-key: wp_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"url": "https://example.com",
"width": 1280,
"height": 800,
"fullPage": false,
"format": "png"
}'SDK (@waypoints/sdk)
import waypoints from "@waypoints/sdk";
const wp = new waypoints({ apiKey: process.env.WAYPOINTS_API_KEY });
const result = await wp.render.screenshot({
url: "https://example.com",
width: 1280,
height: 800,
fullPage: false,
format: "png",
});
console.log(result.url); // presigned URL (24h)
console.log(result.expires_at); // ISO timestamp
console.log(result.credits_used); // 2Response
{
"url": "https://minio.waypoints.tech/waypoints-outputs/render/550e8400-e29b-41d4-a716-446655440000.png",
"expires_at": "2026-03-22T12:00:00Z",
"credits_used": 2,
"request_id": "req_01jx9k2m3n4p5q6r7s8t9u0v"
}/api/v1/render/pdfGenerate a PDF from a URL or HTML string. Ideal for invoices, reports, and contracts. Provide either url or html.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| url | string | one of | — | Public URL to convert to PDF |
| html | string | one of | — | Raw HTML string to render as PDF |
| format | string | no | "A4" | Paper format: A4, A3, Letter, Legal, Tabloid |
| margin | object | no | — | { top, right, bottom, left } — CSS values e.g. "20px" |
| printBackground | boolean | no | true | Include CSS background colors and images |
| headerTemplate | string | no | "" | HTML template for the page header |
| footerTemplate | string | no | "" | HTML template for the page footer |
cURL
curl -X POST https://api.waypoints.tech/v1/render/pdf \
-H "x-api-key: wp_live_your_key_here" \
-H "Content-Type: application/json" \
-d '{
"html": "<h1 style=\"font-family:sans-serif\">Invoice #1042</h1><p>Amount due: €1,210.00</p>",
"format": "A4",
"printBackground": true,
"margin": { "top": "20px", "bottom": "20px", "left": "24px", "right": "24px" }
}'SDK (@waypoints/sdk)
const result = await wp.render.pdf({
html: "<h1>Invoice #1042</h1><p>Amount due: €1,210.00</p>",
format: "A4",
printBackground: true,
margin: { top: "20px", bottom: "20px", left: "24px", right: "24px" },
});
console.log(result.url); // presigned PDF URL (24h TTL)Response
{
"url": "https://minio.waypoints.tech/waypoints-outputs/render/550e8400-e29b-41d4-a716-446655440000.pdf",
"expires_at": "2026-03-22T12:00:00Z",
"credits_used": 2,
"request_id": "req_01jx9k2m3n4p5q6r7s8t9u0v"
}Notes
Output storage
All rendered files are uploaded to MinIO (S3-compatible) and returned as presigned URLs. URLs expire after 24 hours. Download or re-upload the file to your own storage if you need it longer.
HTML rendering
When using the html parameter, Chromium renders the HTML in a sandboxed context. External resources (fonts, images) must be reachable from the VPS network. Use base64-encoded data URIs for self-contained HTML.
Delay parameter
Use delay (milliseconds) to wait for JavaScript-rendered content to load before capturing. For complex SPAs, a delay of 1000–2000ms is typically sufficient.