Template System Deep Dive
Save, reuse, fork, and share generation configurations with the template system.
Overview
Templates store complete generation configurations — model, prompt, width, height, palette, and advanced parameters. Instead of re-typing your best prompt structure every time, save it as a template and apply it in one click (or one API call). Templates can be private to your account or shared publicly for the community.
Step 1: Save a Generation Config as a Template
After finding a prompt and parameter combination that produces great results, save it:
curl -X POST https://api.spritesynth.com/v1/templates \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "RPG Character Base",
"description": "16-bit style RPG character, 32x32, 4 directions",
"type": "character",
"config": {
"width": 32,
"height": 32,
"direction_count": 4,
"prompt_template": "pixel art sprite, {role} with {appearance}, 16-bit style, game asset, transparent background",
"negative_prompt": "mixels, blurry, photograph, realistic"
}
}'The prompt_template field supports {variable} placeholders that you fill in when applying the template.
Step 2: Apply a Template
Use the saved template to generate a new asset with different variables:
curl -X POST https://api.spritesynth.com/v1/templates/{template_id}/apply \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"overrides": {
"prompt": "pixel art sprite, dark elf with black armor and red eyes, 16-bit style, game asset, transparent background"
}
}'You can also pass "project_id" to assign the generation to a specific project.
Step 3: Duplicate and Fork Templates
Customize someone else's template (or your own) without modifying the original:
curl -X POST https://api.spritesynth.com/v1/templates/{template_id}/duplicate \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "My Customized RPG Character Base"
}'The duplicate becomes your own template — you can edit its config, share it, or delete it independently.
Step 4: Delete Unwanted Templates
Clean up templates you no longer use:
curl -X DELETE https://api.spritesynth.com/v1/templates/{template_id} \
-H "Authorization: Bearer YOUR_API_KEY"Deleting a template does not affect assets already generated with it.
Tips
- Variable naming convention — Use
{role},{appearance},{weapon},{color}as placeholders. Keep names short and semantic. - Public templates grow the community — Share your best templates publicly. Well-crafted templates help other developers and establish your reputation.
- Template per asset type — Create separate templates for characters, objects, tilesets, and UI elements. Each has different parameters.
- Iterate on templates — The first version of a template is rarely the best. Generate a few assets, adjust parameters, and save an improved version.
- Combine with batch generation — Save a batch template, then apply it 10 times with different overrides to generate a full asset set in minutes.
Need help?
Join our Discord community for support and tips.