Documentation
Link To Card renders social-card images (the picture a chat app or a social network shows when someone shares your link) from an HTML and CSS template plus a few text values.
You can use it in two ways.
1. A signed URL in a meta tag #
You build a URL on your server, sign it with your site secret, and put it in the page:
<meta property="og:image" content="https://linktocard.com/v1/og/s_4k2j9x0q1m7c8d5e/blog.png?title=Hello+world&sig=...">The image is rendered the first time someone requests the URL and is then served from cache. Nothing runs on your side at request time. Start with the Quickstart, then read Signed URLs.
2. A REST call #
You send a template and data, and get back a URL or the image bytes:
curl https://linktocard.com/v1/images \
-H "Authorization: Bearer $LTC_API_KEY" \
-H "Content-Type: application/json" \
-d '{"template": "blog", "data": {"title": "Hello world"}}'See the API reference.
What you get #
- Sizes: 1200 x 630 (
og), 1080 x 1080 (square) and 1080 x 1350 (portrait). - Formats: PNG, JPEG and WebP.
- Templates: five starter templates (
blog,dark,quote,launch,docs), or your own HTML and CSS. - Text:
{{placeholders}}filled from your data. Classes on<body>let plain CSS react to missing or long values. - Fonts: Inter, Source Serif 4 and JetBrains Mono are built in. You can upload your own on paid plans.
- Emoji: colour emoji in any text.
What it does not do #
- No visual editor. Templates are HTML and CSS that you write, or one of the five starter templates.
- No screenshots. It does not load web pages and cannot capture an existing page.
- No video, GIF or PDF output. One request gives one still image.
- No AI. Nothing is generated; the card shows exactly the text and images you send.
- No browser. Templates are drawn by a layout engine that understands a large part of CSS, but JavaScript never runs and some HTML is not supported. HTML and CSS templates lists exactly what works.
Pages #
- Quickstart: a working
og:imagein about five minutes, then the same card through the API. - Signed URLs: the signature format, signer code for Node.js, PHP and Python, caching, rotation, and every reason for a 403.
- HTML and CSS templates: placeholders, state classes, fonts, emoji, images, the starter templates and a complete example.
- Frameworks: plain HTML, WordPress, Ghost, Webflow, Hugo, Astro and Next.js.
- API reference: every endpoint, field, header and error code.
- Limits: what each plan includes, the technical limits, and what happens when you reach one.
Questions that these pages do not answer: support@linktocard.com.