RenderPix icon

RenderPix

Convert HTML to pixel-perfect images and capture URL screenshots

Render HTML

AI-generated

Summary

Renders a raw HTML string to an image (PNG, JPEG or WebP) by POSTing to the RenderPix API's /v1/render endpoint. It runs once per input item and returns the image as binary data, base64, or a data URL.

Inputs

  • html (required) — Raw HTML to render. Inline styles are recommended because external CSS may not load.
  • vars — Key/value pairs. They are sent to the API as a vars map for replacing {{key}} placeholders in the HTML. Rows with an empty key are ignored.
  • width — Viewport width in pixels (default 1280).
  • height — Viewport height in pixels (default 720).
  • format — Output format: png (default), jpeg or webp.
  • quality — Compression quality 1–100 (default 90). Shown and sent only for JPEG and WebP.
  • scale — Device pixel ratio: 1×, 2× or 3× (default 1×).
  • advancedOptions — Optional collection with a CSS selector (capture only that element, Pro+), Full Page (capture full scrollable height, Pro+) and Wait Until (load, domcontentloaded or networkidle). Wait Until is sent only when it isn't 'load'.
  • returnAs — How the image is returned: binary (default), base64 string, or data URL.
  • binaryPropertyName — Binary property that holds the image (default 'data'). Shown only when Return As is Binary File.

Output shape

One output item per input item. The JSON holds success, format, width, height, renderTime and usageRemaining. Depending on Return As, the item also has the image as a binary property, an imageBase64 field, or an imageUrl data URL.

Width, height, render time and usage remaining are read from the response headers (x-width, x-height, x-render-time, x-usage-remaining). They fall back to the requested size or 0 if a header is missing. Binary files are named renderpix-.. With Continue On Fail enabled, a failed item returns {success:false, error, statusCode}. Otherwise the node throws an error. The credential's baseUrl can override the default https://renderpix.dev.

Examples

Example 1: Generate a 1200×630 social share card image from an HTML template with a per-item title.

HTML with a {{title}} placeholder; Template Variables key=title, value set by an expression; Width 1200, Height 630; Format PNG; Return As Binary File.

Example 2: Produce a compressed WebP banner to embed in an email.

HTML banner markup; Format WebP, Quality 80; Scale 2× (Retina); Return As Data URL.

Example 3: Capture only one card element from a larger HTML snippet.

HTML containing

; Advanced Options CSS Selector '#card' (Pro+); Return As Base64 String.

Links

Discussion