Dashboard

Templates API

Save reusable job configurations as templates. Templates store persona, model, voice, script, and quality settings so you can create consistent videos without re-entering the same parameters. Max 20 templates per account.

How Templates Work

Templates store all job configuration fields except product-specific data (product_name, product_image_url). Load a template into your job creation form, provide the product details, and submit. All config fields are optional — only include the settings you want to standardize.

List Templates

Retrieve all job templates for your account, sorted by default first, then by most used and most recently updated.

GET/api/v1/templates

Returns a bare array (not paginated).

Sorted by: is_default DESC, use_count DESC, updated_at DESC.

Only returns templates owned by the authenticated tenant.

Parameters

ParameterType
limit
integer
Default: 50

Request Example

curl -X GET "https://api.u-gen.ai/api/v1/templates?limit=50" \
  -H "X-API-Key: YOUR_API_KEY"

Create Template

Save a job configuration as a reusable template. Returns HTTP 201 Created.

POST/api/v1/templates

Maximum 20 templates per account.

Setting is_default to true automatically unsets the previous default.

Only non-null config fields are stored — omitted fields are excluded.

Body

ParameterType
nameREQ
string
description
string
configREQ
TemplateConfig
is_default
boolean
Default: false

Request Example

curl -X POST https://api.u-gen.ai/api/v1/templates \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Quick Demo - Tech",
    "description": "Fast tech product demos with energetic delivery.",
    "config": {
      "persona_id": "09d3a33a-3eb0-480a-80df-0c64dbf7c98f",
      "video_model": "veo3_fast",
      "segment_count": 2,
      "output_aspect_ratio": "9:16",
      "interaction_mode": "display_static",
      "caption_style": "tiktok_karaoke",
      "captions_enabled": true,
      "music_enabled": true,
      "qai_enabled": false
    },
    "is_default": false
  }'

Update Template

Update a template's name, description, config, or default status. Only provided fields are changed.

PATCH/api/v1/templates/{template_id}

Returns 404 if the template does not exist or belongs to another tenant.

Config is replaced entirely, not merged. Include all desired fields in the update.

At least one field must be provided or a 400 error is returned.

Path

ParameterType
template_idREQ
string (UUID)

Body

ParameterType
name
string
description
string
config
TemplateConfig
is_default
boolean

Request Example

curl -X PATCH https://api.u-gen.ai/api/v1/templates/f1e2d3c4-b5a6-7890-abcd-ef1234567890 \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Quick Demo - Tech v2",
    "config": {
      "segment_count": 3,
      "music_mood": "energetic"
    }
  }'

Delete Template

Permanently delete a job template. Existing jobs are not affected.

DELETE/api/v1/templates/{template_id}

Returns 204 No Content on success (no response body).

Returns 404 if the template does not exist or belongs to another tenant.

Path

ParameterType
template_idREQ
string (UUID)

Request Example

curl -X DELETE https://api.u-gen.ai/api/v1/templates/f1e2d3c4-b5a6-7890-abcd-ef1234567890 \
  -H "X-API-Key: YOUR_API_KEY"

Track Template Usage

Increment the use_count for a template. Call this when a template is loaded into a form.

POST/api/v1/templates/{template_id}/use

Returns 204 No Content (no response body).

The use_count is used for sorting — most-used templates appear first in the list.

Path

ParameterType
template_idREQ
string (UUID)

Request Example

curl -X POST https://api.u-gen.ai/api/v1/templates/f1e2d3c4-b5a6-7890-abcd-ef1234567890/use \
  -H "X-API-Key: YOUR_API_KEY"

Config Fields Reference

All fields in the config object are optional. Only include settings you want the template to standardize. Product-specific fields (product_name, product_image_url) are excluded from templates.

FieldTypeDescription
persona_idstring (UUID)Default persona identifier
video_modelstringveo3_fast, veo3, kling3_std, kling3_pro
segment_countintegerNumber of video segments (1–10)
segment_durationintegerPer-segment duration. Veo: 8, Kling: 3–10
output_aspect_ratiostring9:16, 16:9, Auto, 1:1 (Kling)
interaction_modestringholdable, display_static, wearable, consumable, surface_interactive
languagestringISO 639-1 code (default: en)
video_resolutionstringstandard, 1080p, 4k
keyframe_resolutionstring1k, 2k, 4k
caption_stylestringtiktok_karaoke, tiktok_highlight, mrbeast_karaoke, neon_karaoke, minimal_karaoke, custom
captions_enabledbooleanGenerate captions
music_enabledbooleanBackground music
music_moodstringMusic mood filter (e.g., upbeat, cinematic)
music_volumefloatVolume level (0.05–0.30)
custom_music_idstring (UUID)Custom uploaded music track ID
script_structurestringScript structure preset
script_tonestringScript tone (conversational, professional, etc.)
key_selling_pointsstring[]Up to 5 product selling points
cta_textstringCall-to-action text (max 100 chars)
environment_descriptionstringCustom scene/environment description
qai_enabledbooleanAI Quality Assurance toggle
qai_modestringstrict, standard, lenient
max_retries_keyframeintegerMax keyframe retries (0–5)
max_retries_videointegerMax video retries (0–5)
human_reviewstringoff, anchor_only, all
apply_brand_kitbooleanApply brand logo watermark
voice_similarity_boostfloatElevenLabs similarity (0.0–1.0)
voice_stabilityfloatElevenLabs stability (0.0–1.0)

Default Template

Only one template can be the default per account. Setting is_default: true on create or update automatically unsets the previous default. The default template is always listed first.