Guide · 2026-10-10

Starter templates

Do not start from a blank canvas. Copy a finished design, render it with your values, then change what you like.

What ships

GET /v1/starters lists eight complete templates: an Open Graph card, a blog post card, a product review, a square quote, an event ticket with a QR code, an A4 certificate for PDFs, a video thumbnail and a weekly report with charts. Every one uses {{placeholders}}, names its layers so modifications can reach them, and comes with sample variables. Reading them is free.

curl -s https://api.imageapis.com/v1/starters -H 'X-API-Key: YOUR_KEY'
# { "starters": [ { "slug": "og-card", "name": "Open Graph card", "width": 1200, "height": 630, "layers": 5, "variables": ["title", "description", "site", "tag"] }, … ] }

The gallery shows each one rendered, with a form to change the variables and render it live.

Copy one into your account

A starter is the same JSON a saved template is, so copying is one call:

curl -s https://api.imageapis.com/v1/starters/event-ticket -H 'X-API-Key: YOUR_KEY' | jq .template > ticket.json
curl -X POST https://api.imageapis.com/v1/templates -H 'X-API-Key: YOUR_KEY' \
  -H 'Content-Type: application/json' -d @ticket.json
# → { "id": "tpl_…", "object": "template", "name": "Event ticket", … }

In Node:

const API = "https://api.imageapis.com";
const H = { "X-API-Key": process.env.IMAGEAPIS_KEY, "Content-Type": "application/json" };

const starter = await (await fetch(`${API}/v1/starters/event-ticket`, { headers: H })).json();
const tpl = await (await fetch(`${API}/v1/templates`, { method: "POST", headers: H, body: JSON.stringify(starter.template) })).json();
console.log(tpl.id);   // tpl_…

Render it with your values

const img = await (await fetch(`${API}/v1/images`, {
  method: "POST", headers: H,
  body: JSON.stringify({
    template: tpl.id,
    variables: { event: "Postgres at Scale, Austin", date: "Tue 4 Nov 2026 · 18:30", venue: "Moody Theater",
                 name: "Dana Reyes", seat: "B-14", ticket_url: "https://example.com/t/8f3k2" },
    scale: 2,
  }),
})).json();
console.log(img.url);   // https://img.imageapis.com/i/img_….png

The QR layer encodes ticket_url; the event title shrinks until it fits two lines. One render is one unit.

You can also skip the copy and render a starter inline, which is what the gallery's live form does: pass starter.template as template instead of an id. Inline templates are fine for one-offs; a saved id is what you want for signed URLs and for editing later.

Change it

Three ways, from lightest to heaviest:

  • At render time, by layer name: "modifications": [{ "name": "band", "fill": "#dc2626" }, { "name": "scan", "visible": false }]. The template is untouched.
  • In the JSON: it is plain data. Move the QR by changing its x, swap a font, add a layer. Send the whole thing back with PUT /v1/templates/<id>.
  • In the editor: every starter opens there with ?starter=<slug>; drag, resize and edit properties, then save it to your account or copy the JSON.

For a PDF

The certificate starter is A4 landscape at 96 dpi (1123×794). Send it to POST /v1/pdfs instead of /v1/images and the page is exactly A4:

curl -X POST https://api.imageapis.com/v1/pdfs -H 'X-API-Key: YOUR_KEY' -H 'Content-Type: application/json' \
  -d '{"template":"tpl_…","variables":{"name":"Dana Reyes","course":"Advanced PostgreSQL Administration","date":"10 October 2026","issuer":"Example Academy","signer":"M. Okafor, Director"},"format":"A4","landscape":true,"margin":"0"}'

Get a free key: 150 images a month API reference