API
Datasets

Build dataset

POST/datasets

Create a dataset: from rows you have, or from a prompt Riveter finds rows for. What a dataset is: Datasets.

Start a dataset from your data

This is the preferred way to enrich data you already hold. The request is the rows plus the columns to add: the enrichment_id of an enrichment you already have — from a dataset in the app (the dataset page's API button shows it), from GET /datasets/{id}, or from GET /enrichments; or save a new one with POST /enrichments — or, with no enrichment yet, attributes, the output column names: Riveter creates the dataset's enrichment from them (its columns typed from their names; set a column's prompt, format, or tool with PATCH /datasets/{id}). Rows are objects keyed by input column name (an enrichment's input columns, GET /enrichments/{id} lists them; with attributes, input_columns or the keys of the rows), up to 100 per request; add more with POST /datasets/{id}/rows or a CSV on POST /datasets/{id}/rows/import.

curl -X POST "https://api.riveterhq.com/v1/datasets" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Q4 targets",
    "enrichment_id": "enr_YOUR_ENRICHMENT_ID",
    "rows": [
      { "Company": "Apple", "Website": "apple.com" },
      { "Company": "Shopify", "Website": "shopify.com" }
    ]
  }'

The response is the dataset: id (ds_...), input_columns, enrichment_id, output_columns, row_count. Nothing has run yet. Fill the cells:

curl -X POST "https://api.riveterhq.com/v1/enrich" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "dataset_id": "ds_YOUR_DATASET_ID" }'

This fills every empty cell and returns a run (id: run_...). Add "estimate_cost": true to see the price without running anything, or "max_credits": 50 to refuse the run above a ceiling. Then read the results:

curl "https://api.riveterhq.com/v1/runs/RUN_ID/result?wait=50" \
  -H "Authorization: Bearer YOUR_API_KEY"

wait holds the request for up to 50 seconds. output is null until the run finishes, so call again until it is not; or pass webhook_url on the fill and skip polling. output.rows is the rows the fill ran, each with its input, its cells by output column name (value, state, sources), and the credits it cost. GET /datasets/{id}/rows is the whole grid at any time, filled cells included.

Large datasets

output.rows holds up to 5,000 rows. Above that, output is null and the run's output_files are the result: output_files.jsonl and output_files.csv are the whole grid as files on object storage, one row per line. Each has a state (pending until the export lands, shortly after the run finishes; then ready), a signed url, and expires_at (one hour; fetch the result again for a fresh link).

curl -o rows.jsonl "$(curl -s "https://api.riveterhq.com/v1/runs/RUN_ID/result" \
  -H "Authorization: Bearer YOUR_API_KEY" | jq -r '.output_files.jsonl.url')"

Two more ways to read a large grid: page GET /datasets/{id}/rows with limit (up to 1,000) and cursor, or updated_since for only the rows changed since a time; or download the grid at any time with GET /datasets/{id}/export (output_format jsonl, csv, or xlsx).

Build a list from a prompt

No rows yet? Describe them. Riveter's list generator finds count rows for the prompt; input_columns names the identity columns to generate. The output columns come from attributes (an enrichment is created for the dataset from the prompt and the column names) or from an enrichment_id. auto_fill: true fills the cells as soon as the rows land. Generation and the fill are both paid runs; estimate_cost: true prices them first.

Or send prompt and count alone and the whole dataset is set up from the prompt: the identity columns, and one output column per fact the prompt asks to find about each row, each with its own prompt and type ("Top 50 US fintech startups with their CEO, total funding, and founding year" → rows under Company, columns CEO, Total funding, Founding year). A prompt about rows alone gets no output columns. Name input_columns yourself and the output columns come from attributes or enrichment_id only, as above.

curl -X POST "https://api.riveterhq.com/v1/datasets" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "SF coffee roasters",
    "prompt": "Specialty coffee roasters in San Francisco",
    "count": 50,
    "input_columns": ["Roaster", "Website"],
    "attributes": ["Founded year", "Number of cafes"],
    "auto_fill": true
  }'

The response is the dataset plus run, the generation run; poll it like any run. The rows land in the dataset when generation finishes, and with auto_fill the fill run starts then: it appears under the dataset's runs on GET /datasets/{id}, and fill_webhook_url is POSTed when it finishes. Read the grid as under Large datasets above. For more rows later, POST /datasets/{id}/rows/build.

Request bodyrequired

namestring

Display name

Max length 200
input_columnsarray of string

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.

Max items 50
rowsarray of map of string

The rows, keyed by input column name. Up to 100; more with POST /datasets/{id}/rows/import.

Max items 100
promptstring

What the rows are, for Riveter to find them. Requires count.

countinteger

How many rows to generate for prompt. Capped per account.

Min 1Max 12000

Most credits the build may spend (default 50 + 1.5 per row). A deposit of the expected spend is charged at kickoff; the rest is charged as it runs, up to this budget. A low budget means fewer rows.

Min 10Max 5000
attributesarray of string

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 items 50
enrichment_idstring

A saved enrichment (enr_...) whose output columns become the dataset's. Not with attributes.

auto_fillboolean

With count: fill the output columns when the rows land (a second paid run).

Default false
webhook_urlstring uri

POSTed the list-generation run when it finishes

fill_webhook_urlstring uri

With auto_fill: POSTed the fill run when it finishes

estimate_costEstimateCostParam

Validate and price the request without running or charging anything; the 200 response is the credit estimate (EstimateCostResult).

Default false
max_creditsMaxCreditsParam

Credit ceiling. Refused with 422 credit_cap_exceeded (nothing charged) when the estimate's maximum exceeds it.

Min 0

Responses

200estimate_cost only — the credit estimate (upfront / expected charged now; typical range; maximum = budget — budget, else 50 + 1.5 × count — plus every row's budget with auto_fill); nothing was started
estimate_costbooleanrequired
One of true
typestringrequired

What would have been charged for (monitor = one scheduled run of the monitor)

One of enrichment dataset_build extraction_discovery extraction monitor scrape quick_search search_agent
credit_detailCreditDetailrequired

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.

201The dataset, with run when list generation started (null when the rows came in the request)
idstring

ds_...

namestringnullable
input_columnsarray of string

Input column names, in order (row identity)

index_columnstringnullable

The input column rows are unique on

enrichment_idstringnullable

The bound enrichment (its output columns are the dataset's)

output_columnsarray of string

Output column names, in order (from the bound enrichment; [] without one). Prompts and schemas are on GET /enrichments/{enrichment_id}

row_countinteger
rows_expiredboolean

True once the rows were removed by retention; the structure stays

import_in_progressboolean

A CSV import accepted with 202 has not landed yet

runsarray of DatasetRunSummary

The five newest runs on the dataset

Attributes
idstring

run_...

typestring

dataset_build = list generation; enrichment = a fill

One of dataset_build enrichment
statusstring
created_atstring date-time
finished_atstring date-timenullable
created_atstring date-time
updated_atstring date-time
runRun

The uniform shape for every run, returned by kickoff endpoints and all /runs endpoints. Related resource ids (enrichment_id, dataset_id, extraction_id, monitor_id) appear when they apply to the run; kickoff responses may add a few endpoint-specific fields.

Attributes
idstringrequired

The run id (run_...)

typestringrequired

What kind of run this is

One of enrichment dataset_build extraction scrape quick_search search_agent
statusstringrequired
One of pending enqueued processing success stopped
progressRunProgressrequired

Completion estimate. Cell-based runs (enrichment, quick_search) also report cell counts; dataset fills report row counts; builds on a dataset report what landed.

Attributes
percent_completenumbernullable
estimated_seconds_remainingnumbernullable
elapsed_secondsnumbernullable
completed_cellsinteger

Cell-based runs only

total_cells_expectedinteger

Cell-based runs only

not_found_cellsintegernullable

Cell-based runs only. Null while a run over 5,000 rows is in progress; set when it finishes.

total_rowsinteger

Dataset fills only. Rows in the fill's scope

completed_rowsinteger

Dataset fills only. Rows finished (ok, not found, or failed)

running_rowsinteger

Dataset fills only. Rows an agent is working on right now

requested_rowsinteger

Builds on a dataset only. The count asked for

generated_rowsinteger

Builds on a dataset only. Rows the generator found; set when the run finishes

added_rowsinteger

Builds on a dataset only. Rows that landed in the dataset; set when the run finishes

skipped_duplicate_rowsinteger

Builds on a dataset only. Generated rows dropped as duplicates on the index column; set when the run finishes

credits_usednumber

Credits consumed so far

credit_detailCreditDetailrequired

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.

app_urlstring uri

Link to view this run in the Riveter app

result_urlstring urirequired

Where to fetch the run's output

started_atstring date-timenullable
finished_atstring date-timenullable
errorobjectnullable

Null unless the run hit an error

Attributes
typestring
messagestring
stopped_reasonStoppedReason

Why the run has status stopped. Only present on stopped runs. user_request: stopped through the API or the app. credit_limit: the account ran out of credits. error: the run failed (internal error, or every enrichment cell failed); error.message has the detail.

One of user_request credit_limit error
enrichment_idstring

Present when the run belongs to an enrichment

enrichment_namestring
dataset_idstring

Present on dataset-build runs

extraction_idstring

Present on extraction runs

monitor_idstring

Present on monitor-scheduled runs

webhook_urlstring uri

Present when the run has a webhook configured

400The request is malformed or names a conflicting parameter combination
errorobjectrequired
Attributes
typestringrequired

Machine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)

messagestringrequired

Human-readable explanation

detailsany

Optional extra context (e.g. per-field validation errors)

credit_detailCreditDetail

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.

401Missing or invalid API key (request_status body — see the AuthError schema)
request_statusstring
One of error
messagestring
error_typestring
One of unauthorized
403The API key's account may not access this resource or endpoint (forbidden), or the account has not migrated to Datasets yet (feature_not_enabled — open Datasets in the app and click "Migrate to Datasets")
errorobjectrequired
Attributes
typestringrequired

Machine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)

messagestringrequired

Human-readable explanation

detailsany

Optional extra context (e.g. per-field validation errors)

credit_detailCreditDetail

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.

404No resource with that id on this account
errorobjectrequired
Attributes
typestringrequired

Machine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)

messagestringrequired

Human-readable explanation

detailsany

Optional extra context (e.g. per-field validation errors)

credit_detailCreditDetail

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.

422The request is valid but can't be executed (e.g. insufficient_credits, credit_cap_exceeded when max_credits is set, validation failure)
errorobjectrequired
Attributes
typestringrequired

Machine-readable error type (bad_request, not_found, forbidden, feature_not_enabled, duplicate_run_key, insufficient_credits, credit_cap_exceeded, validation, not_implemented, ...)

messagestringrequired

Human-readable explanation

detailsany

Optional extra context (e.g. per-field validation errors)

credit_detailCreditDetail

The estimate made at kickoff next to what has been charged so far. estimate is null for runs started before estimates existed. Estimates and credit errors add credits_remaining and sufficient_credits.

Attributes
estimateone ofrequired
Attributes
One of
  • CreditEstimate model →
    minimumnumberrequired

    Least the run can cost

    expectednumber

    Likely cost from past runs of the same config; absent without history

    typicalobject

    Recent p25–p75 settled range for builds of this size; absent without a dataset build estimate

    Attributes
    lownumberrequired
    highnumberrequired
    maximumnumberrequired

    Most the run can cost

    upfrontnumber

    Credits taken at kickoff when charged_upfront is true; 0 when the charge accrues as work completes

    charged_upfrontbooleanrequired

    true when a deposit is taken at kickoff (dataset builds, extractions); false when credits accrue as work completes

  • null
credits_usednumberrequired

Credits charged so far (same value as the top-level credits_used)

credits_remainingnumber

Account balance. Only on estimates and credit errors.

sufficient_creditsboolean

Whether the balance covers estimate.maximum. Only on estimates and credit errors.