SnozeDevelopers
API referenceAi Jobs

Estimate filling a field with AI

Plans a background job that writes one field over a database's records (or those a view shows), without starting it: how many records and parts it covers, what it is expected to cost, and the spend ceiling it would stop at. With `onlyEmpty`, records that already have a value are left out. Requires a Clerk session for a workspace member with the `ai:write` permission who can read the database.

POST
/v1/workspaces/{workspaceId}/agent/jobs/fill/estimate

Authorization

apiKey
headerAuthorizationBearer <snoze_sk_…>

Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.

Path Parameters

workspaceId*string

Request Body

application/json
  1. body
databaseId*string
field*string
instruction*string
Length1 <= length <= 4000
onlyEmpty*boolean
viewId?string|null
ceilingMicrousd?number|null

Response Body

Success

application/json
  1. response
data*
Example Request
curl -X POST 'https://api.snoze.dev/v1/workspaces/string/agent/jobs/fill/estimate' \  -H 'Content-Type: application/json' \  -d '{  "databaseId": "string",  "field": "string",  "instruction": "string",  "onlyEmpty": true}'
Example Response
{  "data": {    "title": "string",    "recordCount": 0,    "unitCount": 0,    "estimateMicrousd": 0,    "ceilingMicrousd": 0,    "model": "string"  }}