Generate AI Column
Create AI Generated Column
1️⃣ Overview
Purpose:
Creates a new column in a specified workspace table. The column can optionally be AI-generated using a configured language model.
When aiSettings.enabled = true, the column becomes a computed AI column that auto-generates values based on a prompt and row data.
2️⃣ Endpoint
POST /noCo/api/v2/workspaces/{workspaceId}/tables/{workbookId}/column
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| workspaceId | UUID | ✅ Yes | ID of the workspace |
| tableId | UUID | ✅ Yes | ID of the target table |
3️⃣ Authentication
Requires Bearer Token (JWT).
Authorization: Bearer <access_token>
Required Permissions
User must have:
-
CREATE_DATASOURCEor equivalent column creation permission -
Table edit access
4️⃣ Request Headers
| Header | Value |
|---|---|
| Content-Type | application/json |
| Authorization | Bearer token |
5️⃣ Request Body Schema
{ "name": "string", "uiDataType": "SINGLE_LINE_TEXT | NUMBER | ...", "description": "string", "required": false, "uiMetadata": { "title": "string" }, "settings": { "aiSettings": { "enabled": true, "prompt": "string", "model": "string", "webAccess": false } }}
6️⃣ Field Descriptions
Core Column Fields
| Field | Type | Required | Description |
|---|---|---|---|
| name | string | ✅ | Internal column name |
| uiDataType | enum | ✅ | Data type of the column |
| description | string | ❌ | Column description |
| required | boolean | ❌ | Whether the column is mandatory |
| uiMetadata.title | string | ❌ | Display name in UI |
🤖 AI Settings (Optional)
| Field | Type | Required | Description |
|---|---|---|---|
| enabled | boolean | ✅ (if aiSettings present) | Enables AI computation |
| prompt | string | ✅ | Prompt used to generate values |
| model | string | ✅ | LLM model to use |
| webAccess | boolean | ❌ | Allows external web search (if supported) |
7️⃣ Behavior
If aiSettings.enabled = false
- Column behaves as a standard manual input column.
If aiSettings.enabled = true
-
Column becomes computed.
-
Value is generated automatically using:
-
Row context
-
Prompt
-
Selected model
-
-
Users may not manually edit values (depending on system rules).
-
Generation may trigger:
-
On row creation
-
On row update
-
On manual regeneration
-
8️⃣ Example – Create AI Column
curl -X POST \https://be.datagol.ai/noCo/api/v2/workspaces/{workspaceId}/tables/{tableId}/column \-H "Authorization: Bearer <token>" \-H "Content-Type: application/json" \-d '{ "name": "col", "uiDataType": "SINGLE_LINE_TEXT", "required": false, "settings": { "aiSettings": { "enabled": true, "prompt": "Extract first name from full name", "model": "gpt-4o-mini", "webAccess": false } }}'
9️⃣ Example Use Case
If table has:
| full_name |
|---|
| John Smith |
| Alice Brown |
AI column prompt:
Extract first name from full name
Generated column:
| full_name | first_name |
|---|---|
| John Smith | John |
| Alice Brown | Alice |
🔟 Response (Example)
{ "id": "column-uuid", "name": "col", "uiDataType": "SINGLE_LINE_TEXT", "aiEnabled": true, "createdAt": "timestamp"}
Authorizations
This API uses OAuth 2.0 with the authorization code grant flow.
Response
Generate AI Column