A dark editor window with line numbers, syntax colours and a file tab, on a background in your accent colour.
These are real renders from the API with the example values in the table below. Switch the size above: the same template lays itself out for all 6 sizes — send size or sizes with the request.
For tips, tutorials and launch posts that show the code. Send the code with real line breaks; strings, comments, numbers and common keywords get colours, long lines wrap with their line number kept, and the whole block shrinks when it is long. The first 16 lines are shown.
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 |
|---|---|---|---|
code |
text | The code, with line breaks. Up to 16 lines are shown. default: console.log('Hello, world') | import { render } from '@northwind/og-kit' // One template, every size const images = await render({ template: 'blog-og', sizes: ['og', 'square', 'story'], title: 'Ship faster with signed URLs', }) console.log(images.length) // 3 |
title |
text | Headline above the editor. | Render every social size in one call |
filename |
text | File name on the editor tab. | render.ts |
language |
text | Language label in the editor bar, e.g. TypeScript. | TypeScript |
author |
text | Author or handle next to the title. | @mayacodes |
site |
text | Your domain or a short URL. | northwind.dev/blog |
accent |
colour | Brand colour as hex, e.g. #6366f1. Drives buttons, highlights and the background glow. default: #6366f1 | #6366f1 |
theme |
dark | light | Colour scheme: dark or light. | — |
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://shareglint.com/v1/images?wait=true" \
-H "Authorization: Bearer sk_live_YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{
"template": "code-snippet",
"modifications": {
"code": "import { render } from '\''@northwind/og-kit'\''\n\n// One template, every size\nconst images = await render({\n template: '\''blog-og'\'',\n sizes: ['\''og'\'', '\''square'\'', '\''story'\''],\n title: '\''Ship faster with signed URLs'\'',\n})\n\nconsole.log(images.length) // 3",
"title": "Render every social size in one call",
"filename": "render.ts",
"language": "TypeScript",
"author": "@mayacodes",
"site": "northwind.dev/blog"
}
}'
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://shareglint.com/i/acc_YOUR_ACCOUNT_ID/code-snippet.png?author=%40mayacodes&code=import%20%7B%20render%20%7D%20from%20%27%40northwind%2Fog-kit%27%0A%0A%2F%2F%20One%20template%2C%20every%20size%0Aconst%20images%20%3D%20await%20render%28%7B%0A%20%20template%3A%20%27blog-og%27%2C%0A%20%20sizes%3A%20%5B%27og%27%2C%20%27square%27%2C%20%27story%27%5D%2C%0A%20%20title%3A%20%27Ship%20faster%20with%20signed%20URLs%27%2C%0A%7D%29%0A%0Aconsole.log%28images.length%29%20%2F%2F%203&filename=render.ts&language=TypeScript&site=northwind.dev%2Fblog&title=Render%20every%20social%20size%20in%20one%20call&s=YOUR_SIGNATURE">
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://shareglint.com/v1/templates/library/code-snippet/copy" \
-H "Authorization: Bearer sk_live_YOUR_KEY"
Blog post
Website page card
Job posting
Event
Podcast episode
Changelog / release
Documentation page
Real estate listing
Product card
Product on sale
Course lesson
Recipe
Newsletter issue
Quote card
Case study / testimonial
GitHub repository
Feature announcement
Profile / author card
Comparison (A vs B)
Stat highlight
New arrival
Price drop
Flash sale
Coupon code
Product rating
Gift card
Menu special
Open house
Book launch
Fundraising goal
Speaker card
Webinar
Community meetup
Countdown
Event ticket
We're hiring (several roles)
Welcome new hire
Certificate of completion
Livestream
Music release
Podcast quote (audiogram)
Star review
Social post
Editorial pull quote
Weekly digest
Listicle
Pros and cons
Before / after
Metrics grid
Bar chart
Milestone celebration
Product roadmap
API endpoint
App store listing
Launch day
Package release
Pricing plans