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 DashboardMake 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| Field | Type | Description | Example |
|---|---|---|---|
| displayName | string | User's display name | "John Doe" |
| username | string | Handle (with @) | "@johndoe" |
| tweetText | string | Tweet content | "Hello world!" |
| timestamp | string | Time (relative or date) | "2h" or "Nov 13" |
| replyCount | string | Reply count | "42" |
| repostCount | string | Repost count | "15" |
| likeCount | string | Like count | "123" |
| viewCount | string | View count | "1.7K" |
| isVerified | boolean | Verified badge | true |
| hasBookmark | boolean | Bookmark icon | false |
| avatarInitials | string | Avatar fallback | "JD" |
| profilePictureUrl | string | Profile image URL | "https://example.com/avatar.jpg" |
| enableBackgroundColor | boolean | Enable background | true |
| backgroundColor | string | Background color (hex) | "#1a1a1a" |
| boxShadowAmount | number | Shadow (0-3) | 2 |
LinkedIn Post
linkedin-post| Field | Type | Description | Example |
|---|---|---|---|
| username | string | Full name | "Sarah Chen" |
| headline | string | Professional title | "Software Engineer @ Google" |
| content | string | Post content | "Excited to announce..." |
| timestamp | string | Time (relative) | "2h" or "1d" |
| likes | string | Like count | "234" |
| comments | string | Comment count | "18" |
| reposts | string | Repost count | "12" |
| avatarInitials | string | Avatar fallback | "SC" |
| profilePictureUrl | string | Profile image URL | "https://example.com/avatar.jpg" |
| enableBackgroundColor | boolean | Enable background | true |
| backgroundColor | string | Background color (hex) | "#3e3e42" |
| boxShadowAmount | number | Shadow (0-3) | 2 |
Threads Post
threads-post| Field | Type | Description | Example |
|---|---|---|---|
| username | string | Username (no @) | "alex_dev" |
| content | string | Post content | "Just shipped a new feature!" |
| replies | string | Reply count | "24" |
| likes | string | Like count | "156" |
| isVerified | boolean | Verified badge | false |
| darkMode | boolean | Dark theme | false |
| avatarInitials | string | Avatar fallback | "AD" |
| profilePictureUrl | string | Profile image URL | "https://example.com/avatar.jpg" |
| enableBackgroundColor | boolean | Enable background | true |
| backgroundColor | string | Background color (hex) | "#3e3e42" |
| boxShadowAmount | number | Shadow (0-3) | 2 |
Reddit Post
reddit-post| Field | Type | Description | Example |
|---|---|---|---|
| displayName | string | Display name | "tech_enthusiast" |
| username | string | Username (u/...) | "u/tech_enthusiast" |
| title | string | Post title | "I built an API..." |
| content | string | Post body text | "After months of work..." |
| upvotes | string | Upvote count | "2.5K" |
| comments | string | Comment count | "127" |
| isVerified | boolean | Verified badge | false |
| enableBackgroundColor | boolean | Enable background | true |
| backgroundColor | string | Background color (hex) | "#3e3e42" |
| boxShadowAmount | number | Shadow (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)