Learn how to generate dynamic images using our API
Complete OpenAPI specification with all endpoints
View the auto-generated OpenAPI documentation for detailed endpoint specifications, request/response schemas, and authentication details.
Navigate to Templates → New Template
Choose a preset (e.g., OG Image 1200×630px)
Add layers with semantic names: title, subtitle, logo
Save the template and note your Template ID
Go to App → API Keys → Create New Key to generate your authentication token
Use layer overrides to dynamically customize your template:
const response = await fetch('https://yourdomain.com/api/generate', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
templateId: 'your-template-id',
layers: {
title: { text: 'My Blog Post Title' },
subtitle: {
text: 'Published on Jan 15',
fontSize: 24,
color: '#666666'
},
logo: {
image_url: 'https://example.com/logo.png',
width: 120,
height: 120
}
},
format: 'png' // or 'jpeg', 'webp'
})
});
const { success, imageUrl, cached } = await response.json();
// Use imageUrl in your applicationFor public templates, generate images directly via URL with JSON-encoded layer data:
# Simple text override
/api/render?templateId=uuid&layers={"title":{"text":"Hello World"}}
# Multiple layer overrides
/api/render?templateId=uuid&layers={"title":{"text":"Blog Title"},"subtitle":{"text":"By John Doe"},"logo":{"image_url":"https://example.com/avatar.jpg"}}
# Use in HTML
<meta property="og:image" content="https://yourdomain.com/api/render?templateId=..." /> Note: The public endpoint doesn't require authentication and doesn't count toward rate limits. Perfect for social media OG images!
Update existing templates via API for programmatic template management, bulk updates, or CI/CD integration:
const response = await fetch('https://yourdomain.com/api/templates/your-template-id', {
method: 'PUT',
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: 'Updated Template Name',
description: 'Updated description',
jsonData: {
canvas: { width: 1200, height: 630, background: '#ffffff' },
layers: [
// Your updated layer definitions
],
variables: []
}
})
});
const updatedTemplate = await response.json(); Updatable fields: name, description, jsonData, previewUrl
Override text content and styling:
{
"title": {
"text": "New content",
"fontSize": 48,
"fontWeight": "bold",
"color": "#000000",
"textAlign": "center",
"lineHeight": 1.2,
"letterSpacing": -1,
"textTransform": "uppercase"
}
}Override image source and display properties:
{
"avatar": {
"image_url": "https://example.com/avatar.jpg",
"width": 120,
"height": 120,
"objectFit": "cover",
"borderRadius": 60,
"opacity": 1
}
}Rate limits are based on your subscription plan and reset monthly:
Note: Cached responses don't count toward your limit. The public /api/render endpoint also doesn't count
toward rate limits.
Questions about the API or template creation? Contact our support team