Skip to main content

Rendering

Pictify renders HTML/CSS templates to various output formats. This page covers rendering options, formats, and optimization.

Output Formats

Images

Documents

Animated

Rendering Options

Dimensions

Maximum dimensions: 4000x4000 pixels for authenticated users, 2000x2000 for public/trial.

Format

renderHtml writes a PNG by default. Set format to choose the output type — it maps to the /image endpoint’s fileExtension:
The /image endpoint does not expose a quality knob. To control raster compression, render through a template (pictify.render({ templateId, quality }), where quality is 0.11.0).

Selector

Capture a specific element instead of the full page:

Image Generation

From HTML

From URL

Capture a screenshot of any URL:

From Template

Render a saved template with variables:

Layout Variants

Templates can have multiple layout variants for different platforms (e.g., Twitter, Facebook, Instagram). Render a specific layout or multiple layouts at once:
The default layout is the base template. Use the layout key (e.g., twitter-post, facebook-post) to render a specific variant. Layout keys are set when creating variants via the AI Resize feature in the editor.

From Canvas Data

Render FabricJS canvas data directly via the POST /image/canvas REST endpoint. The SDKs don’t wrap this endpoint, so call it with your HTTP client of choice:
See the Create Canvas Image reference for the full request schema.

GIF Generation

From HTML Animation

Capture CSS animations:

From a Live URL

Record motion on a live page:

Quality Presets

PDF Generation

From a Template (SDK)

The quickest way to produce a PDF is to render a template with format: 'pdf':

Paper Sizes & Multi-Page (REST)

The dedicated PDF endpoints (POST /pdf/render and POST /pdf/multi-page) accept paper-size presets, margins, and per-page content. The SDKs don’t wrap these directly, so call them with your HTTP client:
See the PDF Generation reference for all options.

PDF Presets

Screenshot a Section of a Page

To capture a specific region of a live page, screenshot the URL and crop to an element with selector:
Prefer natural language? The Pictify MCP server lets AI agents request screenshots conversationally — the SDKs themselves expose the direct renderUrl call shown above.

Response Format

The template render endpoint always returns a results array, even for single-layout renders:
Multi-layout response:
Other render endpoints (HTML, URL, GIF) return:

User Storage

If you’ve configured user storage (S3, R2, etc.), renders are also uploaded to your storage:

Batch Rendering

Render many variable sets from a single template. Batch rendering is asynchronous: submitting returns immediately with a batchId, and the job runs in the background.

Request

Pass layout (string) for a single variant, or layouts (array) for multiple variants per item.

Tracking Progress

Poll getBatchResults(batchId) to track status. The poll response reports per-item index, success, and variables — but not rendered URLs:
Rendered URLs are not returned by the poll endpoint. Final image URLs are delivered via the render.completed webhook — subscribe to webhooks to collect batch output. See the Batch Processing guide for the full workflow.

Performance Tips

  1. Use appropriate dimensions - Don’t render larger than needed
  2. Choose the right format - JPEG for photos, PNG for graphics, WebP for best compression
  3. Tune template quality - for template renders, quality 0.9 is usually indistinguishable from 1.0
  4. Batch similar renders - Use batch rendering for many images from one template
  5. Cache rendered images - Store URLs and reuse instead of re-rendering