Describe the transform in plain language; OpexFlow writes it. The generator talks to any
OpenAI-compatible `/chat/completions` endpoint, is steered to emit **DSL first** (falling
back to JS when the rule isn't expressible), and **server-validates** the output before
returning it.

```yaml
ai:
  enabled: true
  base_url: "https://api.openai.com/v1"   # any OpenAI-compatible base
  model: "gpt-4o-mini"
  api_key: "${OPEX_AI_API_KEY}"
  max_tokens: 1200
```

In the UI's **AI** tab you sketch the input shape, the rule, and the desired output (e.g.
_"emit only when temp exceeds 80 or vibration crosses 5.0"_) and hit Generate. The model
maps your fields onto `metadata.*` and returns a runnable program you paste into the
editor and save. Endpoint: `POST /api/transform/generate`.

> **Info**
>
> Looking for the full field-mapping reference? See [Transform DSL](/docs/transform-dsl)
> for paths and operators, and [JavaScript transforms](/docs/javascript-transforms) for the
> sandbox contract.