Build dataset
build_datasetCreate a dataset from supplied rows or generate rows from a prompt, then fill output columns from attributes or a saved enrichment.
Instructions
build dataset
Build a dataset: rows you send or rows Riveter finds. rows (≤ 100 objects keyed by input column name, free) or prompt + count (generated, paid); output columns from attributes or enrichment_id, or, with prompt + count alone, written from the prompt (one typed column per fact it asks for) along with the identity columns; auto_fill: true fills generated rows when they land; budget caps a generation's spend (default 50 + 1.5 per row). Returns the dataset (id, ds_...) and run (the generation run, or null); then enrich with dataset_id alone. estimate_cost: true prices it first. help with datasets.
Example — Rows you have, two columns to fill: { "name": "Targets", "rows": [ { "Company": "Apple", "Website": "apple.com" }, { "Company": "Shopify" } ], "attributes": [ "CEO", "HQ city" ] }
Example — Generate 50 rows on a 100-credit budget, filled when they land, refused above 200 credits: { "prompt": "Specialty coffee roasters in San Francisco", "count": 50, "input_columns": [ "Roaster", "Website" ], "attributes": [ "Founded year" ], "auto_fill": true, "budget": 100, "max_credits": 200 }
Example — The whole dataset from the prompt — identity columns and typed output columns: { "prompt": "Top 50 US fintech startups with their CEO, total funding, and founding year", "count": 50, "auto_fill": true }
Workflow: The response is the dataset and, with prompt + count, a generation run — poll it with get_run, then read the rows with list_dataset_rows (auto_fill: true researches them as they land).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Display name | |
| rows | No | The rows, keyed by input column name. Up to 100; more with POST /datasets/{id}/rows/import. | |
| count | No | How many rows to generate for prompt. Capped per account. | |
| budget | No | Most credits the build may spend (default 50 + 1.5 per row); charged at kickoff, settled to the agent's spend. A low budget means fewer rows. | |
| prompt | No | What the rows are, for Riveter to find them. Requires count. | |
| auto_fill | No | With count: fill the output columns when the rows land (a second paid run). | |
| attributes | No | Output column names; they become the dataset's own enrichment's columns, typed from their names. Not with enrichment_id. Nothing is filled until POST /enrich (or auto_fill). | |
| max_credits | No | Credit ceiling. Refused with 422 credit_cap_exceeded (nothing charged) when the estimate's maximum exceeds it. | |
| webhook_url | No | POSTed the list-generation run when it finishes | |
| enrichment_id | No | A saved enrichment (enr_...) whose output columns become the dataset's. Not with attributes. | |
| estimate_cost | No | Validate and price the request without running or charging anything; the 200 response is the credit estimate (EstimateCostResult). | |
| input_columns | No | Input column names (row identity). Optional with rows; with prompt, the identity columns to generate — omitted, they are written from the prompt, and with no attributes / enrichment_id the output columns are too. | |
| fill_webhook_url | No | With auto_fill: POSTed the fill run when it finishes |