Menu
Sign up

Shareglint documentation

Send JSON, get back a finished PNG URL. No browser on your side.

Every endpoint, parameter and schema is in the API reference. The machine-readable contract: /openapi.json (OpenAPI 3.1 — import into Postman, generate clients).

Your first render

You need a key: create an account (no card, 100 images a month) — the key appears right after signup. Three starter templates come with the account, so the request below works with no configuration at all.

?wait=true says you want to wait for the image rather than poll for the result.

curl -X POST "https://shareglint.com/v1/images?wait=true" \
  -H "Authorization: Bearer sk_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "blog-og",
    "locale": "pl",
    "modifications": {
      "title": "Ten things that ruin your sleep",
      "author": "Anna Kowalska",
      "site": "yourblog.com",
      "accent": "#f97316"
    }
  }'
$response = Http::withToken('sk_live_TWOJ_KLUCZ')
    ->post('https://shareglint.com/v1/images?wait=true', [
        'template' => 'blog-og',
        'locale' => 'pl',
        'modifications' => [
            'title' => 'Ten things that ruin your sleep',
            'author' => 'Anna Kowalska',
            'site' => 'yourblog.com',
        ],
    ]);

$url = $response->json('url');
const res = await fetch('https://shareglint.com/v1/images?wait=true', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer sk_live_TWOJ_KLUCZ',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    template: 'blog-og',
    locale: 'pl',
    modifications: {
      title: 'Ten things that ruin your sleep',
      author: 'Anna Kowalska',
      site: 'yourblog.com',
    },
  }),
});

const { url } = await res.json();
import requests

res = requests.post(
    "https://shareglint.com/v1/images?wait=true",
    headers={"Authorization": "Bearer sk_live_TWOJ_KLUCZ"},
    json={
        "template": "blog-og",
        "locale": "pl",
        "modifications": {
            "title": "Ten things that ruin your sleep",
            "author": "Anna Kowalska",
            "site": "yourblog.com",
        },
    },
)

url = res.json()["url"]

Authentication

The key goes in the Authorization: Bearer sk_live_… header. You issue and revoke keys through /v1/keys or in the dashboard.

We show the full key exactly once, when it is issued — the database holds only its digest. A lost key cannot be recovered: issue a new one and revoke the old.

The last active key cannot be revoked. That is deliberate: without a working key you could not issue another one, and you would lock yourself out.

Async and sync

ModeResponseWhen
POST /v1/images202 + idThe default. Collect the result from GET /v1/images/{id} or by webhook.
POST /v1/images?wait=true200 + gotowy urlWhen you would rather not poll. A render usually takes about a second.

Synchronous mode has its own resources, separate from the async queue — a flood of background jobs cannot starve a client waiting on a connection. If we still run out of time, you get a 503 with the code sync_overloaded. The job is not lost: the body carries an id, so you can poll for the result exactly as in async mode.

Output formats

Add format to the request body: png (the default), jpeg, webp or pdf. For jpeg and webp, quality (1–100, default 85) sets the compression. For every raster format, scale picks the pixel density: 2 (default) gives 2400×1260 for a 1200×630 template, 1 gives exactly 1200×630 — a smaller file that still meets every social network's og:image size.

{ "template": "blog-og", "format": "jpeg", "quality": 80, "scale": 1, "modifications": { "title": "…" } }

pdf is a single page exactly the template size in CSS pixels (1200×630 for the built-in templates), with no margins and backgrounds printed. Text stays vector, so it is sharp at any zoom and selectable. quality and scale do not apply to it.

The format is part of the image's identity: the same values as PNG and as JPEG are two files and two renders. A parameter that does not change the file — quality for PNG, scale for PDF — never causes a second render. The response and GET /v1/images/{id} carry format, and the file URL ends in .png, .jpg, .webp or .pdf. On the Free plan the watermark is in every format, PDF included.

Sizes: one template, every format

Every template renders in any of these sizes — the same fields, the same design, laid out again for the format. Without size you get the template's own dimensions (1200×630 for the built-in ones).

sizeCSS pxLayout classFor
og 1200×630 shape-landscape Link previews: Facebook, LinkedIn, X, Slack, iMessage
square 1080×1080 shape-square Instagram and LinkedIn feed posts
portrait 1080×1350 shape-tall Instagram and Facebook portrait posts
story 1080×1920 shape-tall Instagram, Facebook and TikTok stories, Reels covers
pinterest 1000×1500 shape-tall Pinterest pins
youtube 1280×720 shape-landscape YouTube thumbnails, video covers

Which size each platform asks for (Facebook, LinkedIn, X, WhatsApp, iMessage and others), each from the platform's own docs: OG image size by platform.

size renders one of them. sizes renders several at once and answers {"renders": [...]} — one entry per size, in your order, each shaped like a normal render plus size, width and height:

{
    "template": "blog-og",
    "sizes": [
        "og",
        "square",
        "portrait"
    ],
    "modifications": {
        "title": "Ten things that ruin your sleep"
    }
}
{
    "renders": [
        {
            "id": "img_01m08s3ez1zcv28h335g9923b1",
            "status": "queued",
            "format": "png",
            "size": "og",
            "url": "https://shareglint.com/v1/images/img_01m08s3ez1zcv28h335g9923b1"
        },
        {
            "id": "img_01m08s3ez1zcv28h335g9923b2",
            "status": "queued",
            "format": "png",
            "size": "square",
            "url": "https://shareglint.com/v1/images/img_01m08s3ez1zcv28h335g9923b2"
        },
        {
            "id": "img_01m08s3ez1zcv28h335g9923b3",
            "status": "queued",
            "format": "png",
            "size": "portrait",
            "url": "https://shareglint.com/v1/images/img_01m08s3ez1zcv28h335g9923b3"
        }
    ]
}

Every size is an ordinary render: its own id, its own cache entry, one render of quota. A size you already rendered with the same values is free, and a size equal to the template's own dimensions is the same image as no size (same cache entry, no second charge). It is all or nothing: if your quota does not cover every new size you get a 402 and nothing is queued. A size that fails is refunded on its own.

With ?wait=true we wait for all sizes in one shared window: 200 when every size is done, 500 when one failed (the body still lists all of them), 503 sync_overloaded with the list of renders when time ran out — nothing is lost, collect them with GET /v1/images/{id}.

Webhooks: one call per size, each with its size, width and height. GET /v1/images/{id} carries the same three fields. width and height are CSS pixels; at scale: 2 the file has twice as many.

In signed URLs and auto OG URLs, add size to the query string: /i/…/blog-og.png?title=…&size=story&s=…. On /i/ it is signed like every other parameter, so a URL signed for one size cannot be switched to another.

Built-in templates lay themselves out for every size. Your own templates render at any size too — the layout is yours. We put two classes on <html>: the shape (shape-landscape, shape-square or shape-tall) and the size (size-story and so on), and the page is exactly the size's width and height. Style the shapes, not every size:

.card { display: flex; gap: 48px; }               /* landscape: side by side */
.shape-square .card,
.shape-tall .card { flex-direction: column; }     /* square, portrait, story: stacked */
.shape-tall h1 { font-size: 96px; }
.size-story body { padding: 250px 80px 320px; }   /* keep clear of the story UI */

Template preview in the dashboard and POST /v1/templates/preview (with width and height) cost nothing, so check every shape before you publish.

Animated GIF and MP4

Set format to gif or mp4 and the template's CSS animations and transitions are recorded frame by frame — paused and stepped, not filmed in real time, so the same values always give the same file. duration sets the clip length in seconds (0.5–5, rounded to 0.1 s, default 3) and fps the frame rate (10–30; default 15 for GIF, 30 for MP4). Both work only with an animated format: with png, jpeg, webp or pdf they are a 422.

{ "template": "animated-stat-counter", "format": "gif", "duration": 3, "fps": 15, "modifications": { "value": "12,480" } }

The response and GET /v1/images/{id} carry animation — null for still formats:

{ "id": "img_01m08…", "status": "completed", "format": "gif", "size": "og", "width": 1200, "height": 630, "animation": { "duration": 3, "fps": 15, "frames": 45 }, "url": "…/img_01m08….gif" }

The long edge is capped at 1080 px with even dimensions: og 1200×630 gives a 1080×566 file, story 1080×1920 gives 608×1080. quality and scale are ignored. The GIF loops forever with a palette built for the clip; the MP4 is H.264 (yuv420p, faststart, no audio) and plays everywhere. A 3-second GIF at 15 fps is about 0.1–3 MB, depending on how much of the frame moves; the same clip as MP4 is a fraction of that. size and sizes work as usual.

An animated render costs 5 renders of quota (per size with sizes). An identical file you already have is free, like any cached render, and a render that fails gives all 5 back. Animated renders run on their own queue; ?wait=true waits up to 45 s for them. Batches take still formats only.

Ready-made animated templates are in the library under slugs starting with animated- (countdown, stat counter, typing headline, product reveal, quote fade-in, sale pulse and more), in every size.

Your own templates animate the same way. During a GIF/MP4 render <html> has the class motion and the CSS variable --clip (the clip length, e.g. 3s); a still render of the same template has no motion class. Put the animations under .motion … with animation-duration: var(--clip), and the PNG of the same template shows the finished design — the still fallback for og:image. Scripts are removed from your templates when you save them, so animate with CSS; built-in templates that count or type (stat counter, typing headline) draw their frames through a window.shareglintFrame(t, duration) hook (seconds) we call before every frame.

h1 { opacity: 1; }                                 /* still formats: the finished design */
.motion h1 { animation: rise var(--clip) ease-out both; }
@keyframes rise { from { opacity: 0; transform: translateY(40px); } }

In signed URLs use the extension .gif or .mp4 and, optionally, duration and fps in the query string: /i/…/animated-countdown.gif?number=12&duration=4&s=…. They are signed like every other parameter; a bad value, or either of them on a still extension, is a 400.

Idempotency

Add an Idempotency-Key header (any UUID). A repeated request with the same key and the same body returns the same response, with no second render and no second deduction from your quota.

The same key with a different body is a 422 — almost always a bug in the integration rather than an intention.

Separately from that, an identical render never costs twice anyway: the same template with the same values returns the existing image and uses no quota.

Errors and limits

The error field is a stable machine-readable code — build your switch on it. The message field is for humans and follows the Accept-Language header (we support en, pl, de, es, fr).

StatuserrorMeaning
401unauthorizedMissing key, or a key that is invalid or revoked.
402quota_exceededMonthly quota exhausted.
404not_foundThe resource does not exist on this account. Somebody else's resources are indistinguishable from nonexistent ones.
422idempotency_key_reuse, last_keyValidation error or a conflict.
429—Too many requests per minute.
503sync_overloadedSync mode ran out of time. The job is alive — poll it by id.

How long images live

Finished files do not sit here forever, and we say so plainly, because the URL from our response usually goes straight into somebody's og:image.

PlanImage available for
Free30 days from generation
Starter, Pro, Scale, Business365 days from generation

After that both the file and the history entry are gone. It also means the same render ordered again no longer hits the cache and counts against your quota a second time. If an image must outlive our retention, download it right after generating — the URL is a plain PNG file.

Your own templates

You send your own HTML and CSS. Fields go in as {{ nazwa }} and are declared in fields. An undeclared field is an error on save, not a blank spot in the finished image.

{
    "name": "Event card",
    "fields": [
        "headline",
        "place",
        "photo"
    ],
    "images": [
        "photo"
    ],
    "css": "body{background:#111827;color:#f9fafb;padding:72px;font-family:Roboto}",
    "html": "<div class=\"fitbox\"><h1 class=\"fit\" data-autofit>{{ headline }}</h1></div><span>{{ place }}</span>"
}

A few things worth knowing up front:

Preview uses no quota, so iterating on the design costs nothing.

No account yet? The HTML-to-image playground renders HTML and CSS through the same sanitiser and Chrome, watermarked.

Built-in templates

Every account can render these by slug with no setup — "template": "job-posting" just works. Every field is optional; accent (hex colour) and theme (dark or light) work in all of them. Previews and examples for each one are in the template gallery. All 155 lay themselves out for every size, from link previews to stories.

SlugFields
blog-og title, eyebrow, author, site, date, reading_time, photo, accent, theme
site-card title, description, site, url, favicon, image, accent, theme
job-posting title, company, location, salary, type, eyebrow, cta, site, logo, accent, theme
event name, date, venue, eyebrow, site, image, accent, theme
podcast-episode title, show, episode, guest, duration, site, cover, accent, theme
changelog version, title, product, highlight_1, highlight_2, highlight_3, date, site, logo, accent, theme
docs-page title, description, section, product, site, logo, accent, theme
real-estate price, address, city, beds, baths, area, badge, site, photo, logo, accent, theme
product-og name, tagline, price, badge, site, logo, screenshot, accent, theme
product-sale name, brand, price, old_price, discount, cta, site, photo, accent, theme
course-lesson title, course, lesson, instructor, duration, progress, site, photo, accent, theme
recipe title, category, time, servings, difficulty, author, site, photo, accent, theme
video-thumbnail title, highlight, badge, channel, duration, image, avatar, accent, theme
newsletter-issue title, newsletter, issue, date, excerpt, author, site, accent, theme
quote-og quote, author, role, site, photo, accent, theme
case-study quote, name, role, company, metric, metric_label, site, photo, logo, accent, theme
github-repo repo, owner, description, stars, forks, language, site, avatar, accent, theme
feature-announcement title, description, eyebrow, product, site, logo, screenshot, accent, theme
profile-card name, headline, bio, handle, location, site, photo, accent, theme
comparison left, right, title, left_note, right_note, accent_b, site, left_logo, right_logo, accent, theme
stat-highlight value, label, source, eyebrow, site, logo, accent, theme
new-arrival name, label, brand, collection, price, cta, site, photo, accent, theme
price-drop name, label, brand, old_price, price, saving, cta, site, photo, accent, theme
flash-sale discount, off_label, title, subtitle, ends, cta, site, logo, accent, theme
coupon-code offer, title, code, code_label, expires, brand, site, logo, accent, theme
product-review product, rating, reviews, review, reviewer, badge, site, photo, accent, theme
gift-card amount, title, message, recipient, label, brand, cta, site, logo, accent, theme
menu-special dish, label, restaurant, description, price, day, site, photo, accent, theme
open-house address, label, day, month, time, city, price, agent, site, photo, avatar, accent, theme
book-launch title, author, label, blurb, date, cta, site, cover, accent, theme
fundraising-goal title, organization, raised, goal, progress, supporters, days_left, cta, site, photo, accent, theme
speaker-card title, name, role, event, label, date, site, photo, accent, theme
webinar title, label, date, time, timezone, host_1, host_2, cta, site, avatar_1, avatar_2, accent, theme
meetup title, group, date, venue, city, perks, emoji, site, logo, accent, theme
countdown number, unit, event, date, site, accent, theme
event-ticket title, admit, date, time, venue, city, section, seat, gate, section_label, seat_label, gate_label, site, accent, theme
hiring-roles title, eyebrow, company, role_1, role_2, role_3, role_4, location, cta, site, logo, accent, theme
new-hire name, eyebrow, role, team, date, site, photo, logo, accent, theme
certificate name, course, eyebrow, intro, completed, date, date_label, issuer, issuer_role, seal, logo, accent, theme
livestream title, badge, time, channel, site, image, avatar, accent, theme
music-release title, artist, badge, date, platforms, site, cover, accent, theme
podcast-quote quote, show, episode, guest, timestamp, site, cover, accent, theme
thumbnail-face title, highlight, emoji, badge, channel, photo, accent, theme
testimonial-stars quote, rating, rating_label, name, role, company, site, avatar, accent, theme
social-post text, name, handle, verified, date, replies, reposts, likes, avatar, accent, theme
editorial-quote quote, author, role, publication, section, date, site, photo, accent, theme
weekly-digest issue, newsletter, date, title, item_1, item_2, item_3, site, accent, theme
listicle number, title, subtitle, eyebrow, author, site, accent, theme
pros-cons title, pros_label, pro_1, pro_2, pro_3, cons_label, con_1, con_2, con_3, accent_b, site, accent, theme
before-after title, before_label, after_label, site, before_image, after_image, accent, theme
metrics-grid title, period, product, metric_1, label_1, delta_1, metric_2, label_2, delta_2, metric_3, label_3, delta_3, metric_4, label_4, delta_4, site, logo, accent, theme
bar-chart title, values, unit, eyebrow, source, site, logo, accent, theme
milestone value, label, title, eyebrow, product, site, logo, accent, theme
roadmap title, product, now_label, now_1, now_2, now_3, next_label, next_1, next_2, next_3, later_label, later_1, later_2, later_3, site, logo, accent, theme
api-endpoint method, path, description, params_label, params, product, version, site, logo, accent, theme
code-snippet code, title, filename, language, author, site, accent, theme
app-store name, tagline, rating, reviews, cta, platforms, site, icon, screenshot, accent, theme
launch-day title, tagline, eyebrow, badge, votes, vote_label, cta, site, logo, accent, theme
package-release package, version, description, install, downloads, license, bundle_size, registry, site, logo, accent, theme
pricing-plans title, product, plan_1, price_1, feature_1, plan_2, price_2, feature_2, plan_3, price_3, feature_3, highlight, badge, period, site, logo, accent, theme
carousel-cover title, hook, slide_count, author_name, author_handle, avatar, logo, accent, theme
carousel-slide heading, body, index, total, author_handle, image, accent, theme
carousel-end headline, cta_label, url, perks, author_name, author_handle, slide_count, avatar, accent, theme
photo-collage title, subtitle, date, handle, photo_1, photo_2, photo_3, photo_4, photo_5, photo_6, accent, theme
story-new-post title, label, handle, url, image, accent, theme
thumbnail-reaction title, badge, emoji, channel, face_photo, subject_image, accent, theme
thumbnail-tutorial title, tool_name, step_label, level, highlight, channel, tool_logo, screenshot, accent, theme
thumbnail-gaming title, game, episode, rank_badge, channel, character_image, game_logo, accent, theme
tier-list title, tiers, author, accent, theme
meme-caption top_text, bottom_text, handle, image, accent, theme
career-new-role new_title, name, kind, company, previous_title, start_date, photo, company_logo, accent, theme
work-anniversary name, years, company, role, start_date, message, photo, logo, accent, theme
award-achievement recipient, award_name, placement, category, issuer, year, photo, issuer_logo, accent, theme
certification-earned credential, name, issuer, issued, expires, credential_id, verify_url, skills, badge, issuer_logo, accent, theme
team-grid title, subtitle, member_1_name, member_1_role, member_1_photo, member_2_name, member_2_role, member_2_photo, member_3_name, member_3_role, member_3_photo, member_4_name, member_4_role, member_4_photo, member_5_name, member_5_role, member_5_photo, member_6_name, member_6_role, member_6_photo, member_7_name, member_7_role, member_7_photo, member_8_name, member_8_role, member_8_photo, logo, site, accent, theme
graduation name, degree, school, class_year, honors, photo, school_logo, accent, theme
open-to-work headline, name, roles, location, work_mode, available_from, contact, photo, accent, theme
birthday-celebration name, greeting, message, date, from, photo, logo, accent, theme
employee-spotlight name, award, role, team, period, reason, nominated_by, photo, logo, accent, theme
farewell name, kind, role, company, years, message, photo, accent, theme
event-badge first_name, last_name, role, company, ticket_type, event_name, event_dates, qr, photo, logo, accent, theme
attending-event name, role, title, company, event_name, date, location, booth, ticket_url, photo, event_logo, accent, theme
session-card talk_title, track, day, start, end, room, event_name, speaker_1_name, speaker_1_title, speaker_1_photo, speaker_2_name, speaker_2_title, speaker_2_photo, speaker_3_name, speaker_3_title, speaker_3_photo, logo, accent, theme
event-agenda title, items, date, venue, logo, accent, theme
weekly-schedule title, days, highlight, week_of, timezone, logo, accent, theme
save-the-date names, date, eyebrow, venue, city, rsvp, photo, accent, theme
invitation occasion, host, date, venue, details, rsvp, image, accent, theme
calendar-month month, year, marked, title, background, accent, theme
booking-slots title, slots, period, business, booking_url, photo, accent, theme
qr-card headline, qr, cta, caption, url_label, logo, accent, theme
custom-ticket title, design, subtitle, date, time, venue, city, section, row, seat, price, number, holder, qr, note, admit, stub, accent, theme
year-in-review headline_value, headline_label, period, user_name, stats, top_1, top_1_image, top_2, top_2_image, top_3, top_3_image, app_name, logo, accent, theme
app-share-achievement activity, user_name, avatar, metrics, streak, date, badge, image, app_name, logo, accent, theme
line-chart title, series, highlight, unit, period, source, site, logo, accent, theme
donut-chart title, segments, center_value, center_label, eyebrow, source, site, logo, accent, theme
poll-results question, options, total_votes, status, source, logo, accent, theme
rating-summary subject, average, count, distribution, platform, platform_logo, image, accent, theme
leaderboard title, period, rows, highlight, site, logo, accent, theme
lighthouse-scores url, scores, device, date, screenshot, logo, accent, theme
quiz-result result_title, quiz_name, user_name, description, score, max_score, traits, photo, logo, site, accent, theme
nutrition-facts title, calories, serving, macros, eyebrow, image, site, accent, theme
breaking-news headline, kicker, location, source, timestamp, photo, logo, accent, theme
sports-score home_team, away_team, home_score, away_score, status, competition, date, venue, scorers, home_color, away_color, home_logo, away_logo, accent, theme
matchup home_team, away_team, kickoff, date, venue, competition, broadcast, odds, home_logo, away_logo, accent, theme
price-ticker symbol, name, price, change_pct, change_abs, series, timestamp, rows, logo, accent, theme
weather-forecast location, date, current_temp, unit, condition, summary, days, source, accent, theme
rates-board title, as_of, rows, disclaimer, site, logo, accent, theme
incident-update title, service, status, update, started, components, site, logo, accent, theme
security-advisory title, advisory_id, severity, score, package, affected, fixed_in, date, site, accent, theme
forum-thread title, excerpt, author, community, votes, replies, tags, solved, solved_label, avatar, logo, accent, theme
ama-question question, asker, answer, answerer, event, avatar, accent, theme
device-mockup headline, subheadline, product, device, background, screenshot, second_screenshot, logo, accent, theme
browser-frame url, title, caption, screenshot, favicon, accent, theme
feature-matrix title, eyebrow, columns, rows, highlight, site, logo_1, logo_2, logo_3, logo_4, accent, theme
integration-pair app_a_name, app_b_name, headline, connector, category, site, app_a_logo, app_b_logo, accent, theme
tech-stack title, project, items, url, logo_1, logo_2, logo_3, logo_4, logo_5, logo_6, logo_7, logo_8, accent, theme
automation-recipe title, steps, time_saved, site, icon_1, icon_2, icon_3, icon_4, icon_5, accent, theme
prompt-card prompt, tool, category, author, tool_logo, output_image, accent, theme
keyboard-shortcut action, keys, platform, app, tip, logo, accent, theme
coming-soon product, teaser, eyebrow, date_label, signup_url, image, logo, accent, theme
logo-wall title, subtitle, names, tiers, monochrome, logo_1, logo_2, logo_3, logo_4, logo_5, logo_6, logo_7, logo_8, logo_9, logo_10, logo_11, logo_12, accent, theme
product-grid title, subtitle, products, badge, cta_label, url, image_1, image_2, image_3, image_4, logo, accent, theme
back-in-stock product, label, variant, price, stock_note, cta_label, url, image, logo, accent, theme
price-list title, business, items, note, contact, image, logo, accent, theme
lead-magnet title, format, subtitle, pages, cta_label, url, cover, logo, accent, theme
cta-card headline, subtext, button_label, proof, url, logo, accent, theme
giveaway prize, label, steps, ends_at, sponsor, prize_image, logo, accent, theme
giveaway-winner title, winners, prize, avatar_1, avatar_2, avatar_3, avatar_4, avatar_5, logo, accent, theme
definition-card term, phonetic, part_of_speech, definition, example, category, site, accent, theme
book-card quote, title, author, rating, reviewer, genre, buy_url, cover, accent, theme
portfolio-showcase name, role, projects, site, image_1, image_2, image_3, avatar, accent, theme
real-estate-just-sold status, label, address, city, sale_price, old_price, days_on_market, agent_name, photo, agent_photo, logo, accent, theme
realtor-agent-card name, title, brokerage, stats, phone, email, license, photo, logo, accent, theme
travel-itinerary destination, dates, days, price, site, photo, logo, accent, theme
hotel-card name, location, rating, reviews, price, per, amenities, photo, logo, accent, theme
hotel-registration-card hotel, address, title, guest, arrival, departure, room, note, logo, accent, theme
vehicle-listing make, model, year, price, mileage, fuel, transmission, dealer, photo, logo, accent, theme
pet-adoption name, status, species, breed, age, sex, traits, shelter, url, photo, accent, theme
workout-of-the-day title, format, exercises, date, coach, photo, logo, accent, theme
sermon-series series, title, speaker, date, scripture, service_times, church, image, logo, accent, theme
podcast-guest guest_name, guest_title, guest_photo, show_name, episode_title, episode_number, host_name, host_photo, date, cover, listen_url, accent, theme
now-playing track, artist, album_art, progress, duration, platform, accent, theme
lyric-card lines, song, artist, cover, accent, theme
movie-rating title, year, poster, score, scale, genres, verdict, reviewer, accent, theme
photo-feature photo, title, credit, date, caption, site, accent, theme
seasonal-greeting occasion, message, sender, logo, photo, accent, theme
twitch-offline channel, message, schedule, socials, avatar, background, accent, theme
animated-countdown number, unit, event, date, site, accent, theme
animated-stat-counter value, label, eyebrow, source, site, accent, theme
animated-typing-headline title, eyebrow, author, site, accent, theme
animated-product-reveal name, brand, price, badge, cta, site, photo, accent, theme
animated-quote-fade quote, author, role, site, photo, accent, theme
animated-sale-pulse discount, off_label, title, subtitle, ends, cta, site, accent, theme
animated-growing-bars title, values, unit, eyebrow, site, accent, theme
animated-confetti title, subtitle, eyebrow, cta, site, accent, theme

GET /v1/templates/library returns the same list as JSON, with defaults, example values and a preview URL. Built-in templates are read-only; POST /v1/templates/library/{slug}/copy creates an ordinary HTML template on your account from one of them, with the same fields, which you can then change with PATCH /v1/templates/{id}. If the slug is free on your account the copy takes it, so your existing calls switch to your version; otherwise it gets a -copy suffix (or pass your own slug and name). A template on your account always wins over a built-in one with the same slug.

Text auto-fitting

Sooner or later somebody puts a 200-character title into a field designed for 60. Add data-autofit to an element inside a .fitbox container and we shrink the font until the text fits. Set the floor with data-autofit-min.

<div class="fitbox">
  <h1 class="fit" data-autofit data-autofit-min="36">{{ title }}</h1>
</div>

Visual editor

Not writing CSS? Build the template in the visual editor in your dashboard: start from a layout, add text, image and shape layers, drag them into place (with snapping to edges and centres), set fonts, colours, gradients, corner radius and opacity, and press Preview to see the real PNG rendered by Chrome — previews use no quota.

Bind any text layer to a field name and the text you typed becomes sample content and the field's default value; you can also type {{ name }} anywhere inside a text. Image layers either take an image URL per render (an image field) or an uploaded picture. The editor declares fields and images for you.

The editor compiles your layers into ordinary HTML and CSS that go through the same sanitiser and the same render path as hand-written templates, so you call it with "template": "your-slug" like any other template. Uploaded pictures are embedded in the CSS, so together they must fit in about 48 KB — the editor compresses them for you; for photos that change on every image, use an image field.

Editing an editor-made template by hand (in the code editor or with PATCH /v1/templates) switches it to code mode: from then on it is plain HTML and CSS and the visual editor no longer opens it.

Generate a template with AI

Describe the image in a sentence or two, or upload a screenshot of a design you like, and POST /v1/templates/generate returns a ready template: HTML, CSS, fields, sample defaults and a free preview URL. It is a proposal — nothing is saved until you send it to POST /v1/templates unchanged (or after editing). In the dashboard the Generate with AI button fills the code editor for you.

curl https://shareglint.com/v1/templates/generate \
  -H "Authorization: Bearer sk_live_…" \
  -F description="Dark blog card, big white title, author at the bottom, purple accent" \
  -F image=@design.png

The answer goes through exactly the same validation and sanitiser as a template you write yourself: only our fonts, {{ field }} placeholders, .fitbox/data-autofit for long titles, no scripts and no external URLs. Templates are 1200×630.

Paid plans only (Starter 20, Pro 50, Scale 100, Business 200 generations a day, reset at midnight UTC); Free gets 403 plan_required, the daily limit 429 ai_daily_limit. If the AI provider fails you get 502 ai_failed and nothing is counted. The image is a PNG, JPEG or WebP of up to 4 MB, sent as multipart image; we do not keep your description or image after the request.

Webhooks

Pass webhook_url when requesting a render and we will call you when it finishes — instead of you polling in a loop.

{
    "event": "image.completed",
    "id": "img_01m08s3ez1zcv28h335g9923bw",
    "status": "completed",
    "url": "https://cdn.yourdomain.com/renders/img_01m08s3ez1zcv28h335g9923bw.png",
    "size": "og",
    "width": 1200,
    "height": 630,
    "error": null,
    "created_at": "2026-08-17T21:13:54+00:00"
}

Every call carries X-Webhook-Timestamp and X-Webhook-Signature headers. The secret to verify them is in the dashboard or at GET /v1/account; rotate it through POST /v1/account/webhook-secret. We sign both values so an intercepted call cannot be replayed:

$expected = hash_hmac('sha256', $timestamp . '.' . $rawBody, $webhookSecret);

if (! hash_equals($expected, $request->header('X-Webhook-Signature'))) {
    abort(400);
}

We retry five times with growing backoff, so a brief outage on your side does not lose the event. A private-network address is rejected immediately with a 422 — rather than accepted, charged against your quota, and then quietly never called.

Signed image URLs (no server code)

A URL you paste straight into og:image — for static sites, Webflow, Shopify, Ghost themes and no-code tools, where you cannot keep an API key or send a POST. Template fields go in the query string, and the s parameter is a signature made with your signing secret. Available on every plan, Free included.

<meta property="og:image" content="https://shareglint.com/i/acc_YOUR_ACCOUNT_ID/blog-og.png?title=Ten%20things%20that%20ruin%20your%20sleep&s=…">

The first request renders the image (about a second), uses one render of your quota exactly like POST /v1/images, and answers with a 302 to the finished file. Every later request for the same template and the same values is a 302 to the existing file — no rendering, no quota. The redirect is cacheable for an hour (the file itself for a year), so crawlers come back through us now and then — and each of those visits shows up in your view analytics.

How to sign

  1. Path: /i/{account_id}/{template}.{ext} — your account id (acc_…, public, not a credential), the template slug and the extension you request. No host. The extension picks the format: .png, .jpg, .webp (quality 85), .pdf, or animated .gif / .mp4 from the template's CSS animations; rasters are 2× the template size. The extension is part of the signed path, so sign exactly the URL you publish — a signature for .png does not open .jpg.
  2. Take every query parameter except s (template fields and the optional locale), sort them by name (byte order), percent-encode the name and the value per RFC 3986 — everything except A–Z a–z 0–9 - _ . ~, so a space is %20 — and join them as name=value with &.
  3. Canonical string = path + ? + the joined parameters. The ? stays even when there are no parameters.
  4. s = the first 32 lowercase hex characters of HMAC-SHA256(canonical, signing_secret) (128 bits — plenty against guessing behind our rate limits, and half the URL length).
  5. Append s to the URL. The URL itself may list parameters in any order and encode spaces as + or %20: we decode it and rebuild the canonical string ourselves. Values are signed exactly as sent — we do not trim them.

Check your implementation against this test vector before you paste anything into og:image:

secret     sign_example
path       /i/acc_01k8example0000000000000000/blog-og.png
params     title=Hello, world!   author=Ann & Bob   locale=en
canonical  /i/acc_01k8example0000000000000000/blog-og.png?author=Ann%20%26%20Bob&locale=en&title=Hello%2C%20world%21
s          cdc6c6ad85a071f083b5f1374b0a6d98

PHP

function signedImageUrl(string $accountId, string $template, array $params, string $secret, string $ext = 'png'): string
{
    $path = "/i/{$accountId}/{$template}.{$ext}"; // png, jpg, webp, pdf, gif or mp4

    ksort($params, SORT_STRING);
    $query = implode('&', array_map(
        fn ($name, $value) => rawurlencode((string) $name).'='.rawurlencode((string) $value),
        array_keys($params),
        $params,
    ));

    $s = substr(hash_hmac('sha256', $path.'?'.$query, $secret), 0, 32);

    return 'https://shareglint.com'.$path.'?'.($query === '' ? '' : $query.'&').'s='.$s;
}

echo signedImageUrl('acc_YOUR_ACCOUNT_ID', 'blog-og', [
    'title' => 'Ten things that ruin your sleep',
    'author' => 'Anna Kowalska',
], getenv('SHAREGLINT_SIGNING_SECRET'));

JavaScript (Node)

import { createHmac } from 'node:crypto';

// encodeURIComponent leaves !'()* alone; RFC 3986 (and PHP's rawurlencode) does not.
const enc = (v) => encodeURIComponent(String(v))
  .replace(/[!'()*]/g, (c) => '%' + c.charCodeAt(0).toString(16).toUpperCase());

export function signedImageUrl(accountId, template, params, secret, ext = 'png') {
  const path = `/i/${accountId}/${template}.${ext}`; // png, jpg, webp, pdf, gif or mp4
  const query = Object.keys(params).sort()
    .map((name) => `${enc(name)}=${enc(params[name])}`)
    .join('&');
  const s = createHmac('sha256', secret).update(`${path}?${query}`).digest('hex').slice(0, 32);

  return `https://shareglint.com${path}?${query ? query + '&' : ''}s=${s}`;
}

console.log(signedImageUrl('acc_YOUR_ACCOUNT_ID', 'blog-og', {
  title: 'Ten things that ruin your sleep',
  author: 'Anna Kowalska',
}, process.env.SHAREGLINT_SIGNING_SECRET));

No-code tools

Anything with an HMAC-SHA256 function can sign: a JavaScript code step in Zapier, Pipedream and similar tools (adapt the JavaScript above), n8n's Crypto node (action Hmac, type SHA256, encoding hex — then keep the first 32 characters), or the build step of a static site generator. Build the canonical string exactly as in the steps above. Never sign in browser JavaScript: the secret would be public.

Good to know

Auto OG images (one tag, no code)

Add your domain in the dashboard (or with POST /v1/auto-og/sites), then put one tag in your site template. For each page we fetch the page, read its title, description, site name, icon, og:image and theme-color, and render a card with the site-card template — or a template of your own.

<meta property="og:image" content="https://shareglint.com/u/acc_YOUR_ACCOUNT_ID.png?url=https%3A%2F%2Fexample.com%2Fblog%2Fhello-world">
<meta name="twitter:card" content="summary_large_image">

Snippets for your platform:

HTML

Any site: put the tag in the <head> of each page, with that page's address URL-encoded after ?url=. Static site generators can fill it in from the page URL variable.

<!-- In the <head> of each page, with that page's own address -->
<meta property="og:image" content="https://shareglint.com/u/acc_YOUR_ACCOUNT_ID.png?url=https%3A%2F%2Fyour-site.com%2Fpricing">
<meta name="twitter:card" content="summary_large_image">

WordPress

Add to functions.php of a child theme or with a code-snippets plugin. If an SEO plugin (Yoast, Rank Math) already prints og:image, turn its image off so the page has only one.

// functions.php of your (child) theme, or a code-snippets plugin
add_action('wp_head', function () {
    global $wp;
    $page = is_singular() ? wp_get_canonical_url() : home_url(user_trailingslashit($wp->request));
    $image = 'https://shareglint.com/u/acc_YOUR_ACCOUNT_ID.png?url=' . rawurlencode($page);

    echo '<meta property="og:image" content="' . esc_attr($image) . '">' . "\n";
    echo '<meta name="twitter:card" content="summary_large_image">' . "\n";
}, 1);

Shopify

Online Store → Themes → Edit code. Replace the og:image lines in snippets/meta-tags.liquid (or in layout/theme.liquid). canonical_url works on products, collections, pages and blog posts.

{%- comment -%} snippets/meta-tags.liquid — replace the og:image lines {%- endcomment -%}
<meta property="og:image" content="https://shareglint.com/u/acc_YOUR_ACCOUNT_ID.png?url={{ canonical_url | url_encode }}">
<meta property="og:image:secure_url" content="https://shareglint.com/u/acc_YOUR_ACCOUNT_ID.png?url={{ canonical_url | url_encode }}">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta name="twitter:card" content="summary_large_image">

Ghost

Edit default.hbs of your theme and put the tags above {{ghost_head}}. Code injection in Ghost Admin does not run Handlebars, so it cannot fill in the page address.

{{!-- default.hbs, in <head> ABOVE {{ghost_head}} --}}
<meta property="og:image" content="https://shareglint.com/u/acc_YOUR_ACCOUNT_ID.png?url={{url absolute="true"}}">
<meta name="twitter:image" content="https://shareglint.com/u/acc_YOUR_ACCOUNT_ID.png?url={{url absolute="true"}}">
<meta name="twitter:card" content="summary_large_image">

Hugo

Put it in the partial that renders your <head>. .Permalink is the absolute address of each page; urlquery encodes it.

{{/* layouts/partials/head.html (or the <head> of baseof.html) */}}
<meta property="og:image" content="https://shareglint.com/u/acc_YOUR_ACCOUNT_ID.png?url={{ .Permalink | urlquery }}">
<meta name="twitter:card" content="summary_large_image">

Webflow

On a CMS template page: Page settings → Custom code → Inside <head> tag, with the Slug field inserted where it says SLUG. Static pages: the same tag with the page's address.

<!-- CMS template page → Page settings → Custom code → Inside <head> tag.
     Replace SLUG with the Slug field (“+ Add field”). -->
<meta property="og:image" content="https://shareglint.com/u/acc_YOUR_ACCOUNT_ID.png?url=https://your-site.com/blog/SLUG">
<meta name="twitter:card" content="summary_large_image">

Wix

Per page: Pages & Menu → the page's More Actions → SEO basics → Advanced SEO → Additional tags → + Add New Tag. Use the address of that page after ?url=. If Wix refuses the tag, remove the page's Social share image (and the site's General social image) first. Dynamic item pages need Velo code — see the Wix page.

<!-- Pages & Menu → the page's More Actions → SEO basics → Advanced SEO →
     Additional tags → + Add New Tag, per page. Dynamic item pages: Velo
     setMetaTags (see the Wix page). Remove the page's Social share image first. -->
<meta property="og:image" content="https://shareglint.com/u/acc_YOUR_ACCOUNT_ID.png?url=https://your-site.com/about">

Framer

Project Settings → Custom Code → Add Script, placed in the head, with only that page selected and its address after ?url= — for CMS pages one script with the Slug variable, see the Framer page. Set twitter:image too and clear the page's own social preview so there is only one card.

<!-- Project Settings → Custom Code → Add Script, placed in the head, with
     only this page selected in the page list. Also set twitter:image:
     Framer prints its own before custom code. -->
<meta property="og:image" content="https://shareglint.com/u/acc_YOUR_ACCOUNT_ID.png?url=https://your-site.com/features">
<meta name="twitter:card" content="summary_large_image">

Screenshot API

Send a public URL, get back a PNG, JPEG, WebP or PDF of the page — the viewport, the whole scrollable page or one element (selector) — or a smooth scroll video as MP4/GIF (scroll_video). Device presets with pixel ratio, touch and user agent (iphone-15, pixel-8, ipad, desktop-1920…), dark mode and reduced motion, an extra wait or a selector to wait for, clicks before the capture, selectors to hide, a lazy-load scroll, and cookie-banner, ad and tracker blocking. Same modes as images: asynchronous by default, ?wait=true to wait (up to 35 s), webhook_url to be called (screenshot.completed / screenshot.failed).

curl -X POST "https://shareglint.com/v1/screenshots?wait=true" \
  -H "Authorization: Bearer sk_live_…" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com", "device": "iphone-15", "full_page": true, "lazy_load": true, "format": "webp", "block_cookie_banners": true, "block_ads": true}'

A viewport or element screenshot uses 1 render of your quota, a full-page one 2, a scroll video 5; a country exit adds 1. The same URL with the same options within 24 h returns the existing file for free. A page that fails — a 4xx/5xx status, a timeout, a blocked address, an element that is not there — returns status: failed with the reason, and the quota comes back. On the Free plan screenshots carry the same small “Made with” badge as images.

Cookie banners, ads, trackers. block_cookie_banners first clicks “accept” on OneTrust, Cookiebot, Didomi, Usercentrics, Quantcast, TrustArc and Sourcepoint dialogs (and on common in-house banners), then hides what is left with the EasyList Cookie List. block_ads (EasyList) and block_trackers (EasyPrivacy) stop those requests and hide empty ad slots; block_ads alone also removes cookie banners, as it always did. Ads a site serves from its own domain can stay. A bot check that passes by itself (Cloudflare) is waited out; a few sites refuse automated browsers outright (403, 429).

Clicks, elements, videos. click_selector clicks one element or up to 5 in order (a tab, “show more”) — a link to a non-public address is refused like any other. selector captures that element's box. scroll_video: true records a smooth scroll from the top (up to 8 screens) as mp4 or gif, duration 1–10 s, long edge at most 1080 px.

{"url": "https://example.com/pricing", "click_selector": "#yearly", "selector": "#plans", "scale": 2}
{"url": "https://example.com", "scroll_video": true, "duration": 6, "format": "mp4"}

Country. country: "de" loads the page through a regional exit — the same address rules apply before the connection leaves. Only countries this server has a proxy for are accepted; anything else is a 422 with error: country_unavailable. No exits are configured right now.

No server? Sign a URL exactly like image URLs, with the path /s/{account_id}.{ext} and the options as query parameters (hide comma-separated), and use it in an <img> or og:image:

<img src="https://shareglint.com/s/acc_YOUR_ACCOUNT_ID.png?url=https%3A%2F%2Fexample.com&device=mobile&s=…">

Bulk generation (CSV, Google Sheets)

One request renders a whole spreadsheet: POST /v1/batches with a template and the rows — a JSON array in rows, the text of a CSV file in csv, or a CSV address or Google Sheets link in csv_url. Every row becomes one image per size; the answer is 202 with the batch id, and the images render in the background on their own low-priority queue, so a batch never delays your single renders.

curl -X POST "https://shareglint.com/v1/batches" \
  -H "Authorization: Bearer sk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "template": "blog-og",
    "sizes": ["og", "square"],
    "csv_url": "https://docs.google.com/spreadsheets/d/1AbC…/edit#gid=0",
    "webhook_url": "https://example.com/hooks/shareglint"
  }'

Each row holds field values, plus two optional keys: id (comes back with that row's result) and filename (the file name in the ZIP). CSV columns are matched to template fields by name — Title, title and TITLE all fill title — and columns that match nothing are ignored. To map them yourself, send columns: {"title": "Headline", "filename": "Slug"}. An empty cell leaves the field to the template's default.

{"template": "blog-og", "format": "webp", "rows": [
  {"id": "post-1", "filename": "ten-things", "title": "Ten things that ruin your sleep", "author": "Anna Kowalska"},
  {"id": "post-2", "title": "Why we moved to Postgres", "author": "Maya Chen"}
]}

Prefer clicking? The dashboard has the same thing under Bulk: upload a CSV or paste a sheet link, match columns, preview the first rows for free, start, and download the ZIP.

MCP: use with Claude, ChatGPT, Cursor

The API is also a remote Model Context Protocol server, so an AI assistant can render images, list templates, build signed og:image URLs and check your quota for you. Endpoint (streamable HTTP): https://shareglint.com/mcp. Two ways in, one account: chat apps (Claude, ChatGPT) sign in with OAuth — you log in to Shareglint and approve the app; coding tools and your own code send an API key in Authorization: Bearer sk_live_…. Either way it is the same account, quota and limits as /v1.

Tools: render_image, get_image, list_templates, get_template, create_signed_url, get_usage, take_screenshot, create_batch and get_batch (bulk generation from rows or a CSV / Google Sheets link) and generate_template (paid plans). Errors come back as {"error": code, "message": …} with the same codes as the HTTP API.

Clients that discover servers before connecting read the server card (name, endpoint, headers, protocol versions — MCP Server Cards), listed in the site's AI Catalog.

Claude and ChatGPT (sign in with OAuth)

Claude (web, desktop and mobile): Customize → Connectors → Add custom connector, name it Shareglint, URL https://shareglint.com/mcp, then Connect. You land on the Shareglint login and a consent screen; approve, and the tools show up in the chat. On Team and Enterprise plans an owner adds the connector for the organisation first, under Organization settings → Connectors.

ChatGPT (Business, Enterprise and Edu workspaces): add a custom MCP server (OpenAI moves this menu often — follow their current guide), URL https://shareglint.com/mcp, authentication OAuth with empty client credentials, then sign in and approve the same way. A workspace admin may have to allow custom connectors first.

Apps you connect are listed in Account settings, where each can be disconnected — its tokens stop working at once. Access tokens last a day and refresh on their own. OAuth clients discover everything else (dynamic client registration, authorization code with PKCE) from https://shareglint.com/.well-known/oauth-protected-resource/mcp.

Cursor, Claude Code, VS Code and code (API key)

Claude Code:

claude mcp add --transport http shareglint https://shareglint.com/mcp \
  --header "Authorization: Bearer sk_live_…"

Cursor (~/.cursor/mcp.json), VS Code and other clients that take a URL with headers:

{
  "mcpServers": {
    "shareglint": {
      "url": "https://shareglint.com/mcp",
      "headers": { "Authorization": "Bearer sk_live_…" }
    }
  }
}

From code — the Claude API MCP connector or the OpenAI Responses API pass the key the same way:

// Claude API (MCP connector)
"mcp_servers": [{ "type": "url", "url": "https://shareglint.com/mcp", "name": "images", "authorization_token": "sk_live_…" }]

// OpenAI Responses API
"tools": [{ "type": "mcp", "server_label": "images", "server_url": "https://shareglint.com/mcp", "headers": { "Authorization": "Bearer sk_live_…" } }]

View analytics

Every image we serve through a URL — a signed /i/… URL (and auto-OG and screenshot URLs) — adds one to a daily counter for the platform that fetched it, worked out from the User-Agent: Facebook, LinkedIn, X, Slack, Discord, WhatsApp, Telegram, iMessage, Google, other bots or a browser. Link previews count as shares — roughly “your link was pasted N times”. See them in the dashboard or fetch them from GET /v1/analytics?days=30 (up to 90 days, UTC).

Teams

An account is a workspace: its plan, quota, API keys, templates and renders are shared by everyone in it. Invite people on the Team page; the email link works for 7 days. Someone in several workspaces switches between them in the dashboard header.

Security

Found a vulnerability? Write to hello@shareglint.com, in English or Polish, with the affected URL or endpoint and the steps to reproduce it. We read every report and reply from the same address.

Test only against your own account and data, do not degrade the service (no load or denial-of-service tests, no spam through our mail), and give us a reasonable time to fix the issue before you make it public.

The same contact in machine-readable form: /.well-known/security.txt (RFC 9116).

Reference

Every endpoint with its parameters, schemas and examples is in the API reference, generated from the same OpenAPI 3.1 spec.

Endpoint descriptions are in English regardless of the page language: the spec is a machine contract that clients are generated from, so it has one fixed version.