Images

Create and render an image

get/v1/image/create-and-render/{api_id}/{token}/{format}

Path parameters

api_idstring required
tokenstring required

An HMAC encoded token of your API key and the parameters specified in your query params. See https://docs.htmlcsstoimage.com/getting-started/create-and-render/#understanding-hmac-authentication for more information.

format'png' | 'jpg' | 'webp' | 'pdf' nullable required

The format of the image to return. If this field is omitted, it defaults to png.

Query parameters

cssstring nullable

CSS used to style the rendered HTML.

device_scalenumber double nullable

Adjusts the pixel ratio used for the screenshot.

full_screenboolean nullable

Take a screenshot of the entire screen after scrolling down and back to the top.

google_fontsstring nullable

Google fonts to load. Separate multiple fonts with a pipe, such as 'Roboto|OpenSans', and set font-family in the CSS to use them.

htmlstring nullable

HTML to render and take a screenshot of. HTML fragments are rendered in a wrapper document unless a complete HTML document is supplied.

max_wait_msinteger nullable

Sets a limit on how long to wait before taking the screenshot when the page continues loading irrelevant content.

ms_delayinteger nullable

Adds extra time in milliseconds before taking the screenshot so JavaScript can execute.

render_when_readyboolean nullable

Waits until the page signals that the screenshot is ready. The image fails if the readiness signal is never sent.

selectorstring nullable

A CSS selector for an element in the HTML. We’ll crop the image to this specific element.

urlstring nullable

Public HTTP or HTTPS URL to capture.

viewport_heightinteger nullable

Sets the height of Chrome's viewport and disables automatic cropping.

viewport_widthinteger nullable

Sets the width of Chrome's viewport and disables automatic cropping.

disable_twemojiboolean nullable

Disables the Twemoji fallback and renders emoji using native fonts instead.

max_render_onceboolean nullable

Ensure the image is only ever rendered and saved one time. This is an advanced option not applicable to most requests.

color_scheme'light' | 'dark' nullable

Sets Chrome's preferred color scheme.

timezonestring nullable

Sets the IANA timezone used by Chrome while rendering.

block_consent_bannersboolean nullable

Attempt to block cookie/consent banners from displaying.

identify_as_hctiboolean nullable

Identify the top-level page navigation as an HCTI screenshot request using the X-HCTI-SCREENSHOT header.

headersstring[]

HTTP headers to include on top-level page navigations to the requested URL's origin and any additional_header_origins. Supports up to 20 headers with names up to 512 ASCII characters and values up to 8192 UTF-8 bytes. For GET and form-encoded requests, repeat this parameter using the format headers=name:value.

additional_header_originsstring[]

Additional exact HTTP or HTTPS origins allowed to receive custom headers. Supports up to 20 unique origins of up to 512 UTF-8 bytes each. Origins must use the format scheme://host[:port] without a path; duplicates are ignored. For GET and form-encoded requests, repeat this parameter for each origin.

include_headers_on_subrequestsboolean nullable

Include custom headers on subrequests to the requested URL's origin and any additional_header_origins. Defaults to false.

viewport_mobileboolean nullable

Specifies whether the page uses mobile viewport behavior, including its viewport meta tag.

viewport_landscapeboolean nullable

Specifies whether the emulated viewport is in landscape orientation.

viewport_touchboolean nullable

Specifies whether the emulated viewport supports touch events.

media_type'print' | 'screen' nullable

Sets the CSS media type used while rendering the page.

proxy_idstring nullable

Specifies which configured organization proxy to use when rendering.

storage_destination_idstring nullable

Specifies which configured organization storage destination receives the rendered image.

jumbo_max_heightinteger nullable

Maximum height of the rendered image in jumbo mode. Jumbo rendering consumes additional renders and requires jumbo_max_width.

jumbo_max_widthinteger nullable

Maximum width of the rendered image in jumbo mode. Jumbo rendering consumes additional renders and requires jumbo_max_height.

transparent_backgroundboolean nullable

Specifies whether the image is rendered with a transparent background.

Changes

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