course-lesson

Course lesson OG image template

Course name, lesson number, title, instructor and a progress bar on a full-colour background.

Course lesson Open Graph image template rendered by Image API

This is a real render from the API with the example values below, at 1200×630.

For course platforms, cohorts and YouTube series. The whole frame is your accent colour and the text colour adapts to it, so a yellow brand gets dark text automatically. The progress bar shows how far into the course this lesson is.

Fields

Every field is optional. Long text shrinks to fit instead of overflowing; an image field takes a public URL that we fetch on our side.

Field Type Description Example
title text Lesson title. default: Lesson title Designing idempotent REST APIs
course text Course name. API Design Masterclass
lesson text Lesson label, e.g. Lesson 4 of 12. Lesson 4 of 12
instructor text Instructor name. Daniel Okafor
duration text Running time, e.g. 48 min. 18 min
progress text Course progress, a number from 0 to 100. 33
site text Your domain or a short URL. learn.northwind.dev
photo image URL Instructor photo. https://example.com/images/avatar-man.jpg
accent colour Brand colour as hex, e.g. #6366f1. Drives buttons, highlights and the background glow. default: #7c3aed #7c3aed
theme dark | light Colour scheme: dark or light. —

Render it with one request

Use the slug as template. The response holds the URL of the finished PNG; ?wait=true keeps the connection open until it is ready.

curl -X POST "https://imageapi.benchkithq.com/v1/images?wait=true" \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "course-lesson",
    "modifications": {
        "title": "Designing idempotent REST APIs",
        "course": "API Design Masterclass",
        "lesson": "Lesson 4 of 12",
        "instructor": "Daniel Okafor",
        "duration": "18 min",
        "progress": 33,
        "site": "learn.northwind.dev",
        "photo": "https://example.com/images/avatar-man.jpg"
    }
}'

Or paste a signed URL into og:image

For static sites, Webflow, Shopify and no-code tools: put the fields in the query string and sign it with your signing secret. The first request renders the image, every later one is a redirect to the cached file. How to compute the signature.

<meta property="og:image" content="https://imageapi.benchkithq.com/i/acc_YOUR_ACCOUNT_ID/course-lesson.png?course=API%20Design%20Masterclass&duration=18%20min&instructor=Daniel%20Okafor&lesson=Lesson%204%20of%2012&progress=33&site=learn.northwind.dev&title=Designing%20idempotent%20REST%20APIs&s=YOUR_SIGNATURE">

Make it yours

accent and theme change per request. For anything more, copy the template into your account: you get an ordinary HTML template with the same fields that you can edit in the dashboard or through the API. If the slug is free on your account, the copy takes it — your integrations switch to your version without changing a line.

curl -X POST "https://imageapi.benchkithq.com/v1/templates/library/course-lesson/copy" \
  -H "Authorization: Bearer sk_live_YOUR_KEY"

More OG image templates

All templates →