Using Templates
Templates are pre-built video compositions with merge fields that you can fill dynamically. Use them to generate personalized videos at scale without building timelines from scratch.
Browse the Gallery
List available templates via the API or browse them in the dashboard.
curl
curl https://api.vidiking.com/v1/templates?category=marketing \
-H "Authorization: Bearer $VIDIKING_API_KEY"
Node.js
const templates = await client.templates.list({ category: 'marketing' });
templates.forEach(t => {
console.log(`${t.id}: ${t.name} - ${t.description}`);
});
Python
templates = client.templates.list(category="marketing")
for t in templates:
print(f"{t.id}: {t.name} - {t.description}")
Response
{
"templates": [
{
"id": "tpl_promo_001",
"name": "Product Promo - Bold",
"description": "30-second product promo with bold text animations and background music",
"category": "marketing",
"duration": 30,
"thumbnail": "https://cdn.vidiking.com/templates/tpl_promo_001/thumb.jpg",
"merge_fields": [
{ "name": "headline", "type": "text", "default": "Your Product Name" },
{ "name": "subtext", "type": "text", "default": "The tagline goes here" },
{ "name": "product_image", "type": "image_url", "default": null },
{ "name": "brand_color", "type": "color", "default": "#ff6b00" },
{ "name": "cta_text", "type": "text", "default": "Learn More" }
]
}
]
}
Render a Template
Fill the merge fields and submit for rendering.
curl
curl -X POST https://api.vidiking.com/v1/templates/tpl_promo_001/render \
-H "Authorization: Bearer $VIDIKING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"merge_fields": {
"headline": "SuperWidget Pro",
"subtext": "The fastest widget on the market",
"product_image": "https://example.com/superwidget.png",
"brand_color": "#2563eb",
"cta_text": "Buy Now"
},
"output": {
"format": "mp4",
"resolution": "hd"
}
}'
Node.js
const { jobId } = await client.templates.render('tpl_promo_001', {
mergeFields: {
headline: 'SuperWidget Pro',
subtext: 'The fastest widget on the market',
product_image: 'https://example.com/superwidget.png',
brand_color: '#2563eb',
cta_text: 'Buy Now',
},
output: { format: 'mp4', resolution: 'hd' },
});
const job = await client.pollJob(jobId);
console.log('Video URL:', job.url);
Python
result = client.templates.render("tpl_promo_001", {
"merge_fields": {
"headline": "SuperWidget Pro",
"subtext": "The fastest widget on the market",
"product_image": "https://example.com/superwidget.png",
"brand_color": "#2563eb",
"cta_text": "Buy Now",
},
"output": {"format": "mp4", "resolution": "hd"},
})
job = client.poll_job(result.job_id)
print("Video URL:", job.url)
Batch Rendering
Render the same template with different data for each row. Useful for personalized outreach, product catalogs, or social content.
curl -X POST https://api.vidiking.com/v1/templates/tpl_promo_001/batch \
-H "Authorization: Bearer $VIDIKING_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"items": [
{
"merge_fields": { "headline": "Widget A", "product_image": "https://example.com/a.png" }
},
{
"merge_fields": { "headline": "Widget B", "product_image": "https://example.com/b.png" }
},
{
"merge_fields": { "headline": "Widget C", "product_image": "https://example.com/c.png" }
}
],
"output": { "format": "mp4", "resolution": "hd" }
}'
Template Categories
| Category | Description |
|---|---|
marketing | Product promos, ads, social media |
corporate | Presentations, reports, announcements |
social | Instagram, TikTok, YouTube shorts |
real-estate | Property listings, virtual tours |
ecommerce | Product showcases, sales banners |
education | Tutorials, course intros, explainers |
Cost
Template renders cost $0.22 per render. Batch renders cost $0.22 per item.