Images

HTML to image (PNG, JPEG or WebP)

Renders HTML (with inline CSS; fonts and images from the internet are allowed, JavaScript is not executed) into an image. Ideal for social cards, certificates, tickets, OG images or any design you can describe in HTML. Send either html, or template + data to use a ready-made design.

Costs 1 credit per call.

post/capture

Request

  • Base URL: https://api.cofferdock.com
  • URL: https://api.cofferdock.com/capture
  • Auth: API key in header x-api-key

Request body

htmlstring

The HTML to render (max 5 MB). Put the CSS inline or in a <style> tag. Required unless you use template.

template'social' | 'og' | 'invoice' | 'receipt' | 'certificate' | 'youtube'

Use one of our ready-made designs instead of sending html. Fields, example texts and sizes: https://cofferdock.com/templates.json

dataobject

Texts for the template, e.g. { "name": "Jane Doe", "course": "n8n basics" } for "certificate". Plain text only: everything is escaped. Fields you leave out keep the example text.

lang'en' | 'es'

Language of the example texts of the template.

widthinteger

Image width in pixels (100-3840). Default 1200.

heightinteger

Image height in pixels (100-2160). Default 630, the standard social-card (Open Graph) proportion.

format'png' | 'jpeg' | 'webp'

Image format: "png" (lossless, default), "jpeg" or "webp".

qualityinteger

For jpeg and webp.

full_pageboolean

Capture the whole content height instead of the viewport.

wait_msinteger

Extra wait before the snapshot.

output'json' | 'binary' | 'url' | 'image'

How to return the image: "json" (base64 in the JSON response), "binary" (the image itself, ready for n8n/Make/Zapier) or "url" (a temporary download link, valid 15 minutes). Default: json when the request is JSON, binary when the input was sent raw.

Response

The resulting image (shape depends on output).

OR

Changes

No recorded changes to this operation across all 1 revision of this API.