Connect HTML to Image to your AI assistant. It writes the HTML and CSS, we render the pixels, and the image comes back in the conversation. One tool call.
Available on paid plans. Same credits as the API.
Every image on this page was generated through the HTML to Image API.
Turn any MCP-capable assistant into an image generator that designs, renders and iterates on its own.
Ask your assistant for a card, an OG image or an invoice. It writes the HTML, renders it, and hands back a URL. No context switch, no glue code.
Every render returns a preview image, so the assistant can review the result and refine the design until it is right - the same loop a human designer uses.
One endpoint, one API key. Claude Code, Claude Desktop, Cursor, VS Code, Windsurf, Antigravity, Gemini CLI and Codex all connect natively.
Real Chrome rendering, modern CSS, server-side Google Fonts, PNG or PDF output. Metered against the same credits as the REST API - one credit per image.
Ask in plain language. Your assistant writes the HTML and calls the tool. Here is the kind of thing it ships back.
"Make a build-in-public quote card."
"Render this month’s revenue as a stat card."
"Design a free workshop ticket."
Pick a paid plan and create a key on the API keys page. The key doubles as your MCP bearer token.
Paste one line into Claude Code, or a small config block into Cursor, VS Code or Claude Desktop. Setup takes a minute.
Tell your assistant what you want. It writes the markup, calls the tool, and returns a shareable image URL.
Using Claude Code? Add the server with a single command. Every other client takes a small config block.
claude mcp add --transport http html2img https://app.html2img.com/mcp \
--header "Authorization: Bearer YOUR_API_KEY" Render HTML and CSS to a PNG or PDF. The model designs the markup; we return the image. Ideal for cards, OG images, invoices and certificates.
Capture a screenshot of any live, public web page by URL. Inject CSS to hide banners, or target a single element with a selector.
ChatGPT connectors require OAuth and cannot use an API key, so they are not supported yet.
Pick a plan, grab a key, and connect in a minute. Paid plans from $9 a month · setup for every client.