HTML/CSS API templates

Automate campaign creative with HTML/CSS templates

Turn complex branded layouts into stable API templates and generate channel, audience, localization, and personalization variants from campaign data.

  • 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.

Use cases

Automate campaign images without recreating the layout

Explore image templates

Campaign variants

Reuse one visual direction across launches, channels, messages, and scheduled content.

Social and Open Graph images

Generate social cards and OG images from CMS content when a page is published.

Audience personalization

Change copy, offers, names, or imagery without recreating the design.

Localized images

Populate the same approved template with language- and region-specific content.

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

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.