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.
apiKeyAuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
workspaceId*stringapplication/json- body
databaseId*stringfield*stringinstruction*string1 <= length <= 4000onlyEmpty*booleanviewId?string|nullceilingMicrousd?number|nullSuccess
application/json- response
data*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}'{ "data": { "title": "string", "recordCount": 0, "unitCount": 0, "estimateMicrousd": 0, "ceilingMicrousd": 0, "model": "string" }}Undo what the assistant changed
Reverts the changes a selector names, newest first, by applying each one's inverse through the ordinary write it would take by hand, so permissions, validation and the workspace ledger apply as for any edit; the writes are the caller's and are tagged with the returned `revertId`. One conflict refuses the whole revert (`blocked`, nothing changes) unless `skipConflicts` is true, which leaves the conflicting changes as they are. Changes already reverted are left alone, so repeating a revert is a no-op that reports them as reverted. Reverting with the selector `{ revertId }` undoes that revert (redo). Send an `Idempotency-Key` header to make a retried request replay its first result. Requires a Clerk session for a workspace member with the `ai:write` permission, plus the permissions each underlying write needs.
Fill a field with AI in the background
Plans and starts a background job that writes one field over a database's records, as the caller, a batch of records per model call. The job runs on the workers and survives closed tabs; follow it through the job endpoints or the live job summary. Requires a Clerk session for a workspace member with the `ai:write` permission. Send an `Idempotency-Key` header to make retries safe; a replay within the window returns the original response.