# Templates: fields, styles, style films

> Field schema, limits, styles, example and style film templates.

Source: https://flow-marketing.org/en/help/api-templates · Question: Which templates exist and which fields do they need?

Every video is built from a template. The template fixes scenes, layout and timing; you only supply the fields. The field schema is machine-readable (JSON Schema 2020-12), with word limits and a complete example.

There are two kinds: Turbo templates (kind video), whose length follows from the fields, and style film templates (kind stylefilm) with a fixed length. Some style film templates are still in beta.

## All templates: GET /templates {#liste}

Returns a list (`object: "list"`, `data`, `has_more`, `next_cursor`) with all Turbo and style film templates. The list is small and comes in one go, without pages. Scope: `templates:read`.

With `Accept-Language: de`, `name`, `description`, `tags` and field descriptions are German, otherwise English.

**curl**

```bash
curl https://flow-marketing.org/api/turbo/v1/templates \
  -H "Authorization: Bearer $FLOW_API_KEY" \
  -H "Accept-Language: de"
```

**JavaScript**

```js
const res = await fetch('https://flow-marketing.org/api/turbo/v1/templates', {
  headers: { Authorization: 'Bearer ' + process.env.FLOW_API_KEY, 'Accept-Language': 'de' },
})
const { data } = await res.json()
for (const t of data) console.log(t.id, t.kind, t.name)
```

**Python**

```python
import os, requests

BASE = "https://flow-marketing.org/api/turbo/v1"
H = {"Authorization": "Bearer " + os.environ["FLOW_API_KEY"], "Accept-Language": "de"}

r = requests.get(BASE + "/templates", headers=H, timeout=30)
r.raise_for_status()
for t in r.json()["data"]:
    print(t["id"], t["kind"], t["name"])
```

## One template: GET /templates/{id} {#eine-vorlage}

Returns the same shape as a list entry. Unknown id: 404 `not_found`.

**curl**

```bash
curl https://flow-marketing.org/api/turbo/v1/templates/produkt-launch \
  -H "Authorization: Bearer $FLOW_API_KEY" \
  -H "Accept-Language: de"
```

**JavaScript**

```js
const res = await fetch('https://flow-marketing.org/api/turbo/v1/templates/produkt-launch', {
  headers: { Authorization: 'Bearer ' + process.env.FLOW_API_KEY, 'Accept-Language': 'de' },
})
const t = await res.json()
console.log(t.fields_schema.required, t.example)
```

**Python**

```python
import os, requests

r = requests.get(
    "https://flow-marketing.org/api/turbo/v1/templates/produkt-launch",
    headers={"Authorization": "Bearer " + os.environ["FLOW_API_KEY"], "Accept-Language": "de"},
    timeout=30,
)
t = r.json()
print(t["fields_schema"]["required"], t["example"])
```

**Response 200 (shortened)**

```json
{
  "id": "produkt-launch",
  "object": "template",
  "kind": "video",
  "version": "1.0.0",
  "name": "Produkt-Neuheit",
  "description": "Neues Produkt oder neue Funktion in 20–30 Sekunden",
  "tags": ["Launch, neue Funktion"],
  "default_style": "s08",
  "styles": ["s08", "s01", "s13"],
  "formats": ["16x9", "9x16", "1x1"],
  "scenes": [
    { "key": "hook", "block": "TitleCard", "optional": false },
    { "key": "problem", "block": "Aussage", "optional": false },
    { "key": "loesung", "block": "UiFenster", "optional": false },
    { "key": "vorteile", "block": "Liste", "optional": false },
    { "key": "ende", "block": "Ende", "optional": false }
  ],
  "fields_schema": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "required": ["produkt", "hook", "problem", "loesung", "vorteile", "cta"],
    "properties": {
      "hook": { "type": "string", "maxLength": 300, "x-max-words": 7, "description": "...", "examples": ["Schichtplan per Zuruf?"] },
      "vorteile": {
        "type": "array", "minItems": 2, "maxItems": 4,
        "items": { "type": "string", "maxLength": 300, "x-max-words": 6 },
        "description": "...", "examples": [["Tauschen per Klick", "Urlaub sofort sichtbar", "Läuft auf jedem Handy"]]
      }
    }
  },
  "example": {
    "produkt": "Musterwerk Plan",
    "hook": "Schichtplan per Zuruf?",
    "problem": "Jede Woche Zettel, Anrufe und Lücken im Plan.",
    "loesung": "Der Plan, der sich selbst füllt",
    "vorteile": ["Tauschen per Klick", "Urlaub sofort sichtbar", "Läuft auf jedem Handy"],
    "cta": "Jetzt kostenlos testen"
  },
  "max_duration_s": 180,
  "scope": "public"
}
```

## Fields of a Turbo template {#turbo-felder}

| Field | Meaning |
| --- | --- |
| `id` | identifier, for example `produkt-launch` – goes into `template` of `POST /videos` |
| `kind` | `video` (Turbo template) |
| `version` | template version; a video keeps the version it was created with (`template_version`) |
| `name`, `description`, `tags` | name, one sentence, occasion |
| `default_style`, `styles` | default style and allowed styles (`s08`, `s13`, `s01`) |
| `formats` | `16x9`, `9x16`, `1x1` |
| `scenes` | scene order: `key`, `block` (building block), `optional` (scene appears only with certain fields) |
| `fields_schema` | JSON Schema 2020-12 of `fields`: type, required fields (`required`), `maxLength`, `x-max-words`, `x-max-lines`, `minItems`/`maxItems`, example per field (`examples`) |
| `example` | a complete, valid `fields` object |
| `max_duration_s` | maximum video length: 180 seconds |
| `scope` | `public` |

## The Turbo templates {#turbo-vorlagen}

All eight allow the styles `s08`, `s13` and `s01`. Field names are German (for example `produkt`, `hook`, `vorteile`, `cta`) – `fields_schema` is always authoritative.

The template `dokument-film` is not in the list. Only `POST /videos/from-document` fills it.

| ID | Name | Default style |
| --- | --- | --- |
| `produkt-launch` | Product launch | `s08` |
| `release-notes` | Release video | `s13` |
| `zahlen-update` | Numbers & results | `s01` |
| `stellenanzeige` | We’re hiring | `s01` |
| `event-einladung` | Invitation | `s08` |
| `kunden-zitat` | Customer voice | `s01` |
| `erklaer-schritte` | How it works | `s08` |
| `angebot-aktion` | Offer | `s01` |

## Field schema and limits {#feld-schema}

Validate `fields` against `fields_schema` with any JSON Schema library before sending. The server additionally enforces the word limits (`x-max-words`) – they keep the reading time in the video right.

Invalid fields return 422 `validation_failed`. `errors[]` names each spot as a JSON pointer (for example `/fields/vorteile/2`) with one of these codes:

| Code | Meaning |
| --- | --- |
| `required` | required field missing |
| `too_long` | too many words or characters |
| `too_many` | too many items in a list |
| `too_short` | too few items in a list |
| `wrong_type` | wrong type |
| `unknown_field` | this template has no such field |
| `invalid_url` | not a valid address |
| `not_allowed` | a template rule is broken |
| `consent_required` | approval is missing (customer voice) |

**Response 422**

```json
{
  "type": "https://flow-marketing.org/entwickler/doku/fehler#validation_failed",
  "title": "The fields are invalid.",
  "status": 422,
  "code": "validation_failed",
  "detail": "1 field(s) invalid. Fix them and send the request again – nothing was created or charged.",
  "request_id": "req_2Lm4Nq6Rs8Tu0Vw2",
  "doc_url": "https://flow-marketing.org/entwickler/doku/fehler#validation_failed",
  "errors": [
    { "path": "/fields/hook", "code": "too_long", "message": "..." }
  ]
}
```

## Special rules {#regeln}

- `kunden-zitat`: `freigabe` must be `true` – customer quotes only with written approval.
- `angebot-aktion`: a price needs a net note in `preis_einheit` (“net”, “excl.”, “netto”, “zzgl.”).
- Numbers only with a source: in `release-notes`, `kennzahl` appears only when `quelle_url` is set.
- The first sentence is always the hook. The end always shows brand, call to action (`cta`) and web address.

## Styles {#stile}

Three styles: `s08`, `s13` and `s01`. Pick one with `style` in `POST /videos`; without it, `default_style` applies. The preview (`preview_url`) shows what a style looks like – it is free.

## Style film templates (kind stylefilm) {#stilfilm}

Style film templates are real Motion ToGo style films with a fixed length. You swap texts, colours, logo or image; the timing stays. The id has the form `sf-` plus a number, for example `sf-07`.

`status` is `ready` once a template has at least 50 test films with at least 90 % green and its own sound, otherwise `beta`. Beta templates are still listed and bookable. Style film templates only appear while their renderer is connected.

| Field | Meaning |
| --- | --- |
| `kind` | `stylefilm` |
| `status` | `beta` or `ready` |
| `duration_s` | fixed length in seconds – billed per started second of this length |
| `formats` | formats of this template (subset of `16x9`, `9x16`, `1x1`) |
| `light` | `light` or `dark` |
| `voice` | `true` if the film has a voice-over |
| `use_case` | one sentence on when the style fits (for planners and AI apps) |
| `fields_schema` | fields with a dot in the name (for example `marke.name_fett`): text with `minLength`/`maxLength`, colour as `#RRGGBB`, choice as `enum`, logo or image as upload id `upl_…` or `null` |
| `example` | the template’s default values |

**Entry sf-07 (shortened)**

```json
{
  "id": "sf-07",
  "object": "template",
  "kind": "stylefilm",
  "status": "beta",
  "version": "1.0.0",
  "name": "...",
  "description": "...",
  "use_case": "...",
  "tags": [],
  "default_style": "stil-07",
  "styles": ["stil-07"],
  "formats": ["16x9", "9x16", "1x1"],
  "light": "light",
  "voice": false,
  "duration_s": 22.8,
  "fields_schema": {
    "type": "object",
    "additionalProperties": false,
    "required": ["marke.name_fett", "marke.adresse"],
    "properties": {
      "marke.name_fett": { "title": "...", "description": "...", "type": "string", "minLength": 1, "maxLength": 16, "default": "Motion" },
      "marke.adresse": { "title": "...", "description": "...", "type": "string", "minLength": 4, "maxLength": 30, "default": "motiontogo.de" },
      "marke.logo": { "title": "...", "description": "...", "type": ["string", "null"], "default": null, "pattern": "^upl_[0-9A-Za-z]{20}$" }
    }
  },
  "example": { "marke.name_fett": "Motion", "marke.adresse": "motiontogo.de", "marke.logo": null },
  "max_duration_s": 22.8,
  "scope": "public"
}
```

## A video from a style film template {#stilfilm-anlegen}

Like any template: `POST /videos` with `template: "sf-07"` and `fields`. Only `template`, `fields`, `formats`, `language`, `metadata`, `render` and `max_price_cents` are allowed. `brief` does not work here; fields the template does not know return 422.

Logo and image fields take the id of a finished upload (`POST /uploads` with `kind: "logo"` or `"image"`, then `/complete`). `null` means: the template default.

Ask for the price with `POST /estimates` and `{"template": "sf-07"}`. Changing with `PATCH` does not work for style films yet (409 `not_editable`) – create a new video instead. If the style film renderer is unreachable, the render start ends with 503 `stylefilm_render_unavailable`, and nothing is charged.

**curl**

```bash
curl -X POST https://flow-marketing.org/api/turbo/v1/videos \
  -H "Authorization: Bearer $FLOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "template": "sf-07",
    "formats": ["9x16"],
    "fields": {
      "marke.name_fett": "Muster",
      "marke.name_normal": "werk",
      "marke.adresse": "musterwerk.de"
    }
  }'
```

**JavaScript**

```js
import { randomUUID } from 'node:crypto'

const res = await fetch('https://flow-marketing.org/api/turbo/v1/videos', {
  method: 'POST',
  headers: {
    Authorization: 'Bearer ' + process.env.FLOW_API_KEY,
    'Content-Type': 'application/json',
    'Idempotency-Key': randomUUID(),
  },
  body: JSON.stringify({
    template: 'sf-07',
    formats: ['9x16'],
    fields: { 'marke.name_fett': 'Muster', 'marke.name_normal': 'werk', 'marke.adresse': 'musterwerk.de' },
  }),
})
const video = await res.json()
console.log(res.status, video.id, video.duration_s)
```

**Python**

```python
import os, uuid, requests

r = requests.post(
    "https://flow-marketing.org/api/turbo/v1/videos",
    headers={"Authorization": "Bearer " + os.environ["FLOW_API_KEY"], "Idempotency-Key": str(uuid.uuid4())},
    json={
        "template": "sf-07",
        "formats": ["9x16"],
        "fields": {"marke.name_fett": "Muster", "marke.name_normal": "werk", "marke.adresse": "musterwerk.de"},
    },
    timeout=60,
)
video = r.json()
print(r.status_code, video["id"], video["duration_s"])
```

## Voice-over in Turbo templates {#film-stimmen}

Turbo templates speak with one of five video voices: `klar-w` (default), `klar-m`, `locker-m`, `ruhig-m` and `erzaehlend-w`. `"voice": null` means no voice-over, only music, sound and on-screen text. `GET /voices` returns the list too.

## See also

- [Videos](https://flow-marketing.org/en/help/api-videos)
- [Uploads and documents](https://flow-marketing.org/en/help/api-uploads-and-documents)
- [Browse all templates](https://flow-marketing.org/en/templates)
