Skip to main content

Template

Generate video, audio or design file using a templated file.

Request

POSThttps://api.fliki.ai/v1/generate/template

Headers

{
"Content-type": "application/json",
"Authorization": "Bearer API_KEY"
}
KeyValueDescription
Content-Typeapplication/jsonSpecifies that the request body format is JSON, allowing the server to parse the data correctly.
AuthorizationBearer YOUR_API_KEYGenerate your API Key in the account/api. section and replace YOUR_API_KEY with your actual key.

Body

{
"fileId": String,
"webhook": String,
"scenes": [
{
"key": String,
"layers": [
{
"key": String,
"text": String
},
...
]
},
...
]
}
KeyTypeDescription
fileIdstringThe fileId is a unique identifier for the template you created earlier. You can retrieve it from the Templating popup when you first set it as a template.
webhookstringThe webhook is a public URL from your server that Fliki will call after your content has been generated. It should be a POST method endpoint to receive responses.
scenesarrayArray of scene objects, each representing a scene in the template.
→ keystringUnique key identifier for the scene.
→ layersarrayArray of layer objects representing the elements within a scene.
→ → keystringUnique key identifier for each layer within a scene.
→ → textstringText content for the corresponding layer.

Response

{
"fileId": String
}
KeyTypeDescription
fileIdstringUnique identifier of the file created

Example

cURL Request
curl  
-H "Authorization: Bearer <API KEY>"
-H "Content-Type: application/json"
-d '{"fileId": "...", "name": "...", "webhook": "https://...", "scenes": [...]}'
-X POST https://api.fliki.ai/v1/generate/template