Create enrichment
create_enrichmentDefine a data enrichment task with a prompt, output columns, and budget, and create an empty dataset to fill with row-by-row results.
Instructions
create enrichment
Create an enrichment (no run, free) and the empty dataset it fills, bound to it and in the app at app_url. A recipe: prompt (the task), output columns (names, or { name, prompt, output_schema, tool } — tool: "<list_tools name>" pins a tool: one call per row, arguments chosen by the agent, result is the cell; help with output_schema / pinned_columns), optional input_columns, budget (credits per row, default 1.5 per output column; follows column adds / removes unless budget_locked), only_tools / additional_tools (list_tools). Prefer prompt alone: the output columns (one typed column per fact asked for), name, and input columns are written from it; the response shows them. Then add_dataset_rows to the dataset_id and enrich with it (preferred), or enrich with enrichment_id + input for a one-off. dataset_id alone answers a dataset's own enrichment as { id, name, app_url, dataset_id } (422 without output columns; add them with update_dataset).
Example — Save a recipe — three columns, one typed: { "name": "Company basics", "prompt": "Research each company from its name and website.", "input_columns": [ "Company", "Website" ], "output": [ "CEO", { "name": "Employee count", "prompt": "Current headcount as an integer", "output_schema": { "type": "integer", "minimum": 0 } }, { "name": "Summary", "prompt": "Two sentences on what the company sells and to whom" } ], "budget": 4 }
Example — The recipe written from the prompt — columns, name, and input columns: { "prompt": "Research each company from its name and website: the CEO, employee count, latest funding round date and amount, and whether it is hiring." }
Example — A dataset's own enrichment: { "dataset_id": "ds_018f6a70-1234-7abc-89ab-0123456789ab" }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Recipe: display name | |
| budget | No | Recipe: credits the row agent may spend per row. Default 1.5 per output column. | |
| output | No | Recipe: the columns to fill; a plain string is a name whose type is inferred. Omit it and the columns are written from the prompt, one per fact it asks for, each typed. | |
| prompt | No | Recipe: the task prompt the row agent reads for every row. Required without dataset_id. | |
| dataset_id | No | Alone: a dataset's id (ds_...); answers its own enrichment. Not with the fields below. | |
| only_tools | No | Recipe: exactly these tools (GET /tools). Replaces the default set. | |
| budget_locked | No | Recipe: true keeps the budget as set when output columns are later added or removed; false lets it move by 1.5 per column. | |
| input_columns | No | Recipe: the headers rows must carry, the dataset's input columns. Omit for any (one `Input` column), or, without output, for the ones the prompt implies. | |
| additional_tools | No | Recipe: the default tools plus these (GET /tools; some need enabling on the account or a linked key). |