---
title: "Estimate the credit cost of a multi-column run"
method: POST
path: "/tables/{table_id}/columns/run/estimate/"
tags: ["table-columns"]
---

# Estimate the credit cost of a multi-column run

`POST /tables/{table_id}/columns/run/estimate/`

## Request

- Base URL: `https://api.getoneprofile.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.getoneprofile.ai/tables/{table_id}/columns/run/estimate/`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer

Estimate the credit cost of a bundled cell run without running it. Takes the same request body as the run endpoint so estimate and run can never disagree about scope. A column another named column feeds is counted once, which is why summing the per-column estimates gives a larger number.

## Path parameters

- `table_id` string, uuid, required

## Request body

- TableColumnsRunRequestSchema: Cell-scoped run over several columns at once, as ONE dependency-ordered plan.
  - `column_ids` string[], required: The computed columns to run, in any order. A column another one here feeds is planned once, AFTER its input, so no column reads a value a sibling is still computing. Sending one request per column instead is what makes them race.
  - `record_ids` string[], required: The target rows, shared by every column named. A swept selection is a rectangle. Duplicates are dropped and the order is kept.

## Response `200`

Successful Response

- TableColumnRunEstimateResponseSchema: Estimated credit cost of an on-demand column run, before running it. Free runs (formula/manual columns) estimate to zero and are always sufficient, even at a zero balance. The figure is an estimate: row counts and cell freshness can shift between estimating and running.
  - `balance_sufficient` boolean, required: Whether the organization's available credits cover the estimate.
  - `cells_total` integer, required: All cells the run would compute, charged or not.
  - `columns` ColumnRunEstimateSchema[]: Every enrichment or export column the run would work on, in the order it runs: the column asked for first, then the columns that read it. Each with the most its part can cost and what it usually costs.
    - `column_id` string, uuid, required
    - `credits_at_most` number, required: The most this column's part of the run can cost, in credits.
    - `credits_usually` number, required: What this column's part usually costs, in credits, from what the same kind of cell has been charged before, or a typical share of credits_at_most while there is no history yet. Equal to credits_at_most for a flat price.
    - `display_name` string, required: The column's name, as the table shows it.
  - `estimated_credits` number, required: The most the run can cost, in credits: every row of every paid column charged its full per-row price. What the credit hold and the confirmation gate reason about.
  - `expected_credits` number: What a run like this usually costs, in credits: a column charged by use (an AI column) at the share of its per-row maximum the same kind of cell has actually been charged (a typical share while there is no history yet), every other column at its price. Quote both: up to estimated_credits, usually about expected_credits. Equal to estimated_credits for a flat price (no column charged by use, as in a run of enrichments): then quote that one figure, without up to.
  - `export_writes` ExportWriteEstimateSchema[]: Export columns this run would fire. Present so the confirmation can name the destination, the object and the action instead of only a row count. Empty for a run that writes nothing outside this table.
    - `action` string, required: create, update or upsert: what happens to records that already exist at the destination.
    - `column_id` string, uuid, required
    - `display_name` string, required: The export column's name, for the confirmation copy.
    - `integration_type` string, required: Destination provider slug, e.g. 'hubspot'.
    - `record_type` string, required: Destination object written, e.g. 'contacts'.
    - `rows` integer, required: Rows this column would attempt to write.
  - `is_estimate` boolean, required: Always true: freshness and row counts can shift by run time.
  - `requires_confirmation` boolean: True when the estimate crosses the confirmation threshold: ask before spending instead of running on first click.
  - `rows_held_back` integer: Rows in scope the column's run condition would hold back. Already subtracted from rows_in_scope.
  - `rows_in_scope` integer: Rows the run would cover. This is what a scope choice is about, and what the credit estimate is derived from; `cells_total` also counts the dependent columns the run would recompute.
  - `scope_too_large` boolean: True when the filtered view names more rows than a run may be scoped to (`view_scope_max_rows`). `rows_in_scope` still carries the matching count; the run itself would be refused with `scope_too_large`. Narrow the filter, or run the whole table.
  - `unit_price` number, required: Blended credits per charged cell (total estimate / units); 0 for free runs.
  - `units` integer, required: Cells that would incur a charge (0 for free runs).

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Table not found
- `422`: Invalid request made to the API.
- `500`: Internal server error.
- `502`: Bad gateway error.
- `503`: Service unavailable.

---

[API](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile.md) · [All operations](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/llms.txt) · [OpenAPI document](https://skmtc.dev/getoneprofile/apis/api-reference-oneprofile/revisions/4a6bd71e3f02?raw)
