HTML to Image
What it is
Section titled “What it is”Native tool that converts an HTML/CSS snippet into a rasterized image (PNG, JPEG, or WebP). The agent writes the HTML and receives the rendered image back.
When to use
Section titled “When to use”- Social posts with consistent layout.
- Product cards, coupons, banners, visual receipts.
- Creatives with typography, gradients, and exact layout — when you want pixel control, not a generative model.
- Dynamic templates: HTML with variable data filled by the agent.
Unlike Generate Image (generative model), here the result is deterministic: same HTML, same image.
Configuration
Section titled “Configuration”- In the agent’s Tools tab, click + Add Tool.
- Under NATIVE TOOLS, pick HTML to Image.
- Optionally, set defaults for the parameters:
- html: default HTML/CSS (rare to set here — usually the AI decides).
- width: default width in pixels.
- height: default height in pixels.
- format:
webp,png, orjpeg.
- Each parameter can be left as Auto (AI decides per call) or set to Manual with a fixed value.
- Click Save.
Setting manual defaults is useful when you want to lock a format (for example, always 1080x1080 webp for Instagram posts) and not let the AI choose.
How the agent invokes
Section titled “How the agent invokes”The agent decides to call this tool when the prompt guides it or when the user asks for something visual with specific format (“a 1080x1080 card with title X and subtitle Y”).
The agent composes the HTML internally — you don’t have to provide a template. The more specific the agent prompt about style, palette, and structure, the more consistent the result.
Limitations and notes
Section titled “Limitations and notes”- Simple HTML works best. External images, web fonts, and scripts may not load. Prefer inline styles and system fonts.
- Deterministic result. Same HTML produces the same image — good for standardization, bad for creative variation.
- No image model cost. Since it doesn’t use generative AI, the cost is only the prompt the agent spends generating the HTML.
- Sensible sizes. Very high width/height (above ~2000px) can increase latency.