Movie templates are useful to store a script in the cloud and reuse it in different movies and they are specially helpful combined with the variables.
Instead of providing the movie script in the request, you just need to reference to the template id.
POST https://json2video.com/v2/movies
{
"comment": "Template id example",
"template": "AEobbDfGDXb9dIlFwqJC"
}
And are specially useful combined with the variables because you can customize the template in each render request without changing the JSON script.
{
"comment": "Template id example with variables",
"variables": {
"title": "Hello world!",
"bgColor": "#4392F1",
"image": "https://json2video.com/img/logo.png"
},
"template": "AEobbDfGDXb9dIlFwqJC"
}
When should you use movie templates
Movie templates are suitable for the following use cases:
- When the videos you are creating are consistent and don't change too much. For example, they have the same structure and you are only changing elements like text, images, audio or voice elements.
- When you are integrating with no code tools like Zapier or Make. In this case, you only need to provide a reference to the template and you don't need to provide the JSON script in the request.
Movie templates are not a choice for the following use cases:
- When the movie structure changes for each render. For example, when you don't know in advance the number of scenes or the number of elements in each scene.
How to create a movie template?
You can create a movie templates in two ways:
- Using the Visual Editor.
- Programmatically using the API.
Creating movie templates with the Editor
Creating a movie template using the Visual Editor is the simplest way. Follow these steps:
- Go to the Movie templates screen in JSON2Video dashboard.
- Click on the Add new template button. A new blank template called "New template" will be created.
- Click on the "New template" to open the visual editor
You can rename the template from the top bar of the editor.
You can duplicate the template by clicking on the Save template as... option in the menu.