Use Case
Social Media Image API
Generate social media images and OG cards at scale. Instagram posts, stories, Twitter cards, and LinkedIn banners.
<500ms
Per image
$0.002
Per render
All
Platforms
99.9%
Uptime
Platform-Specific Formats
Each social platform has optimal image dimensions. SudoMock lets you maintain templates for each format and generate platform-specific images from a single API call. Perfect for marketing teams, agencies, and content automation platforms.
| Platform | Format | Dimensions |
|---|---|---|
| Instagram Post | Square | 1080×1080 |
| Instagram Story | Vertical | 1080×1920 |
| Twitter/X Card | Landscape | 1200×675 |
| LinkedIn Post | Landscape | 1200×627 |
| Facebook OG | Landscape | 1200×630 |
Dynamic OG Images
Generate Open Graph images dynamically for blog posts, product pages, or any content that needs social sharing optimization. Your template includes Smart Objects for title, description, product image, and branding.
Dynamic OG Image Generation
1// Generate OG image for blog post2async function generateOGImage(blogPost) {3 const response = await fetch("https://api.sudomock.com/api/v1/renders", {4 method: "POST",5 headers: {6 "X-API-KEY": process.env.SUDOMOCK_API_KEY,7 "Content-Type": "application/json"8 },9 body: JSON.stringify({10 mockup_uuid: "og-image-template",11 smart_objects: [12 {13 uuid: "title-text",14 // For text layers, use text property instead of asset15 text: blogPost.title16 },17 {18 uuid: "author-avatar",19 asset: { url: blogPost.authorAvatar, fit: "cover" }20 },21 {22 uuid: "featured-image",23 asset: { url: blogPost.featuredImage, fit: "cover" }24 }25 ],26 export_options: {27 image_format: "jpeg", // JPEG for smaller OG images28 image_size: 1200,29 quality: 8530 }31 })32 });3334 return (await response.json()).data.print_files[0].export_path;35}3637// Usage: Generate OG image when blog post is published38const ogImageUrl = await generateOGImage({39 title: "10 Tips for Better Product Photography",40 authorAvatar: "https://cdn.example.com/avatar.jpg",41 featuredImage: "https://cdn.example.com/featured.jpg"42});4344// Set as OG image in page meta45// <meta property="og:image" content={ogImageUrl} />Text Layer Support
SudoMock supports text replacement in Smart Objects. Design your PSD template with text layers as Smart Objects, then pass the text content via API.
Batch Social Media Generation
Generate images for all platforms simultaneously. Perfect for scheduling tools and content management systems.
Multi-Platform Social Generation
1// Generate all social formats in parallel2const SOCIAL_TEMPLATES = {3 instagram_square: "social-ig-square-uuid",4 instagram_story: "social-ig-story-uuid",5 twitter_card: "social-twitter-uuid",6 linkedin_post: "social-linkedin-uuid",7 facebook_og: "social-fb-og-uuid"8};910async function generateAllSocialImages(productUrl, headline) {11 const results = await Promise.all(12 Object.entries(SOCIAL_TEMPLATES).map(async ([platform, templateId]) => {13 const response = await fetch("https://api.sudomock.com/api/v1/renders", {14 method: "POST",15 headers: {16 "X-API-KEY": process.env.SUDOMOCK_API_KEY,17 "Content-Type": "application/json"18 },19 body: JSON.stringify({20 mockup_uuid: templateId,21 smart_objects: [22 { uuid: "product-image", asset: { url: productUrl, fit: "contain" } },23 { uuid: "headline-text", text: headline }24 ]25 })26 });27 28 const data = await response.json();29 return { platform, url: data.data.print_files[0].export_path };30 })31 );32 33 return Object.fromEntries(results.map(r => [r.platform, r.url]));34}3536// Generate 5 social images in ~1 second37const socialImages = await generateAllSocialImages(38 "https://cdn.example.com/product.png",39 "Summer Sale: 50% Off Everything"40);41// { instagram_square: "...", instagram_story: "...", ... }Automate Social Media Images
500 free API credits. All major platforms supported.