Skip to content
HTML/CSS to ImageDocs

Detailed information on all the available parameters for the API.

The create image endpoint accepts the following parameters. Accepted as either json or formdata.

Name Type Description
html String This is the HTML you want to render. You can send an HTML snippet (<div>Your content</div>) or an entire webpage.
css String The CSS for your image. When using with url it will be injected into the page.
url String The fully qualified URL to a public webpage. Such as https://htmlcsstoimage.com. When passed this will override the html param and will generate a screenshot of the url.

Optional parameters for greater control over your image.

NameTypeDescription
additional_header_originsArrayAllow custom headers on requests to specific additional HTTP or HTTPS origins.
block_consent_bannersBooleanWhen set to true, automatically blocks cookie consent banners and popups on websites. Most useful for URL screenshots.
color_schemeStringSet Chrome to render in light or dark mode. Affects websites using prefers-color-scheme.
dedupe_duration_sIntegerReuse an identical recent image without consuming image credits. Sets the lookback window in seconds; defaults and allowed values vary by image type and plan.
device_scaleDoubleControl resolution by adjusting the pixel ratio from 0.1 to 3. Higher values increase image quality and file size.
disable_twemojiBooleanSet to true to use native emoji fonts instead of Twemoji.
formatStringChoose the file extension in the initially returned image URL: png, jpg, webp, or pdf.
full_screenBooleanGenerate an image of the entire height of a URL page.
google_fontsStringLoad one or more Google fonts, such as Roboto|Open Sans.
headersObjectAdd custom HTTP headers when screenshotting a URL. Headers are restricted to the requested URL's origin and any additional_header_origins.
identify_as_hctiBooleanAdd X-HCTI-SCREENSHOT: 1 to the top-level request when screenshotting a URL.
include_headers_on_subrequestsBooleanAlso add custom headers to same-origin subrequests and subrequests matching additional_header_origins.
jumbo_max_heightIntegerMaximum output height in jumbo mode, up to 80,000 pixels. Must be set with jumbo_max_width and consumes additional image credits.
jumbo_max_widthIntegerMaximum output width in jumbo mode, up to 80,000 pixels. Must be set with jumbo_max_height and consumes additional image credits.
max_wait_msIntegerSet a maximum time limit from 500 to 10000 milliseconds for waiting before taking the screenshot.
media_typeStringSet Chrome to render using screen or print CSS media styles.
ms_delayIntegerDelay before generating the image. Useful when waiting for JavaScript; start with 500 milliseconds.
pdf_optionsObjectCustomize PDF output with page size, margins, scale, and background printing.
proxy_idStringRoute outbound traffic through one of your organization's configured HTTP proxies. Available on the 10,000 images/month plan or higher.
render_when_readyBooleanWait to generate the image until JavaScript calls ScreenshotReady().
selectorStringCrop the image to an element matching this CSS selector, such as section#complete-toolkit.container-lg.
storage_destination_idStringSave rendered files to one of your organization's configured storage destinations. Available on the 10,000 images/month plan or higher.
timezoneStringSet Chrome's timezone with an IANA identifier such as America/New_York.
transparent_backgroundBooleanSet to true to render with a transparent background.
viewport_heightIntegerSet the height of Chrome's viewport. Both dimensions must be set when using either.
viewport_landscapeBooleanSet Chrome's viewport to landscape mode.
viewport_mobileBooleanSet Chrome's viewport to emulate a mobile device.
viewport_touchBooleanSet Chrome's viewport to support touch events.
viewport_widthIntegerSet the width of Chrome's viewport. Both dimensions must be set when using either.
Live demo Get an API Key