---
title: "POST /api/database/fields/{field_id}/generate-ai-field-values/"
method: POST
path: "/api/database/fields/{field_id}/generate-ai-field-values/"
tags: ["Database table fields"]
---

# POST /api/database/fields/{field_id}/generate-ai-field-values/

`POST /api/database/fields/{field_id}/generate-ai-field-values/`

Endpoint that's used by the AI field to start an sync task that will update the cell value of the provided row IDs based on the dynamically constructed prompt configured in the field settings. 
This is a **premium** feature.

## Path parameters

- `field_id` integer, required

## Headers

- `ClientSessionId` string, uuid
- `ClientUndoRedoActionGroupId` string, uuid

## Request body

- GenerateAIFieldValueView
  - `row_ids` integer[], required — The ids of the rows that the values should be generated for.

## Response `202`

- GenerateAIValuesJobTypeResponse
  - `id` integer, required
  - `type` string, required — The type of the job.
  - `progress_percentage` integer, required — A percentage indicating how far along the job is. 100 means that it's finished.
  - `state` string, required — Indicates the state of the import job.
  - `human_readable_error` string — A human readable error message indicating what went wrong.
  - `created_on` string, date-time, required
  - `updated_on` string, date-time, required
  - `field_id` integer, required — The ID of the AI field to generate values for.
  - `row_ids` integer[] — The IDs of the rows to generate AI values for. If not provided, all rows in the view or table will be processed.
  - `view_id` integer — The ID of the view to generate AI values for. If not provided, the entire table will be processed.
  - `only_empty` boolean — Whether to only generate AI values for rows where the field is empty.
  - `is_auto_update` boolean, required — Indicates if the job has been created because values in a dependent field changed.

## Other responses

- `400`
- `404`

---

[API](https://skmtc.net/baserow/apis/baserow-api-spec.md) · [All operations](https://skmtc.net/baserow/apis/baserow-api-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/baserow/baserow-api-spec/versions/0c490e5b0c7f/schema)
