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

# AI Parse Transform

> Convert natural language transform descriptions into structured pipeline transform nodes using LLM-powered parsing.

## POST /api/v1/ai/parse-transform

Parses a natural language description of a data transformation into a structured pipeline transform definition. Automatically loads the tenant's data schema fields for context.

### Request Body

| Field             | Type      | Required | Description                                                                                   |
| ----------------- | --------- | -------- | --------------------------------------------------------------------------------------------- |
| `description`     | string    | Yes      | Natural language description of the transform (e.g., "hash the email column for PII masking") |
| `availableFields` | string\[] | No       | List of available field names. If omitted, fields are loaded from the tenant's data schemas.  |

### Example

```bash theme={null}
curl -X POST https://playground.kaireonai.com/api/v1/ai/parse-transform \
  -H "Content-Type: application/json" \
  -H "X-Tenant-Id: my-tenant" \
  -d '{
    "description": "Rename first_name to firstName and last_name to lastName, then mask the SSN column"
  }'
```

### Response

Returns one or more transform node definitions ready to be added to a pipeline.

```json theme={null}
{
  "transforms": [
    {
      "type": "rename_field",
      "config": {
        "mappings": [
          { "from": "first_name", "to": "firstName" },
          { "from": "last_name", "to": "lastName" }
        ]
      }
    },
    {
      "type": "mask_pii",
      "config": {
        "field": "ssn",
        "strategy": "hash"
      }
    }
  ]
}
```

### Roles

admin, editor

See also: [AI](/api-reference/ai) | [Pipelines](/api-reference/pipelines)
