canonical: https://jentic.com/apis/htmlcsstoimage.com/htmlcsstoimage

# HTML/CSS to Image API

The HTML/CSS to Image API renders HTML and CSS, or a live website URL, into an image and returns a hosted image id that can be fetched in a chosen format, size, or crop. Renders accept options such as selector, viewport_width, device_scale, google_fonts, color_scheme, ms_delay, and block_consent_banners, and batch endpoints create many variations, including templated ones filled from template_values, in one call. Account tooling covers versioned templates, Open Graph configurations, outbound proxies, external storage destinations that receive rendered files, scoped API keys, and organization usage.

## For AI agents

Render HTML and CSS or a website URL to an image, batch-generate templated images, store renders in your own storage, and manage templates, proxies, and scoped API keys.

## Scope

Does not edit uploaded photos, run multi-step browser automation, or extract page data. Use for rendering HTML, CSS, URLs, and templates to images only.

## Capabilities

- Render HTML and CSS, or a live url, to an image with selector clipping, viewport size, device_scale, and google_fonts
- Fetch a rendered image in a specific format and resize or crop it with width, height, and crop query options
- Create a batch of image variations, or a batch of templated images filled from template_values, in one request
- Version reusable HTML templates and list a template's versions
- Render and store an image directly in a configured storage destination
- Route renders through a saved outbound proxy and configure Open Graph image settings
- Issue API keys limited to chosen permissions and read organization usage

## Use cases

### Agent-made graphics from HTML

An AI agent producing a weekly report needs a chart card or quote graphic it can drop into email or chat. Through Jentic it finds the HTML/CSS to Image create operation by intent, posts the html and css it wrote, and returns the hosted image URL, with the API ID and key held by your own instance.

Example prompt: Call POST `/v1/image` with html set to the report card markup, css set to its styles, and google_fonts set to Inter, then return the image URL

### Templated images in bulk

Marketing teams need one design rendered many times, such as a card per product or speaker. A versioned template holds the HTML, and the templated batch endpoint takes a list of variations, each with its own template_values, plus shared default_options, so a single call produces the full set.

Example prompt: Call POST `/v1/image/batch/templated` with variations listing template_values for each speaker's name and talk title, then collect the returned image ids

### Website screenshots

QA, archiving, or link previews need pictures of live pages. Sending a url to the create endpoint renders the page with options like full_screen, viewport_mobile, block_consent_banners, and custom headers, and the image can then be fetched in any format with resize and crop parameters.

Example prompt: Call POST `/v1/image` with url set to the release notes page and full_screen true, then fetch GET `/v1/image/{id}.{format}` with format png and width 1200

### Renders delivered to your own storage

Teams that keep assets in their own bucket can register a storage destination with its connection_info, then render and store an image there with the store endpoint instead of downloading and re-uploading it.

Example prompt: Call POST `/v1/storage-destinations` with name and connection_info for your bucket, then PUT `/v1/store/{id}.{format}` for a rendered image id with format png

## Key endpoints

| Method | Path | Description |
| --- | --- | --- |
| POST | `/v1/image` | Create an image from HTML or a URL |
| GET | `/v1/image/{id}.{format}` | Render an image in a specific format |
| POST | `/v1/image/batch` | Create a batch of images |
| POST | `/v1/image/batch/templated` | Create a batch of templated images |
| POST | `/v1/template` | Create a template |
| PUT | `/v1/store/{id}.{format}` | Render and store in a storage destination |
| GET | `/v1/usage` | Organization usage |

## Key resources

- **Images** — Create, batch-create, fetch in a format with resize and crop, list, read metadata, and delete images
- **Templates** — Create templates, add versions, list versions, and remove templates
- **Storage and proxies** — Storage destinations for rendered files and outbound proxies for renders
- **OG configs** — Open Graph image configurations
- **Account** — Permission-scoped API keys, organization usage, and feedback

## AI readiness

This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.

- **Score:** 37 / 100
- **Maturity:** Non-Ready
- **Dimensions:**
  - Foundational Compliance: 48 / 100
  - Developer Experience & Jentic Compatibility: 58 / 100
  - AI-Readiness & Agent Experience: 45 / 100
  - Agent Usability: 94 / 100
  - Security: 10 / 100
  - AI Discoverability: 75 / 100
- **View full report:** https://jentic.com/apis/htmlcsstoimage.com/htmlcsstoimage/scorecard
- **How the score is calculated:** https://docs.jentic.com/reference/api-readiness-framework/overview/
- **More about the dimensions:** https://docs.jentic.com/reference/api-readiness-framework/specification/#dimensional-model-overview

### Score it yourself

Every API in the directory is allowlisted, so you can re-score it with no key required.

- **Score your own API:** https://jentic.com/scorecard.md
- **Scoring CLI agent skill:** https://github.com/jentic/jentic-api-scorecard/blob/main/skills/jentic-api-scorecard/SKILL.md

```sh
npx @jentic/api-scorecard-cli score <openapi-url>
```

## Why Jentic

- **Setup:** Wiring HTML/CSS to Image by hand means base64-encoding the API ID and key into basic auth, picking between JSON, form, and multipart bodies, and handling per-group rate limits. Through Jentic you install once, import HTML/CSS to Image from the API Directory, store the credentials once, and your agent calls it.
- **Permission scoping:** HTML/CSS to Image puts template, image, and storage ids in the URL path (`/v1/template/{id}`, `/v1/image/{id}`), so a rule can pin your agent to one template's versions and the operations you pick. You choose the operations it may call, so destructive ones like API key deletion or template removal are not included unless you add them.
- **Credential handling:** Your HTML/CSS to Image API ID and key are stored once, encrypted, by your own Jentic One instance and injected at execution time. They never enter the agent's prompt, logs, or context.
- **Discovery method:** Agents search Jentic by intent such as 'turn html into an image' or 'batch generate social images', and Jentic returns the matching HTML/CSS to Image operation with its input schema so the agent sends valid html, url, or template_values without reading the reference docs.

## Related APIs

- **HTML to Image API** — HTML, URL, and named-template renders to PNG or PDF billed per credit
- **Urlbox** — Website screenshot and PDF rendering API
- **Cloudinary Upload API** — Upload and transform media assets

## FAQ

### What authentication does the HTML/CSS to Image API use?

Per its OpenAPI spec, the HTML/CSS to Image API uses HTTP basic auth with your API ID as the username and your API key as the password. Fetching a rendered image by id is declared public, and the create-and-render URL carries the api_id and a token in its path instead of a header. Through Jentic the API ID and key are stored by your own instance and attached at call time.

### Can I generate many images from one template with the HTML/CSS to Image API?

Yes. POST `/v1/image/batch/templated` takes a required variations list, each with its own template_values, plus default_options shared across the batch. POST `/v1/image/batch` does the same for plain html or url variations, and DELETE `/v1/image/batch` removes a set of images by ids.

### What are the rate limits for the HTML/CSS to Image API?

The spec sets limits per operation group per organization, shared across all your API keys: for example, 20 requests per minute for proxy:write and og-config:write operations and 100 requests per minute for api-key:read. Over a limit the API returns 429 Too Many Requests with RateLimit-Policy headers.

### Is there an HTML/CSS to Image MCP server?

You don't need an MCP server to give your agent HTML/CSS to Image. Jentic connects it directly from the API Directory: import it, store your API ID and key once, and your agent discovers the image, template, and storage operations on demand without loading another server's tool definitions into its context.

### How do I screenshot a website through Jentic?

Search Jentic for 'screenshot a website', load POST `/v1/image`, and send a url with options such as full_screen or block_consent_banners. Your instance attaches the basic auth credentials at call time and the response returns the image id and URL. To run it on your own infrastructure, install Jentic One from its GitHub repo.

### Can I limit what my agent is allowed to do with the HTML/CSS to Image API?

Yes. Write a rule that allows only POST `/v1/image` and GET `/v1/images`, and the agent can render and list images but cannot create API keys, delete templates, or change storage destinations, and every call it makes is logged.
