Templates

Create a new template

post/v1/template

Request body

htmlstring required

HTML to render for the template. Use Handlebars placeholders for values that will be substituted when an image is rendered. Must be non-empty, contain at least one Handlebars placeholder, and compile as valid Handlebars.

namestring nullable

The name of the template, used to identify it in your account. Maximum: 64 characters.

descriptionstring nullable

An optional description of the template for your reference. Maximum: 1024 characters.

cssstring nullable

CSS used to style images rendered from the template. Handlebars expressions are not supported in CSS; put dynamic CSS in the HTML instead.

device_scalenumber double nullable

Adjusts the pixel ratio used for the screenshot. Minimum: 0.1. Maximum: 3. HTML and template renders default to 2; URL renders default to 1.

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.

max_wait_msinteger nullable

Sets a limit on how long to wait before taking the screenshot when the page continues loading irrelevant content. Minimum: 500. Maximum: 10000 and subject to the account plan limit.

ms_delayinteger nullable

Adds extra time in milliseconds before taking the screenshot so JavaScript can execute. Minimum: 0. Maximum: 10000.

render_when_readyboolean nullable

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

viewport_heightinteger nullable

Sets the height of Chrome's viewport and disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together.

viewport_widthinteger nullable

Sets the width of Chrome's viewport and disables automatic cropping. Minimum: 1. Maximum: 6000. Both viewport dimensions must be supplied together.

disable_twemojiboolean nullable

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

{"stackTrail":"components:schemas:ColorSchemeType","oasType":"schema","type":"unknown"}
timezonestring nullable

Sets the IANA timezone used by Chrome while rendering. Must be a recognized IANA timezone identifier.

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.

{"stackTrail":"components:schemas:MediaType","oasType":"schema","type":"unknown"}
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. Supply both jumbo dimensions. Each must be greater than 0 and no more than 80000; at least one must exceed 8000; total area cannot exceed 400000000 pixels.

jumbo_max_widthinteger nullable

Maximum width of the rendered image in jumbo mode. Jumbo rendering consumes additional renders and requires jumbo_max_height. Supply both jumbo dimensions. Each must be greater than 0 and no more than 80000; at least one must exceed 8000; total area cannot exceed 400000000 pixels.

transparent_backgroundboolean nullable

Specifies whether the image is rendered with a transparent background.

Response

OK

template_idstring
template_versioninteger

Changes