Starters · 1200 × 630 · 7 layers · 6 variables · social, og, news

News article with lead photo

A newspaper share card: the masthead over a double rule, a section kicker, a serif headline that shrinks to fit up to seven lines, the byline and date, and the lead photo on the right.

live · POST /v1/images1200 × 630
News article with lead photo, rendered with the sample variables
rendering…
rendered with the sample variables · change them and render again
Open in the editor
the same render with your saved copy
curl -X POST https://api.imageapis.com/v1/images \
  -H 'X-API-Key: YOUR_KEY' -H 'Content-Type: application/json' \
  -d '{"template": "tpl_…", "variables": {"publication": "The Daily Example", "section": "Climate", "title": "The tide gauges were right. The flood maps were not.", "author": "Priya Natarajan", "date": "12 October 2026", "photo": "https://images.unsplash.com/photo-1505142468610-359e7d316be0?w=1200"}}'

Make it yours

Copy the starter into your account once; from then on it is a template id you render with new variables. Creating and reading templates is free.

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

Change any layer by name at render time with modifications, or change the design itself in the editor and save it back with PUT /v1/templates/<id>.

Layers

NameTypex, ySizeContent
photoimage640, 0560 × 630{{photo}}
publicationtext64, 48512 × 48{{publication}}
rulerect64, 110512 × 3
rule_thinrect64, 117512 × 1
sectiontext64, 150512 × 28{{section}}
titletext64, 192512 × 310{{title}}
bylinetext64, 540512 × 30By {{author}} · {{date}}

The template

Show the JSON (7 layers)
{
  "name": "News article",
  "width": 1200,
  "height": 630,
  "background": "#ffffff",
  "layers": [
    {
      "name": "photo",
      "type": "image",
      "x": 640,
      "y": 0,
      "width": 560,
      "height": 630,
      "src": "{{photo}}",
      "fit": "cover"
    },
    {
      "name": "publication",
      "type": "text",
      "x": 64,
      "y": 48,
      "width": 512,
      "height": 48,
      "text": "{{publication}}",
      "font": "Playfair Display",
      "weight": 900,
      "size": 34,
      "color": "#0b1220",
      "valign": "middle"
    },
    {
      "name": "rule",
      "type": "rect",
      "x": 64,
      "y": 110,
      "width": 512,
      "height": 3,
      "fill": "#0b1220"
    },
    {
      "name": "rule_thin",
      "type": "rect",
      "x": 64,
      "y": 117,
      "width": 512,
      "height": 1,
      "fill": "#0b1220"
    },
    {
      "name": "section",
      "type": "text",
      "x": 64,
      "y": 150,
      "width": 512,
      "height": 28,
      "text": "{{section}}",
      "font": "Inter",
      "weight": 700,
      "size": 18,
      "color": "#b91c1c",
      "transform": "uppercase",
      "letter_spacing": 2,
      "valign": "middle"
    },
    {
      "name": "title",
      "type": "text",
      "x": 64,
      "y": 192,
      "width": 512,
      "height": 310,
      "text": "{{title}}",
      "font": "Fraunces",
      "weight": 600,
      "size": 64,
      "color": "#0b1220",
      "line_height": 1.08,
      "fit": "shrink",
      "max_lines": 7,
      "min_size": 32,
      "letter_spacing": -0.5
    },
    {
      "name": "byline",
      "type": "text",
      "x": 64,
      "y": 540,
      "width": 512,
      "height": 30,
      "text": "By {{author}} \u00b7 {{date}}",
      "font": "Inter",
      "weight": 500,
      "size": 20,
      "color": "#475569",
      "valign": "middle"
    }
  ]
}