Skip to content
HTML/CSS to ImageDocs

Start here to learn how to use the HTML/CSS to Image API.

Live demo Get an API Key

Sign up at htmlcsstoimage.com and grab your API ID and API Key from the dashboard.

Choose your approach:

Generate from HTML/CSS:

Terminal window
curl -X POST https://hcti.io/v1/image -u 'API_ID:API_KEY' \
-d html="<div style='padding:20px;background:#4f46e5;color:white;'>Hello World</div>"

Screenshot a URL:

Terminal window
curl -X POST https://hcti.io/v1/image -u 'API_ID:API_KEY' \
--data-urlencode url="https://google.com"

The API returns a URL to your generated image. Use it anywhere - in emails, social media, websites, or download it for other uses.

{
"url": "https://hcti.io/v1/image/be4c5118-fe19-462b-a49e-48cf72697a9d",
"id": "be4c5118-fe19-462b-a49e-48cf72697a9d"
}
I want to… Start here
Generate images from HTML/CSS Using the API
Take screenshots of websites URL to Image
Add automatic social cards to a site or CMS Open Graph Images
Create reusable templates Templates
Control image dimensions Setting Height and Width
Design templates visually Template Editor
Generate images with a signed GET URL Signed Image URLs
Manage API keys and organization resources Management API
Set up API credentials and permissions Authentication and API keys

Get started quickly with code samples in your language:

Don’t want to write code? We’ve got you covered:

  • n8n - Build flexible image-generation workflows
  • Zapier - Connect with 5,000+ apps
  • Make - Build powerful automation workflows
  • MCP Server - Generate images from AI assistants like Cursor, Claude, and more

We’re happy to help you get started. Email us at support@htmlcsstoimage.com - we’re experts at debugging HTML rendering issues and love helping developers succeed.