> ## Documentation Index
> Fetch the complete documentation index at: https://composio-preview.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# HTML to Image

> HTML to Image is a service that converts HTML and CSS into images or captures screenshots of web pages.

![HTML to Image logo](https://mintcdn.com/composio-preview/o1IUBrrsmtgkhmyf/images/toolkits/html_to_image.svg?fit=max\&auto=format\&n=o1IUBrrsmtgkhmyf\&q=85\&s=0bc14d87a90d965e2ca6b3d9f22ff3b6)

* **Category:** images & design
* **Auth:** API\_KEY
* **Composio-managed OAuth available?** N/A
* **Tools:** 3
* **Triggers:** 0
* **Slug:** `HTML_TO_IMAGE`
* **Version:** 20261101\_00

## Tools

> [accordion] Check HTML-to-Image Account Usage
>
> **Slug:** `HTML_TO_IMAGE_CHECK_USAGE`
>
> Attempts to retrieve hourly, daily, monthly and billing-period image usage from custom and common account usage endpoints. It returns empty statistics when no usable response is found or a response lacks recognizable usage data; endpoint failures can instead raise an error.
>
> #### Input Parameters
>
> **endpoint\_paths** `array`
>
> Optional custom endpoint paths to try for usage statistics (e.g., \['/v1/usage', '/api/stats']). Supports both relative paths (e.g., '/v1/usage') and fully-qualified URLs (e.g., '[https://api.example.com/usage](https://api.example.com/usage)'). If not provided, the action tries built-in candidates: /v1/usage, /api/usage, /v1/account/usage, /api/account/usage.
>
> **return\_defaults\_on\_error** `boolean`
>
> If true (default), returns empty usage statistics when no endpoint is found or all endpoints fail. If false, raises an error with details about which endpoints were tried. Recommended to keep as true for graceful handling when the API provider doesn't support usage endpoints.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Convert HTML to Image
>
> **Slug:** `HTML_TO_IMAGE_CONVERT_TO_IMAGE`
>
> Tool to convert HTML content into an image. Returns either a downloadable file or a JSON payload containing id and url, depending on the upstream API behavior.
>
> #### Input Parameters
>
> **html** `string` *required*
>
> HTML content to render into an image
>
> **width** `integer`
>
> Width of the output image in pixels; must be >=1 Maximum enforced limit may apply; exceeding it can cause validation errors or silent downscaling.
>
> **height** `integer`
>
> Height of the output image in pixels; must be >=1 Maximum enforced limit may apply; exceeding it can cause validation errors or silent downscaling.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not

> [accordion] Get HTML to Image
>
> **Slug:** `HTML_TO_IMAGE_GET_IMAGE`
>
> Retrieve a previously generated image by its URL. Use this to fetch, resize, or download an existing HTML-to-image asset. The image URL is typically obtained from the 'url' field of the HTML\_TO\_IMAGE\_CONVERT\_TO\_IMAGE response.
>
> #### Input Parameters
>
> **dl** `integer ("0" | "1")`
>
> Set to 1 to serve the image as a downloadable attachment.
>
> **dpi** `integer`
>
> Optional DPI metadata for the image; maximum 600.
>
> **width** `integer`
>
> Optional output width in pixels; maximum 5000.
>
> **height** `integer`
>
> Optional output height in pixels; maximum 5000.
>
> **image\_id** `string` *required*
>
> Full URL of the generated image (e.g., '[https://i.html2img.com/image-1234567890-123456.png](https://i.html2img.com/image-1234567890-123456.png)'), typically obtained from the 'url' field of the HTML\_TO\_IMAGE\_CONVERT\_TO\_IMAGE response. You may also provide just a partial path or append .png, .jpg, or .webp to select the format.
>
> #### Output
>
> **data** `string` *required*
>
> Data from the action execution
>
> **error** `string`
>
> Error if any occurred during the execution of the action
>
> **successful** `boolean` *required*
>
> Whether or not the action execution was successful or not
