
Capture one element
Export a card, chart, or receipt without the rest of the page. This request selects .report-card and leaves the header and footer out of the image.
"selector": ".report-card"
HTML-to-image for AI agents
Turn an agent's structured results into HTML and CSS, then render them as a hosted image without running Chromium.
Live demo
Edit the HTML and CSS, choose the image settings, and render the result with the same API used in production.
Add it to your app
Send HTML and CSS from your server. The API renders it in Chromium and returns an image URL you can use in your application, emails, or social posts.
Replace the API credentials in the example with your own. The language tabs include both direct HTTP requests and official clients with typed requests and responses.
Start with 50 free images each month. See plans and pricing or the API reference.
{
"url": "https://hcti.io/v1/image/01a209b1-03d8-7455-9aea-a32bb48b8e4f.png",
"id": "01a209b1-03d8-7455-9aea-a32bb48b8e4f"
}
Each request returns its own image ID and URL. Embed the URL directly or download the file.
import { HtmlCssToImageClient, CreateHtmlCssImageRequest } from "@html-css-to-image/client";
const client = HtmlCssToImageClient.fromEnv();
const request = new CreateHtmlCssImageRequest({
html: `<div class="card">
<h1>Hello, world!</h1>
<p>Generated from HTML and CSS.</p>
</div>`,
css: `.card {
width: 480px;
padding: 40px;
background: #f0fdf4;
color: #052e16;
font-family: sans-serif;
}`,
format: "png",
});
const result = await client.createImage(request);
if (result.success) {
console.log(result.url);
} else {
console.error(result.error);
}
Rendering examples
Capture a single component, use your brand's font, or export a PNG with a transparent background. These are actual API renders.

Export a card, chart, or receipt without the rest of the page. This request selects .report-card and leaves the header and footer out of the image.
"selector": ".report-card"

This card uses Roboto at weight 700, loaded by name. For a custom font, link to your own stylesheet with an @font-face rule.
"google_fonts": "Roboto:700"

Place a badge over a website, slide, or product photo without a white rectangle around it. The checkerboard shows the transparent part of this PNG.
"transparent_background": true
Output formats
Keep the same HTML and CSS. Choose lossless detail, compact compatibility, modern web delivery, or a paginated document.
Crisp text, sharp UI details, and transparent backgrounds for designed graphics.
Explore PNGSmaller files and broad compatibility for photography, previews, and content-heavy pages.
Explore JPEGStrong visual quality, transparency, and modern compression for web delivery.
Explore WebPPaginated documents with page sizing, margins, backgrounds, and print styles.
Explore PDFImage sizing
Set the layout, choose the pixel density, and capture exactly the area you need.
Choose the width and height in CSS pixels to render desktop, mobile, or custom responsive layouts.
Increase pixel density to 2× or 3× for more output pixels without changing the layout's CSS dimensions.
Crop to an element with a CSS selector, or capture the full scrollable page when rendering a URL.
Rendering controls
Control how the page looks and when it's captured, without maintaining your own browser automation.
Request light or dark mode, set the timezone, and choose screen or print media to match the result you need.
Style your HTML or inject CSS into a webpage to hide unwanted elements. Include JavaScript in your HTML for charts and dynamic content.
Add a delay or wait for your page to call ScreenshotReady(), so charts and application data are ready before capture.
You
HTML/CSS to Image
HTML/CSS to Image
MCP integration
Connect an MCP-compatible AI client to HCTI through OAuth.
Generate images and PDFs, capture webpages, and work with templates without putting an API key in the prompt.
Use cases
Turn recommendations, plans, comparisons, and summaries into a compact image a person can review.
Format findings, metrics, and source links as a report image.
Give agents a consistent way to preview generated layouts before publishing or sending them elsewhere.
Attach the rendered result to a run log or approval record.
Ready to render?
Send HTML and CSS to the API and receive a hosted image URL without running browser infrastructure.
HTML-to-image workflows
See how developers, marketers, sales teams, and AI agents turn application data into images.
Generate images from application HTML and CSS without maintaining a browser service.
View workflowGenerate branded campaign, social, and personalized images from live data.
View workflowCreate personalized account, proposal, and outreach images from sales data.
View workflowOfficial API clients
Send HTML, CSS, and render options from your application using one of our official API clients.
Choose your language for setup instructions and examples. Keep API credentials in your server-side code.
We take pride in creating native clients and integrations—not relying on code generation. All our clients are open source, and contributions are welcome.