HTML/CSS API templates

Create a versioned image template with HTML and CSS

Save the layout, assets, and image settings in the template, then render it by ID with named values.

  • HTML and CSS layouts
  • Reusable assets and settings
  • Versioned template IDs
Complex HTML and CSS stored with reusable assets, render settings, and a published template version.
Versioned HTML/CSS template
<main class="report-card">
  <h1>{{title}}</h1>
  <img src="{{chart}}" />
</main>
POST/v1/image/{template_id}
{
  "template_values": {
    "title": "Quarterly results",
    "chart": "https://..."
  }
}
Published version
v12Ready to render
Reusable assets
Interlogo.svgchart.png
Render settings
1200 × 630 · PNG · dark mode

Build your template

Two ways to build, one way to render

Both template types render by ID with named values.

HTML/CSS template API

Create the design with HTML and CSS, then render it by ID

Save the layout, assets, and image settings in a versioned template. Each image request sends the template ID and named values.

  1. Build the layout

    Create the template from complex HTML and CSS through the API.

  2. Centralize assets and settings

    Keep fonts, images, dimensions, browser options, and output settings with the design.

  3. Publish and render versions

    Release template changes deliberately while integrations continue rendering by stable ID.

Versioned templates

Keep HTML and CSS out of image requests

Send only the template ID and named values. The saved template provides the layout, assets, settings, and selected version.

  • HTML and CSS

    Build detailed layouts without including the full document in every render request.

  • Saved assets and settings

    Keep fonts, images, viewport details, and output options with the template.

  • Published versions

    Publish an update under the same ID and choose which version to render.

Template API workflow
Template API workflow
Layout
HTML + CSS
Shared
Assets · fonts · settings
Release
Versioned template
Render
Stable ID + named values

Use cases

Generate more images without duplicating the design

Explore image templates

Social and Open Graph images

Keep the approved layout while headlines, authors, dates, and artwork change for each page or post.

Personalized graphics

Generate certificates, cards, summaries, and account-specific images from named template values.

Product images

Turn catalog data into product cards, feature graphics, pricing images, and promotional assets.

Reports and status images

Create status cards, schedules, dashboards, and recurring reports from one reusable design.

HTML/CSS API templates

Build the layout once and render it by ID

Keep complex HTML, CSS, assets, fonts, browser settings, and output options in a versioned template while requests send only the values that change.