> ## Documentation Index
> Fetch the complete documentation index at: https://docs.n8negri.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Templates

> Layered creatives with dynamic placeholders

A **template** is a Konva-based scene graph: a stack of layers (text, image, shape) on a fixed canvas. Layers marked as *dynamic* become placeholders that you fill at render time via `modifications`.

## Anatomy

| Field             | Description                                    |
| ----------------- | ---------------------------------------------- |
| `id`              | Stable identifier (`tpl_<uuid>`)               |
| `name`            | Human-readable name                            |
| `width`, `height` | Canvas dimensions in pixels                    |
| `current_version` | Latest published version number                |
| `is_published`    | Whether the template can be used by renders    |
| `layers`          | Ordered list of layers (z-index = array order) |

## Layer types

* **Text** — string content, font, weight, color, alignment, fit-to-box
* **Image** — bitmap layer with crop, fit, and tint
* **Shape** — rectangle, ellipse, line with stroke and fill

## Dynamic layers

Mark any layer as dynamic to expose it as a `modifications` target. Reference by `name`:

```json theme={null}
{
  "modifications": [
    { "name": "headline", "text": "Black Friday — 50% off" },
    { "name": "product", "image_url": "https://cdn.example.com/sneaker.png" }
  ]
}
```

## Versioning

Every publish creates a new immutable version. Renders pin to `current_version` at request time, so old renders remain reproducible.

See the [API reference for templates](/api-reference/openapi#tag/templates).
