API & Integration -> API Reference

Create a template

Templates are usually created visually in the template editor, but you can also create them programmatically. This is helpful when you want to generate templates from your own application, copy templates between projects, or manage them entirely through code.

This endpoint adds a new template to your project. A template is described using RenderScript, the JSON-based format that defines a video or image.

Parameters

name string required

A name for the template so you can recognize it in your project. Can be any non-empty string.

source object required

The template's RenderScript as a JSON object, describing the video or image: its dimensions, elements, and animations.

tags array optional

A list of text labels for organizing your templates. Tags can be used to filter the template list, and to render every template carrying a tag at once.

API endpoint

Send a POST request to the following endpoint using your project's API key. Both name and source are required; tags is optional.

curl -X POST https://api.creatomate.com/v2/templates \
     -H "Content-Type: application/json" \
     -H "Authorization: Bearer YOUR_API_KEY_HERE" \
     -d '{
       "name": "My Template",
       "tags": ["Product", "Marketing"],
       "source": {
         "output_format": "mp4",
         "width": 1080,
         "height": 1920,
         "elements": [
           { "type": "text", "text": "Hello world" }
         ]
       }
     }'

Response

On success, the endpoint responds with 201 Created and returns the new template, including its generated id and timestamps. The source field contains the full RenderScript you submitted.

{
  "id": "087d94b5-cef6-44b7-96d4-4c651beec61d",
  "name": "My Template",
  "tags": ["Product", "Marketing"],
  "created_at": "2026-01-01 12:00:00.000 +0200",
  "updated_at": "2026-01-01 12:00:00.000 +0200",
  "source": {}
}