Article Card preview
IMAGE open-graph 1200×630px

Article Card

Blog or news post sharing image with title, author, date, site name, and hero image. Ideal for og:image meta tags.

Use Cases

  • Blog post og:image meta tags
  • News article social share previews
  • Newsletter header images
  • Content marketing cards

Tags

blog article news seo open-graph meta-image social-sharing

Template Variables

Variable Type Default Description
title string Your Article Title Goes Here Main headline text
author string Jane Smith Author display name
date string May 2026 Publication date string
site_name string My Blog Site or publication name
tag string Technology Category badge label
tag_color color #6366f1 Category badge background colour
bg_color color #0f172a Card background colour
text_color color #ffffff Primary text colour
accent_color color #6366f1 Accent / highlight colour
hero_image_url url https://picsum.photos/seed/og-article/1200/630 Background hero image URL

API Example

POST to https://image.toolkitapi.io/v1/image/from-template with your template URL and variable values.

curl -X POST "https://image.toolkitapi.io/v1/image/from-template" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"template_url": "https://toolkitapi.io/static/templates/image/og-article.html", "variables": {"title": "Your Article Title Goes Here", "author": "Jane Smith", "date": "May 2026", "site_name": "My Blog", "tag": "Technology", "tag_color": "#6366f1", "bg_color": "#0f172a", "text_color": "#ffffff", "accent_color": "#6366f1", "hero_image_url": "https://picsum.photos/seed/og-article/1200/630"}, "width": 1200, "height": 630, "format": "png"}'
import httpx, base64

resp = httpx.post(
    "https://image.toolkitapi.io/v1/image/from-template",
    headers={"X-API-Key": "YOUR_API_KEY"},
    json={
        "template_url": "https://toolkitapi.io/static/templates/image/og-article.html",
        "variables": {
            "title": "Your Article Title Goes Here",
            "author": "Jane Smith",
            "date": "May 2026",
            "site_name": "My Blog",
            "tag": "Technology",
            "tag_color": "#6366f1",
            "bg_color": "#0f172a",
            "text_color": "#ffffff",
            "accent_color": "#6366f1",
            "hero_image_url": "https://picsum.photos/seed/og-article/1200/630"
        },
        "width": 1200,
        "height": 630,
        "format": "png"
    },
)
image_bytes = base64.b64decode(resp.json()["image"])
with open("result.png", "wb") as f:
    f.write(image_bytes)
const response = await fetch("https://image.toolkitapi.io/v1/image/from-template", {
  method: "POST",
  headers: {
    "X-API-Key": "YOUR_API_KEY",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "template_url": "https://toolkitapi.io/static/templates/image/og-article.html",
    "variables": {
      "title": "Your Article Title Goes Here",
      "author": "Jane Smith",
      "date": "May 2026",
      "site_name": "My Blog",
      "tag": "Technology",
      "tag_color": "#6366f1",
      "bg_color": "#0f172a",
      "text_color": "#ffffff",
      "accent_color": "#6366f1",
      "hero_image_url": "https://picsum.photos/seed/og-article/1200/630"
    },
    "width": 1200,
    "height": 630,
    "format": "png"
  }),
});
const data = await response.json();
// data.image is a base64-encoded PNG
$body = @{
    template_url = "https://toolkitapi.io/static/templates/image/og-article.html"
    variables    = {
      "title": "Your Article Title Goes Here",
      "author": "Jane Smith",
      "date": "May 2026",
      "site_name": "My Blog",
      "tag": "Technology",
      "tag_color": "#6366f1",
      "bg_color": "#0f172a",
      "text_color": "#ffffff",
      "accent_color": "#6366f1",
      "hero_image_url": "https://picsum.photos/seed/og-article/1200/630"
    }
    width  = 1200
    height = 630
    format = "png"
} | ConvertTo-Json -Depth 5

Invoke-RestMethod -Method POST `
  -Uri "https://image.toolkitapi.io/v1/image/from-template" `
  -Headers @{"X-API-Key" = "YOUR_API_KEY"} `
  -ContentType "application/json" `
  -Body $body
Back to Template Library