# Presets and workflows (/presets-and-workflows)



A preset turns one file into one short video. A workflow template chains several steps into a whole ad.

## Presets [#presets]

Pick a template and add one file. The preset writes the prompt, the scene and the motion, so there is no prompt to write.

| Preset                                | What you get                                                     | You bring                            | Length                   | Sound    | Takes per run |
| ------------------------------------- | ---------------------------------------------------------------- | ------------------------------------ | ------------------------ | -------- | ------------- |
| Show Your App (`preset_show_your_app`) | Your app screenshot on a real person's phone, animated. Vertical | A template, one app screenshot       | Always 5 s               | None     | 1 to 4        |
| Fashion Try On (`preset_fashion_tryon`) | Your clothes on a template model, animated. Vertical             | A template, one photo of the clothes | 5 or 10 s (5 by default) | Optional | 1 to 4        |

Each take comes back as its own video, grouped with the others: [Variants](/how-it-works#variants).

Preset ids: `preset_show_your_app` (Show Your App), `preset_fashion_tryon` (Fashion Try On). A preset is a capability with no `prompt` field. MCP: `list_presets` for the templates (pass `capability_id` for one preset's full list), then `estimate_generation` and `submit_generation` like any capability.

### Run a preset [#run-a-preset]

1. **List the templates** ([which tool or route](/how-it-works#same-job-every-surface)) and keep the `template_id` (`captpl_`) the person picks. Read it fresh each time.
2. **Upload the file** and keep its `ast_` id: [Bring your own files](/how-it-works#bring-your-own-files).
3. **Estimate, then submit** with `config.template_id` and the file in `reference_images`: [Price first](/how-it-works#price-first).

```json title="Estimate body: Fashion Try On, 10 seconds"
{
  "capability_id": "preset_fashion_tryon",
  "config": {
    "template_id": "captpl_0193c8f0a1b24e7f9d3c5a6b7e8f00b2",
    "reference_images": [
      {
        "assetId": "ast_0193c8f0a1b24e7f9d3c5a6b7e8f0012",
        "alias": "image1",
        "role": "reference"
      }
    ],
    "duration": 10,
    "generate_audio": false
  }
}
```

* Fashion Try On (`preset_fashion_tryon`) takes `duration` (5 or 10) and an optional `generate_audio`.
* Show Your App (`preset_show_your_app`) takes the same body without those two fields.

Preset fields and refusals: [Capabilities API](/api/capabilities#presets).

## Workflow templates [#workflow-templates]

A workflow template is a ready-made chain of steps: writers, images, video and captions. One call runs them all. Your plan decides which templates you can run.

| Template                                                                | What you get                                          | You bring                                                       |
| ----------------------------------------------------------------------- | ----------------------------------------------------- | --------------------------------------------------------------- |
| Creator to camera (`ugc_face_cam`)                         | An invented creator talks to camera about your brand  | Brand text, a voice                                             |
| Product photo to spoken ad (`product_ugc_video`)           | A creator holds your product and says your line       | Brand text, product photo                                       |
| Two directions, both shot (`product_video_brandkit`)       | Two ad concepts, each a vertical clip                 | Direction text, product photo                                   |
| Make a finished ad move (`static_ad_to_video`)             | Your ad animated in and out, as two clips             | One finished ad image                                           |
| Four hooks, four creatives (`ad_hook_set`)                 | Four statics, each with its own opening line          | Brief, packshot, an ad whose look you like                      |
| Rebuild an ad around your product (`competitor_ad_remake`) | Two static remakes of a working ad, with your product | The ad to clone, product photo, direction text                  |
| Six angles from one photo (`multi_angle_reshoot`)          | Six new camera angles                                 | One photo of your model                                         |
| One creative, every placement (`ad_format_resizer`)        | Your ad rebuilt for 1:1, 4:3, 9:16 and 21:9           | Your ad                                                         |
| Reframe for feed and story (`multi_format_resizer`)        | Your creative laid out in four shapes                 | Your creative                                                   |
| Your app screen, in the world (`app_ui_mockups`)           | Someone holding a phone with your screen on it        | Scene text, app screen                                          |
| App review from a creator (`app_ugc_video`)                | An invented creator talks about your app              | Brief, app screenshot, a voice                                  |
| Two stills, one camera move (`frame_to_frame_clip`)        | One clip from the first frame to the last             | Start frame, end frame, camera move text                        |
| Your product on the street (`fooh_ad`)                     | Billboard, metro and bus shots, then filmed           | Brand text, product photo                                       |
| Your product as a character (`animated_style_ad`)          | A talking 3D cartoon ad, stitched and captioned       | Brief, product photo, two style images                          |
| Results across thirty days (`timeline_benefit_ads`)        | Four vertical statics, day 1 to day 30                | Brief, packshot, brand board                                    |
| Four takes, one long ad (`long_form_ugc_ad`)               | One creator, four shots, cut into one ad              | Creator look, brief, product photo, a line and a voice per shot |

* **The text boxes hold example copy** about an invented product. Replace it with your brand facts, written out: the AI Writer (`script_llm`) steps cannot open a link.
* **A talking actor step takes its face from an earlier step** and runs [the two steps](/how-it-works#the-two-step-flow) itself. Set only its voice (a `voc_` id) and leave the actor empty, or the face is replaced.
* **Pick a matching voice.** Creator to camera (`ugc_face_cam`) needs a voice on its video step. Pick one that fits the `Creator:` line in its brand text.

Template keys: `ugc_face_cam` (Creator to camera), `product_ugc_video` (Product photo to spoken ad), `product_video_brandkit` (Two directions, both shot), `static_ad_to_video` (Make a finished ad move), `ad_hook_set` (Four hooks, four creatives), `competitor_ad_remake` (Rebuild an ad around your product), `multi_angle_reshoot` (Six angles from one photo), `ad_format_resizer` (One creative, every placement), `multi_format_resizer` (Reframe for feed and story), `app_ui_mockups` (Your app screen, in the world), `app_ugc_video` (App review from a creator), `frame_to_frame_clip` (Two stills, one camera move), `fooh_ad` (Your product on the street), `animated_style_ad` (Your product as a character), `timeline_benefit_ads` (Results across thirty days), `long_form_ugc_ad` (Four takes, one long ad).

`list_templates` returns the templates this plan can run, with the node ids and fields you may set. Names can change: match on `template_key`. For `ugc_face_cam`, the voice is node `f_video`, field `voice`, and the brand text is node `f_brand`, field `text`. On a talking actor step, send field `voice` only, never `actor`.

### Templates that need files [#templates-that-need-files]

Only Creator to camera (`ugc_face_cam`) runs from words alone. A run cannot carry files, so for any other template, add them in the app first:

1. Open the template in the app and drop the files into its upload cards.
2. Click **Open in Agent** in the workflow's top bar, then **Copy prompt**. The prompt carries the saved workflow's id.
3. Paste it to your agent. It runs that saved workflow, files included.

The first time an agent runs a template, it makes a copy in your workspace named `<template name> (agent)`. Later runs reuse that copy, so files you add to it stay.

The copied prompt carries a `workflow_id`: call `run_workflow` with it, not with `template_key`. The "(agent)" copy is made on the first run by `template_key`.

## Run a workflow [#run-a-workflow]

List the templates, start a run, then read the run until it ends.

**MCP**

```text title="Tool calls"
1. list_templates     no arguments
2. run_workflow       the arguments below
3. get_workflow_run   workflow_run_id, again until still_running is false
```

```json title="run_workflow arguments"
{
  "template_key": "ugc_face_cam",
  "max_credits": 1500,
  "inputs": [
    {
      "node": "f_brand",
      "field": "text",
      "value": "Brand: Northpeak trail socks. ... Creator: a man in his thirties."
    },
    {
      "node": "f_video",
      "field": "voice",
      "value": "voc_0193c8f0a1b24e7f9d3c5a6b7e8f0099"
    }
  ]
}
```

```json title="get_workflow_run arguments"
{
  "workflow_run_id": "wfr_..."
}
```

Send `template_key` or `workflow_id`, never both.

**CLI**

```bash title="Terminal"
riffads workflows templates

riffads workflows invoke --template ugc_face_cam -m 1500 \
  -i f_brand.text='Brand: Northpeak trail socks. ... Creator: a man in his thirties.' \
  -i f_video.voice=voc_0193c8f0a1b24e7f9d3c5a6b7e8f0099 \
  --wait

riffads workflows run wfr_... --wait
```

A saved workflow: `riffads workflows invoke <workflow-id> -m 1500`.

**REST**

```bash title="Terminal"
curl -s https://app.riffads.com/api/v1/workflows/templates \
  -H "Authorization: Bearer $RIFFADS_API_KEY"

curl -s -X POST https://app.riffads.com/api/v1/workflows/templates/ugc_face_cam/invoke \
  -H "Authorization: Bearer $RIFFADS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "max_credits": 1500,
    "inputs": [
      {
        "node": "f_brand",
        "field": "text",
        "value": "Brand: Northpeak trail socks. ... Creator: a man in his thirties."
      },
      {
        "node": "f_video",
        "field": "voice",
        "value": "voc_0193c8f0a1b24e7f9d3c5a6b7e8f0099"
      }
    ]
  }'

curl -s https://app.riffads.com/api/v1/workflow-runs/wfr_... \
  -H "Authorization: Bearer $RIFFADS_API_KEY"
```

A saved workflow: `POST /workflows/{id}/invoke`, same body. The key needs the **Workflows** scope.

The start answers with a `workflow_run_id` (`wfr_`), not a finished ad. Names can change, so match templates on `template_key`.

### Rules for every run [#rules-for-every-run]

* **`max_credits` covers every step**, not one. There is no estimate for a whole run.
* **Too low** and the whole run is refused with `max_credits_exceeded`. `limit.required_credits` says what it needs, and nothing is charged.
* **Workspace limits apply:** the per-generation limit to each step, the daily budgets to the whole run. See [Spend limits](/how-it-works#spend-limits).
* **One run per workflow at a time.** A second start gets `submission_in_flight` (409).
* **Inputs set text, settings, actors and voices** for this run only, never files or the number of takes. One bad input refuses the whole run.
* **Read the run about every 30 seconds** until `still_running` is `false`. Files are in `nodes[].generations[].outputs[]`: [Download links](/how-it-works#download-links).
* **Agents cannot build, edit, stop or retry a workflow**: do that in the app. On `partial` or `failed`, read each step's error, fix the input and start a new run.

Every field, status and error: [Workflows API](/api/workflows).
