HTML/CSS to Image
htmlcss_to_imageHTML/CSS to Image converts HTML, CSS, public web pages, and reusable templates into images and PDFs through an API.
Acciones disponibles (10)
Cada acción es una operación que el agente puede ejecutar contra este conector. Haz clic en una acción para ver sus parámetros.
Create ImageHTMLCSS_TO_IMAGE_CREATE_IMAGEAcciónCreate a hosted image from HTML/CSS or an internet-reachable webpage, including authenticated pages using request headers. Use GET_IMAGE afterward to download, resize, crop, or convert it.
HTMLCSS_TO_IMAGE_CREATE_IMAGEAcciónCreate a hosted image from HTML/CSS or an internet-reachable webpage, including authenticated pages using request headers. Use GET_IMAGE afterward to download, resize, crop, or convert it.
Parámetros de entrada
cssstringCSS applied to supplied HTML or injected into a captured webpage.
urlstringAbsolute, internet-reachable HTTP(S) webpage URL to capture. Set this or html, but not both; use headers for authenticated pages.
htmlstringHTML to render. Set this or url, but not both.
headersobjectHTTP headers sent to the captured page, with at most 20 case-insensitive names.
ms_delayintegerDelay rendering by 0 to 10000 milliseconds.
selectorstringCSS selector for the element to capture.
timezonestringIANA timezone exposed to the rendered page.
media_typestringenumCSS media type used while rendering: screen or print.
screenprintfull_screenbooleanCapture the full scrollable page instead of only the viewport.
max_wait_msintegerMaximum wait from 500 to 10000 milliseconds for page loading.
color_schemestringenumPreferred browser color scheme: light or dark.
lightdarkdevice_scalenumberDevice scale factor from 0.1 to 3.
google_fontsstring[]Google Font family names to load while rendering.
viewport_widthintegerViewport width in pixels, from 1 to 6000. Requires viewport_height.
viewport_heightintegerViewport height in pixels. Requires viewport_width.
dedupe_duration_sintegerReuse a matching recent render for this many seconds. Allowed durations depend on the account plan; free accounts accept 0 or 2592000 (30 days).
render_when_readybooleanWait until the page signals that rendering is ready.
block_consent_bannersbooleanAttempt to block common consent banners.
transparent_backgroundbooleanRender a transparent background where supported.
additional_header_originsstring[]Up to 20 unique exact HTTP(S) origins that may also receive headers.
include_headers_on_subrequestsbooleanAlso include supplied headers on page subrequests.
Parámetros de salida
dataanyObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Create Image from TemplateHTMLCSS_TO_IMAGE_CREATE_IMAGE_FROM_TEMPLATEAcciónCreate an image from a reusable template using the latest version or an explicitly selected version.
HTMLCSS_TO_IMAGE_CREATE_IMAGE_FROM_TEMPLATEAcciónCreate an image from a reusable template using the latest version or an explicitly selected version.
Parámetros de entrada
template_idstringObligatorioTemplate ID from LIST_TEMPLATES or CREATE_TEMPLATE.
template_valuesobjectObligatorioValues supplied to the template's Handlebars variables.
template_versionintegerSpecific version to render; omit to use the latest version.
Parámetros de salida
dataanyObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Create Images BatchHTMLCSS_TO_IMAGE_CREATE_IMAGES_BATCHAcciónCreate 1 to 25 hosted images from HTML/CSS or internet-reachable webpages in one request, including authenticated pages using shared or per-image headers. Requires an account plan that supports batch creation.
HTMLCSS_TO_IMAGE_CREATE_IMAGES_BATCHAcciónCreate 1 to 25 hosted images from HTML/CSS or internet-reachable webpages in one request, including authenticated pages using shared or per-image headers. Requires an account plan that supports batch creation.
Parámetros de entrada
variationsobject[]ObligatorioOne to 25 image requests; each overrides matching default_options fields.
default_optionsobjectShared render settings applied before each variation's overrides.
Parámetros de salida
dataanyObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Create TemplateHTMLCSS_TO_IMAGE_CREATE_TEMPLATEAcciónCreate a reusable Handlebars HTML/CSS image template. WARNING: the template is persistent because the API exposes no delete operation, and a free account can hold only one template.
HTMLCSS_TO_IMAGE_CREATE_TEMPLATEAcciónCreate a reusable Handlebars HTML/CSS image template. WARNING: the template is persistent because the API exposes no delete operation, and a free account can hold only one template.
Parámetros de entrada
cssstringCSS applied to the template.
htmlstringObligatorioHandlebars HTML for the reusable template.
namestringTemplate name, at most 64 characters.
descriptionstringTemplate description, at most 1024 characters.
render_optionsobjectOptional free-tier render settings for this template.
Parámetros de salida
dataanyObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Delete ImageHTMLCSS_TO_IMAGE_DELETE_IMAGEAcciónPermanently delete one generated image and clear its HCTI CDN cache. Copies previously written to external storage are not deleted.
HTMLCSS_TO_IMAGE_DELETE_IMAGEAcciónPermanently delete one generated image and clear its HCTI CDN cache. Copies previously written to external storage are not deleted.
Parámetros de entrada
image_idstringObligatorioImage ID to permanently delete.
Parámetros de salida
dataanyObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Delete Images BatchHTMLCSS_TO_IMAGE_DELETE_IMAGES_BATCHAcciónPermanently delete multiple generated images and clear their HCTI CDN caches. Copies previously written to external storage are not deleted.
HTMLCSS_TO_IMAGE_DELETE_IMAGES_BATCHAcciónPermanently delete multiple generated images and clear their HCTI CDN caches. Copies previously written to external storage are not deleted.
Parámetros de entrada
image_idsstring[]ObligatorioNon-empty list of image IDs to permanently delete.
Parámetros de salida
dataanyObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Get or Transform ImageHTMLCSS_TO_IMAGE_GET_IMAGEAcciónDownload a generated image by ID, optionally converting its format, resizing it, or cropping it.
HTMLCSS_TO_IMAGE_GET_IMAGEAcciónDownload a generated image by ID, optionally converting its format, resizing it, or cropping it.
Parámetros de entrada
dpiintegerOutput DPI from 30 to 600, primarily for PDF output.
widthintegerOutput width in pixels, up to 5000.
formatstringenumOutput file format. Defaults to PNG when omitted.
pngjpgwebppdfheightintegerOutput height in pixels, up to 5000.
crop_topstringTop crop coordinate or percentage.
image_idstringObligatorioGenerated image ID returned by an image creation tool.
x_originstringenumHorizontal origin used for aspect-ratio cropping.
startcenterendy_originstringenumVertical origin used for aspect-ratio cropping.
startcenterendcrop_leftstringLeft crop coordinate or percentage.
crop_rightstringRight crop coordinate or percentage.
crop_widthstringCrop width as a pixel coordinate or percentage.
crop_bottomstringBottom crop coordinate or percentage.
crop_heightstringCrop height as a pixel coordinate or percentage.
aspect_ratiostringCrop aspect ratio in width_height form, such as 16_9.
Parámetros de salida
dataanyObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Get UsageHTMLCSS_TO_IMAGE_GET_USAGEAcciónReturn recent hourly, daily, monthly, and billing-period image usage for the connected account.
HTMLCSS_TO_IMAGE_GET_USAGEAcciónReturn recent hourly, daily, monthly, and billing-period image usage for the connected account.
Parámetros de entrada
Sin parámetros.
Parámetros de salida
dataanyObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
List TemplatesHTMLCSS_TO_IMAGE_LIST_TEMPLATESAcciónList reusable image templates owned by the connected account, including their current version, source, and render settings.
HTMLCSS_TO_IMAGE_LIST_TEMPLATESAcciónList reusable image templates owned by the connected account, including their current version, source, and render settings.
Parámetros de entrada
Sin parámetros.
Parámetros de salida
dataanyObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not
Update TemplateHTMLCSS_TO_IMAGE_UPDATE_TEMPLATEAcciónCreate a new version of an existing template using replacement Handlebars HTML and optional CSS or render settings.
HTMLCSS_TO_IMAGE_UPDATE_TEMPLATEAcciónCreate a new version of an existing template using replacement Handlebars HTML and optional CSS or render settings.
Parámetros de entrada
cssstringCSS for the new template version.
htmlstringObligatorioReplacement Handlebars HTML for the new template version.
namestringTemplate name, at most 64 characters.
descriptionstringTemplate description, at most 1024 characters.
template_idstringObligatorioExisting template ID from LIST_TEMPLATES or CREATE_TEMPLATE.
render_optionsobjectOptional free-tier render settings for the new template version.
Parámetros de salida
dataanyObligatorioData from the action execution
errorstringError if any occurred during the execution of the action
successfulbooleanObligatorioWhether or not the action execution was successful or not