Colossyan API
  • Welcome
  • Getting Started
    • Quickstart
    • Extracting request bodies from the web-editor
  • Basics
    • Authentication
    • Endpoints
    • Video Generation
      • Generating using a template
      • Generating a video manually
      • Receiving a generated video
    • Using template variables
      • Script template variables
      • Text template variables
    • Generated videos
      • Retrieve a video
      • Delete a video
    • Video generation job
      • Retrieve video generation job
      • Delete video generation job
    • Assets
      • Actors
      • Voices
  • Advanced
    • Advanced use-cases
    • Timing
  • Experimental
    • Knowledge to draft
Powered by GitBook
On this page
  • Providing values for the variables
  • Generating a video

Was this helpful?

Export as PDF
  1. Basics
  2. Using template variables

Script template variables

PreviousUsing template variablesNextText template variables

Last updated 1 month ago

Was this helpful?

You can create dynamic template variables in the script on any scene, by simply typing a variable name between curly braces at any point of the script.

For example in the following script...

,,,

Dear {name}, I have seen that you haven't logged into your account for the past two months. Should we catch up quickly? Since then we released several cool stuff, such as {cool_stuff_1} and {cool_stuff_2}. Let me know if you have a free slot on your calendar next week!

,,,

...you have created three dynamic variables:

  1. name

  2. cool_stuff_1

  3. cool_stuff_2

Providing values for the variables

You can replace these template variables with their values, by sending their values in the request body when generating a video. The API will replace the placeholders in the script with the corresponding values you provide.

For example:

{
    "dynamicVariables": {
        "name": "John",
        "cool_stuff_1": "AI-powered task automation",
        "cool_stuff_1": "Slack & Google Calendar integration",
    },
    // other request parameters...
}

Generating a video

On how to generate a video you can find more information here: Video Generation