POST /api/v1/render/screenshot · POST /api/v1/render/pdf

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/screenshot

Capture a screenshot of a URL or rendered HTML. Provide either url or html — at least one is required.

ParameterTypeRequiredDefaultDescription
stringone ofPublic URL to screenshot
stringone ofRaw HTML string to render
numberno1280Viewport width in pixels
numberno800Viewport height in pixels
booleannofalseCapture the full scrollable page
booleannofalseEnable prefers-color-scheme: dark
numberno0Wait N milliseconds before capture
stringno"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); // 2

Response

{
  "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/pdf

Generate a PDF from a URL or HTML string. Ideal for invoices, reports, and contracts. Provide either url or html.

ParameterTypeRequiredDefaultDescription
stringone ofPublic URL to convert to PDF
stringone ofRaw HTML string to render as PDF
stringno"A4"Paper format: A4, A3, Letter, Legal, Tabloid
objectno{ top, right, bottom, left } — CSS values e.g. "20px"
booleannotrueInclude CSS background colors and images
stringno""HTML template for the page header
stringno""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.