HTML/CSS to Image
HTML/CSS to Image converts HTML, CSS, public web pages, and reusable templates into images and PDFs through an API.
Verdict
Common use cases
- Generate Open Graph cards for blog posts
- Render invoice PDFs from HTML invoices
- Snapshot authenticated dashboards for reports
- Batch-create event flyers from a spreadsheet
- Preview email templates before deployment
Integration
- Vendor
- HTML/CSS to Image
- Category
- developer-tools
- Auth
- API_KEY
- Tools
- 10
- Composio slug
htmlcss_to_image
Tools
- Create Image
Create a hosted image from HTML/CSS or an internet-reachable webpage, including authenticated pages using request headers. Use GET_IMAGE afterward to download, resize, crop, or convert it.
- Create Image from Template
Create an image from a reusable template using the latest version or an explicitly selected version.
- Create Images Batch
Create 1 to 25 hosted images from HTML/CSS or internet-reachable webpages in one request, including authenticated pages using shared or per-image headers. Requires an account plan that supports batch creation.
- Create Template
Create a reusable Handlebars HTML/CSS image template. WARNING: the template is persistent because the API exposes no delete operation, and a free account can hold only one template.
- Delete Imagedestructive
Permanently delete one generated image and clear its HCTI CDN cache. Copies previously written to external storage are not deleted.
- Delete Images Batchdestructive
Permanently delete multiple generated images and clear their HCTI CDN caches. Copies previously written to external storage are not deleted.
- Get or Transform Image
Download a generated image by ID, optionally converting its format, resizing it, or cropping it.
- Get Usage
Return recent hourly, daily, monthly, and billing-period image usage for the connected account.
- List Templates
List reusable image templates owned by the connected account, including their current version, source, and render settings.
- Update Template
Create a new version of an existing template using replacement Handlebars HTML and optional CSS or render settings.
Setup
Setup guide
- 11. Sign up at htmlcsstoimage.com and copy your API key from the dashboard. 2. In Switchy, open Settings → Integrations → Developer Tools and click Connect next to HTML/CSS to Image. 3. Paste your API key when prompted and click Authorize. 4. Switchy confirms the connection and lists the ten tools this MCP exposes. 5. Open any Project, type '@HTML/CSS to Image create an image from this HTML: <div style="padding:20px;">Hello</div>' and send the message. 6. The MCP returns a CDN URL; click it to verify the image rendered correctly. 7. To use templates, first create one with the Create Template tool, then invoke Create Image from Template with your data variables. 8. Check usage limits anytime by asking '@HTML/CSS to Image get my current usage.'
What teammates see: by default, memories from HTML/CSS to Image are scoped to the Project (PROJECT visibility) - you can mark any memory PRIVATE or share it ORG-wide.
Works well with
Top models
Compatibility data appears once enough Projects have used this MCP together with a given model.
How Switchy teams use it
Starter prompts
Social Card from Markdown
@HTML/CSS to Image create an image from this HTML: wrap the heading 'Launch Week Recap' in an h1 with font-family Inter and background gradient from #6366f1 to #8b5cf6, then add a subtitle 'Five features in five days' below it.
Screenshot Live Dashboard
@HTML/CSS to Image create an image from https://app.example.com/dashboard using these request headers: Cookie: session_id=abc123. Return the CDN URL so I can attach it to the weekly report.
Batch Event Posters
@HTML/CSS to Image create images batch from this HTML template: <div style='padding:40px; background:#1e293b; color:white;'><h2>{{title}}</h2><p>{{date}}</p></div> using this data: [{"html":"...","title":"Workshop A","date":"Jan 15"}, {"html":"...","title":"Workshop B","date":"Jan 22"}] for the first two events.Resize Existing Image
@HTML/CSS to Image get or transform image ID f3a8b2c1 and resize it to 1080x1920 pixels, then return the new URL.
Check Monthly Quota
@HTML/CSS to Image get usage for this billing period and tell me how many images we've generated so far this month.
Example outputs
Illustrative - representative of the model's voice and quality, not literal recordings.
@htmlcsstoimage create a social-media card from this HTML snippet with our brand colors and the headline 'Q4 Revenue Up 23%'
I've generated a hosted image from your HTML and CSS. The image is available at https://hcti.io/v1/image/abc123def456 and will remain accessible on the CDN. The final dimensions are 1200×630 pixels, suitable for Open Graph social previews. You can use GET_IMAGE to download a local copy, resize it, or convert to a different format if needed.
This example shows the core Create Image workflow. The MCP returns a CDN-hosted URL immediately, but the image persists in your account until explicitly deleted. Be aware that free-tier accounts have monthly image-creation limits, and each generation counts against your quota even if you delete the image later.
@htmlcsstoimage generate 15 thumbnail images in one batch, each showing a different product SKU from our inventory spreadsheet with price and stock level overlaid
I've submitted a batch request to create 15 images. Each thumbnail uses the same HTML structure with per-image data substitution for SKU, price, and stock count. The API returned 15 CDN URLs in one response, and all images are now live. Batch creation is faster than 15 individual calls and counts as 15 images against your monthly limit. Your plan supports up to 25 images per batch.
Batch creation is a paid-plan feature and demonstrates the MCP's ability to parallelize image generation. Each image in the batch still consumes one quota slot, so a 25-image batch uses 25 of your monthly allowance. This is ideal for generating report charts, product grids, or personalized email headers at scale.
@htmlcsstoimage show me how many images we've generated this month and whether we're close to our plan limit
Your account has generated 1,847 images in the current billing period, which runs through March 31. Your plan allows 5,000 images per month, so you have 3,153 remaining. Today's usage is 42 images, and yesterday's was 38. Hourly breakdowns show peak generation between 2–4 PM UTC. No overage charges apply unless you exceed the 5,000-image cap.
The Get Usage tool provides real-time quota visibility, which is critical for teams that automate image generation in CI/CD pipelines or scheduled jobs. If you approach your limit mid-month, you'll need to either upgrade your plan or defer non-urgent image creation to avoid service interruption.
Use-case deep-dives
When this MCP beats manual design for content teams
A 3-person content team publishing 12 blog posts a month needs unique Open Graph images for every article. The Create Image from Template tool lets them build one Handlebars template with placeholders for title, author photo, and publish date, then generate a card in under 2 seconds per post. The MCP handles the render and hosting; the team skips Figma exports and S3 uploads. The catch: a free account holds only one template, so if you're running multiple brands or formats, you'll need a paid plan or separate API keys. If your cadence is under 10 posts a month and the design rarely changes, this MCP is faster than any manual workflow.
When server-side rendering replaces headless Chrome
A 6-person SaaS startup sends 400 invoices a month and wants pixel-perfect PDFs without spinning up Puppeteer or Playwright on every request. The Create Image tool accepts HTML/CSS and returns a hosted PNG or JPEG; pair it with a PDF library that embeds images and you've replaced a brittle headless-browser stack with one API call. The Get or Transform Image tool lets you resize or crop the output before embedding. The downside: this MCP doesn't render PDFs natively, so you're stitching images into a PDF wrapper yourself. If your invoice layout is stable and you're already running a PDF builder, this MCP cuts infrastructure cost and deploy complexity by 80 percent.
When batch image creation fits regression workflows
A 5-person design-systems team maintains 40 React components and wants visual regression tests that catch CSS drift across browsers. The Create Images Batch tool renders up to 25 component states in one request, so you can snapshot every variant of a button or card in a single test run. The MCP returns hosted URLs; your CI pipeline diffs them against baseline images stored in S3 or a visual-testing service. The limit: 25 images per batch means large component libraries need multiple requests, and the API doesn't expose a delete-all operation, so cleanup is manual or scripted. If your component count is under 100 and you're already diffing images in CI, this MCP is simpler than maintaining a Playwright grid.
Frequently asked
What does the HTML/CSS to Image MCP do in Switchy?
It turns HTML and CSS into hosted PNG or JPEG screenshots without spinning up a headless browser yourself. Your AI can generate marketing graphics, social cards, or PDF-ready layouts by writing markup and calling Create Image. The service returns a CDN URL you can embed or download. Useful when you need pixel-perfect renders from code instead of manual design tools.
Do I need a paid HTML/CSS to Image account to use this MCP?
You need at least a free account to get an API key. The free tier allows one template and a modest monthly image quota. Batch operations and higher limits require a paid plan. Switchy passes your key through; we don't provide a shared pool. Check your usage with the Get Usage tool before hitting limits.
Can the MCP render images from private webpages behind authentication?
Yes. Both Create Image and Create Images Batch accept custom request headers, so you can pass bearer tokens or cookies to screenshot authenticated pages. The service fetches the live page, renders it, and returns the image. It won't store your credentials; you supply headers per request.
Why use this MCP instead of a screenshot API or Puppeteer?
HTML/CSS to Image handles the browser infrastructure and CDN hosting for you. You skip the complexity of managing Chrome instances, S3 buckets, and cache invalidation. The trade-off is less control over viewport timing and JavaScript execution. If you need fine-grained browser automation, run Puppeteer yourself. If you want fast, declarative image generation from markup, this MCP is simpler.
Who on the team should connect the HTML/CSS to Image account?
Whoever owns the billing relationship with HTML/CSS to Image. The API key is account-wide, so any team member with the key can create and delete images against your quota. In Switchy, treat the connection like a shared service credential. One person connects it; everyone benefits from the tools in shared chats.