HTML + CSS to PNG

Route POST /api/v1/image (server url + path). Markup in, hosted PNG out: returns the URL of the rendered PNG (Content-Type image/png). html is required and capped at 1MB, rejected locally before the upload. url is not accepted here - for a URL capture use /screenshot. 1 credit per image; an identical repeat within 30 minutes is a content-hash cache hit, returns cached:true and is free. Failed calls are never charged.

post/image

Request

  • Base URL: https://fastcrawl.net/api/v1
  • URL: https://fastcrawl.net/api/v1/image
  • Auth: HTTP bearer

Request body

htmlstring required

The HTML document to render (max 1MB).

cssstring

Extra CSS applied to the document.

viewport_widthinteger

Viewport width in px (default 800).

viewport_heightinteger

Viewport height in px (default 600).

google_fontsstring

Google Fonts to load, e.g. Inter:wght@400;700.

Response

PNG URL, plus cached:true on a free cache hit.

successboolean
urlstring uri

Serves content-type image/png.

cachedboolean

true on an upstream cache hit - the repeat is not billed.

Changes

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