> For the complete documentation index, see [llms.txt](https://docs.colossyan.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.colossyan.com/advanced/using-template-variables/script-template-variables.md).

# Script template variables

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.&#x20;

<figure><img src="/files/gfbRRJKP8PusvT97W6k1" alt=""><figcaption></figcaption></figure>

**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 <a href="#polling" id="polling"></a>

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:

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

### Generating a video <a href="#polling" id="polling"></a>

On how to generate a video you can find more information here: [Video Generation](/video-generation/video-generation.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.colossyan.com/advanced/using-template-variables/script-template-variables.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
