Using Templates with AIGen SDK (Node.js)
Templates make it easy to create personalized, reusable, and scalable image designs with just a few variables. Perfect for certificates, social media banners, email hero images, and marketing creatives.
What Are Templates?
Templates are pre-designed visuals with placeholders for dynamic content like names, roles, product names, colors, or profile pictures.
You create them visually using the Vibe Editor at aigen.run — no code needed!
Create a Template in the Vibe Editor
- Go to https://aigen.run
- Click “Create Image Template”
- Drag and drop elements like text, images, shapes, and placeholders
- Assign variable names to text or image layers (e.g.,
name,company,photo) - Click Export to get your template ID
- The template ID will appear in the export screen, like:
abc123/1(whereabc123is the template ID and1is the version)
You can update your template anytime and use different versions!
Node.js SDK Usage
import AigenSDK from 'aigen-sdk'
const aigen = new AigenSDK('your-secret-key')
const url = await aigen.createImage({
template: 'abc123/1', // Template ID from Vibe Editor
data: {
name: 'Jane Smith',
title: 'Founder',
company: 'Visionary Labs'
},
duration: 48 // Optional (time validity in hours of the pre-signed url)
})
console.log('Generated Image URL:', url)
📌 Tips
- Use descriptive variable names like
name,event_date,photo,score - Group your templates by use-case (e.g., event banners, certificates)
- Combine with social profile (
--profile) for hyper-personalized content at scale for each of your users or clients
📦 Example Use Cases
- 🎉 Event invitations personalized with name + QR code
- 🏆 Certificate of achievement with dynamic recipient info
- 📰 Social media post templates for announcements
- 📧 Personalized email graphics for customers
💡 Template Benefits
- Design once, use forever
- Easily scale personalized images
- Version control and visual consistency
- Share templates across teams or customers
❤️ Use templates to build fast, beautiful, and scalable visual campaigns — with aigen.run
Other pages
AI models & Pricing Guide
List of all AI models you can use
Advanced Image Editing
All the options you have to edit images with AI
Generate images
All the options you have to generate images with AI
Image templates
How you can use image templates to have more fine control of the AI generated images
AIGen SDK (Node.js) Reference
This is the official reference for the AIGen Node.js SDK. Use it to generate AI images, personalize templates, and securely share results via signed URLs.