Choose a creative template
Creative Templates decide the structure and visual design of your videos. Creative Templates are Amplify-compatible After Effects projects uploaded to the platform which can be used for dynamic video creation.
Please consult our account management team on details regarding production and onboarding of Amplify-compatible Creative Templates. This document focuses on obtaining the ID for a ready-to-use Creative Template.
Template, TemplateStyle, TemplateStyleVersion
In Amplify API, there are three resources that comprise a template.
- Template: A group of
TemplateStylethat share similar visual design and structure. - TemplateStyle: Unique unit of Creative Template. One
Templatecan include manyTemplateStyles with various display ratios (i.e. 4:5, 1:1, 9:16, etc) and various lengths (i.e. 15s, 30sec, etc). - TemplateStyleVersion: Individual version of
TemplateStylethat may be served in different languages.
info
To learn more about terminology and Amplify API's resource model, refer to Terminology.
Get TemplateStyleVersion ID from Template ID
Our account management team will provide you with a Template ID for a custom-made hero creative. You can then use this Template ID to get the Template Style Version ID by calling the GET /v2/templates/:template_id/styles API endpoint. and referring to version_ids key.
version_ids is comprised in key-value structure, and key and value represent language and TemplateStyleVersion ID of the said language, respectively.
- cURL
- Node.js
- Elixir
curl 'https://backend.amplify.shuttlerock.com/v2/templates/TEMPLATE_ID/styles',
-H 'Content-Type: application/json'
-H 'Authorization: Bearer SERVER_ACCESS_TOKEN'
{
"styles": [
{
"id": "bEe1C8", // TemplateStyle ID
"name": {
"en": "Stories Poll"
},
"version_ids": {
"en": "6bzvun" // TemplateStyleVersion ID
},
...
},
...
]
}
const fetch = require('node-fetch');
fetch(
'https://backend.amplify.shuttlerock.com/v2/templates/TEMPLATE_ID/styles',
{
method: 'GET',
headers: {
'Authorization': 'Bearer SERVER_ACCESS_TOKEN'
}
}
)
.then(res => res.json())
.then(({ styles }) => {
console.log(styles[0].id); // TemplateStyle ID
console.log(styles[0].version_ids.en); // TemplateStyleVersion ID
});
request = %HTTPoison.Request{
url: "https://backend.amplify.shuttlerock.com/v2/templates/TEMPLATE_ID/styles",
method: :get,
headers: [
{"Authorization", "Bearer SERVER_ACCESS_TOKEN"}
]
}
with {:ok, %{status_code: 200} = response} <- HTTPoison.request(request),
{:ok, decoded_json} <- Jason.decode(response.body) do
template_style = Enum.at(decoded_json["styles"], 0)
# TemplateStyle ID
IO.puts(template_style["id"])
# TemplateStyleVersion ID
IO.puts(template_style["version_ids"]["en"])
end
Choose video creation method
If you have the TemplateStyleVersion ID handy, then it's time to make a video! There are two methods to create a video.
With Amplify API, you can bypass the editor and create videos automatically by providing text and media assets directly to the API.
3-2. Create videos with Video Editor SDK
With Amplify Editor SDK, you can embed Amplify Editor to your web services, enabling your customers to enter text and media assets to create videos on their own.