Skip to main content

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

FieldTypeRequiredDescription
descriptionstringYesNatural language description of the transform (e.g., “hash the email column for PII masking”)
availableFieldsstring[]NoList of available field names. If omitted, fields are loaded from the tenant’s data schemas.

Example

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.
{
  "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 | Pipelines