Skip to content

Generate Formula With Ai

POST
/enrichment/ai-formula/generate

Write a formula from a plain-language description. CHARGES: one model call.

Refused with 402 before the model runs when the organisation has no credit. The fields the formula may use are read from your data, not from fields.

Authorizations

Parameters

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Turn a plain-language description into a formula. One model call.

object
fields

Hint only: fields are read from your data.

Array<string>
outputType

Hint for the output kind.

string
default: text <= 50 characters
prompt
required
string
>= 1 characters
sampleData
object
key
additional properties
any

Responses

200

Successful Response

object
data
required

One enrichment object, open-shaped.

Open on purpose: a workbench column set is defined by the CUSTOMER at runtime, and the enrichment result shapes grow with every provider added. Pinning them would drop whatever a provider returned that this contract had not caught up on, which on an enrichment surface is the data the customer paid for.

object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string