Image templates

A template is plain HTML/CSS with {{handlebars}} placeholders, stored on your account with a default size. Create them in the dashboard editor or via the API:

POST /v1/templates
{
  "name": "Blog OG card",
  "width": 1200,
  "height": 630,
  "html": "<div style='width:1200px;height:630px;display:flex;flex-direction:column;justify-content:center;padding:80px;background:linear-gradient(135deg,#0b0d12,#1d1145);color:#fff;font-family:sans-serif'><h1 style='font-size:60px;margin:0'>{{title}}</h1><p style='font-size:26px;color:#9aa1b5'>{{author}} · {{date}}</p></div>",
  "sample_variables": { "title": "Hello", "author": "Paul", "date": "June 2026" }
}
→ 201 { "id": "9b2c…", … }

Rendering

POST /v1/image
{ "template_id": "9b2c…", "variables": { "title": "Launch day!", "author": "Paul", "date": "2026-06-10" } }

Endpoints

POST   /v1/templates       create
GET    /v1/templates       list
GET    /v1/templates/:id   fetch (includes html)
PUT    /v1/templates/:id   update
DELETE /v1/templates/:id   delete