API Documentation

Generate social media screenshots via REST API. Simple, fast, and reliable.

1Quick Start

Get Your API Key

Sign in to your dashboard to get your unique API key. You'll need this for all requests.

Go to Dashboard

Make a Request

bash
curl -X POST https://api.socialrenders.com/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "templateId": "twitter-post",
    "fields": {
      "displayName": "John Doe",
      "username": "johndoe",
      "tweetText": "Hello world!"
    }
  }'

This returns a JSON response with the hosted image URL.

Image Retention Policy

Generated images are hosted for 48 hours. Download and save images if you need them longer.

Templates

Twitter Post

twitter-post
FieldTypeDescriptionExample
displayNamestringUser's display name"John Doe"
usernamestringHandle (with @)"@johndoe"
tweetTextstringTweet content"Hello world!"
timestampstringTime (relative or date)"2h" or "Nov 13"
replyCountstringReply count"42"
repostCountstringRepost count"15"
likeCountstringLike count"123"
viewCountstringView count"1.7K"
isVerifiedbooleanVerified badgetrue
hasBookmarkbooleanBookmark iconfalse
avatarInitialsstringAvatar fallback"JD"
profilePictureUrlstringProfile image URL"https://example.com/avatar.jpg"
enableBackgroundColorbooleanEnable backgroundtrue
backgroundColorstringBackground color (hex)"#1a1a1a"
boxShadowAmountnumberShadow (0-3)2

LinkedIn Post

linkedin-post
FieldTypeDescriptionExample
usernamestringFull name"Sarah Chen"
headlinestringProfessional title"Software Engineer @ Google"
contentstringPost content"Excited to announce..."
timestampstringTime (relative)"2h" or "1d"
likesstringLike count"234"
commentsstringComment count"18"
repostsstringRepost count"12"
avatarInitialsstringAvatar fallback"SC"
profilePictureUrlstringProfile image URL"https://example.com/avatar.jpg"
enableBackgroundColorbooleanEnable backgroundtrue
backgroundColorstringBackground color (hex)"#3e3e42"
boxShadowAmountnumberShadow (0-3)2

Threads Post

threads-post
FieldTypeDescriptionExample
usernamestringUsername (no @)"alex_dev"
contentstringPost content"Just shipped a new feature!"
repliesstringReply count"24"
likesstringLike count"156"
isVerifiedbooleanVerified badgefalse
darkModebooleanDark themefalse
avatarInitialsstringAvatar fallback"AD"
profilePictureUrlstringProfile image URL"https://example.com/avatar.jpg"
enableBackgroundColorbooleanEnable backgroundtrue
backgroundColorstringBackground color (hex)"#3e3e42"
boxShadowAmountnumberShadow (0-3)2

Reddit Post

reddit-post
FieldTypeDescriptionExample
displayNamestringDisplay name"tech_enthusiast"
usernamestringUsername (u/...)"u/tech_enthusiast"
titlestringPost title"I built an API..."
contentstringPost body text"After months of work..."
upvotesstringUpvote count"2.5K"
commentsstringComment count"127"
isVerifiedbooleanVerified badgefalse
enableBackgroundColorbooleanEnable backgroundtrue
backgroundColorstringBackground color (hex)"#3e3e42"
boxShadowAmountnumberShadow (0-3)2

Note: Reddit posts always display the Reddit logo and do not support custom profile pictures.

Code Examples

JavaScript

const response = await fetch('https://api.socialrenders.com/generate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    templateId: 'twitter-post',
    fields: { displayName: 'John', username: 'john', tweetText: 'Hello!' }
  })
});
const blob = await response.blob();

Python

import requests

r = requests.post('https://api.socialrenders.com/generate',
    headers={'Authorization': 'Bearer YOUR_API_KEY'},
    json={'templateId': 'linkedin-post', 'fields': {...}}
)
open('image.png', 'wb').write(r.content)