Skip to content

Latest commit

 

History

History
83 lines (53 loc) · 2.62 KB

File metadata and controls

83 lines (53 loc) · 2.62 KB
title layout nav_order
HTML/CSS to Image API
default
1

HTML/CSS to Image API

{: .fs-9 }

Your search for pixel perfect image generation ends here. {: .fs-6 .fw-300 }

Live demo{: .btn .btn-primary .fs-5 .mb-4 .mb-md-0 .mr-2 } Get an API Key{: .btn .fs-5 .mb-4 .mb-md-0 }


The API for generating high quality images from HTML/CSS.

  • Converts HTML to png, jpg or webp
  • Screenshot any URL
  • No janky fonts or blurry images

Two ways to generate images

From HTML/CSS

Create images programmatically using HTML and CSS. Perfect for social cards, certificates, dynamic graphics, and more.

curl -X POST https://hcti.io/v1/image -u 'UserID:APIKey' \
  -d html="<div style='padding:20px;background:#4f46e5;color:white;font-size:24px;'>Hello World</div>"

Learn more about HTML to Image →

From any URL

Take screenshots of any public webpage. Great for archiving, previews, and automated captures.

curl -X POST https://hcti.io/v1/image -u 'UserID:APIKey' \
  --data-urlencode url="https://google.com"

Learn more about URL to Image →


Quick start

Choose your path to get started:

I want to... Go here
Read the API docs Using the API
See example code PHP, JavaScript, Ruby, Python, Go, cURL
Use with AI assistants MCP Server for Cursor, Claude, Windsurf, and more
No-code options Zapier or Make
See use cases Use Cases & Examples

{% include hint.md title="Works with any language" text="Don't see your language? The API works with anything that can make HTTP requests. See the cURL example and adapt it to your stack." %}


Trusted by developers worldwide

Companies like Dev.to, Product Hunt, and thousands of developers use HTML/CSS to Image to generate millions of images every month.

{% cloudinary /assets/images/image%20%2823%29.png alt="Dev.to social card generated from HTML" %}

Dev.to uses the API to autogenerate thousands of custom social images for Twitter and Facebook.

See more use cases →


Get an API key

To use this API, you'll need an API key. Get started for free:

Get an API Key{: .btn .btn-blue .fs-5 .mb-4 .mb-md-0 .mr-2 }