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

# Run Automation

> Start one or more runs for an automation template

## Endpoint

```bash theme={null}
POST https://api.ugc.inc/automations/run
```

## Request Body

<ParamField body="templateId" type="string" required>
  Template ID to execute.
</ParamField>

<ParamField body="variableInputs" type="Record<string, PortValue>">
  Optional runtime variable values keyed by input node ID.
</ParamField>

<ParamField body="saveAsPreview" type="boolean">
  Optional flag to save output as preview.
</ParamField>

<ParamField body="tag" type="string">
  Optional run tag.
</ParamField>

## Response

<ResponseField name="data" type="{ runIds: string[] }">
  Array of run IDs started by this call.
</ResponseField>

## TypeScript

```typescript theme={null}
const res = await client.automations.run({ templateId: 'tpl_123' });
```
