Skip to content

Estimate a run's calls and cost without starting it

POST
/v1/runs/estimate
curl --request POST \
--url https://api.supposing.app/v1/runs/estimate \
--header 'Content-Type: application/json' \
--data '{ "type": "ranking", "dataset_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "ranking": { "rubric": "example", "criteria": [ { "name": "example", "description": "", "weight": 1 } ], "instructions": "example", "rounds": 8, "both_orders": true, "pairing": "swiss", "goal": "full", "top_n": 10, "max_chars": 60000, "seed": 0 }, "name": "example", "rubric_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "ephemeral": false, "judge": { "provider": "openrouter", "model": "anthropic/claude-haiku-5.5" }, "max_cost_usd": 1 }'
Media typeapplication/json
RunIn

Start a run. Only type ranking exists today; its settings go under ranking.

object
type
Type
string
default: ranking
Allowed value: ranking
dataset_id
required
Dataset Id
string format: uuid
ranking
required
RankingConfig

Settings for a run of type ranking: a pairwise tournament judged against a rubric.

object
rubric
required
Rubric

What the judge should prefer, in plain words. Each call shows the judge two items and this rubric and asks which is better.

string
>= 1 characters <= 20000 characters
criteria
Criteria

Optional named criteria with relative weights.

Array<object>
<= 20 items
Criterion

One part of a rubric. The judge is told the weights when they differ.

object
name
required
Name
string
>= 1 characters <= 200 characters
description
Description
string
"" <= 2000 characters
weight
Weight

Relative to the other criteria.

number
default: 1 > 0 <= 100
instructions
Instructions

Optional extra judge instructions.

Any of:
string
<= 5000 characters
rounds
Rounds

Opponents per item. More rounds, tighter intervals.

integer
default: 8 >= 1 <= 200
both_orders
Both Orders

Judge every pair twice, swapping which item comes first, so position bias cancels out.

boolean
default: true
pairing
Pairing

Swiss pairs items of similar rating; round_robin judges every pair each round (small sets only; not with goal top_n).

string
default: swiss
Allowed values: swiss random round_robin
goal
Goal

Top_n spends calls on finding the best top_n items rather than ordering the whole list.

string
default: full
Allowed values: full top_n
top_n
Top N
integer
default: 10 >= 1
max_chars
Max Chars

Items longer than this are cut before judging.

integer
default: 60000
seed
Seed
integer
0
name
Name

Defaults to the dataset name and judge model.

Any of:
string
rubric_id
Rubric Id

The saved rubric this run’s rubric text came from.

Any of:
string format: uuid
ephemeral
Ephemeral

True for a throwaway, such as an inline one-shot comparison: hidden from lists unless include_ephemeral=true, and deleted after 30 days.

boolean
judge
Judge

The model that makes each call in a run.

object
provider
Provider

Openrouter bills the org’s key (or the platform’s); mock is free and instant, for tests; claude_cli (your Claude subscription) works only in local development, never on the hosted API: use the open-source CLI for it.

string
default: openrouter
Allowed values: openrouter mock claude_cli
model
Model

An OpenRouter model id.

string
default: anthropic/claude-haiku-5.5
max_cost_usd
Max Cost Usd

Stop the run once its calls have cost this much.

Any of:
number

Successful Response

Media typeapplication/json
Estimate

What a run would cost before it starts. Show this before every run.

object
type
required
Type
string
Allowed value: ranking
n_items
required
N Items
integer
max_calls
required
Max Calls

Calls if every round runs.

integer
min_calls
required
Min Calls

Calls if the run stops at the earliest point it can.

integer
est_input_tokens
required
Est Input Tokens

For max_calls.

integer
est_output_tokens
required
Est Output Tokens

For max_calls.

integer
billed
required
Billed

True when the run uses our OpenRouter key and is paid from the workspace’s credit. Runs on your own key, mock and claude_cli are never billed.

boolean
price_tier
required
Price Tier

The judge model’s price tier, for billed runs.

Any of:
string
price_per_call_usd
required
Price Per Call Usd

What one judge call costs a billed run. A call reads up to 24,000 characters of the two items; longer pairs count as more than one call.

Any of:
number
est_cost_usd
required
Est Cost Usd

What the run costs you at most, capped by max_cost_usd. Billed runs: credit, at price_per_call_usd. Your own key: the model’s list price, paid to OpenRouter. 0 for mock and claude_cli. Null when unknown.

Any of:
number
est_cost_usd_min
required
Est Cost Usd Min

The same for min_calls.

Any of:
number
balance_usd
required
Balance Usd

Billed runs: the workspace’s credit now, net of what running runs hold.

Any of:
number
balance_after_usd
required
Balance After Usd

Billed runs: balance_usd minus est_cost_usd, the credit left once this run holds its estimate. Below zero, starting the run is refused with insufficient_credit.

Any of:
number
est_seconds
required
Est Seconds

Rough wall-clock time for max_calls.

integer
data_policy
required
Data Policy

Zero_retention: every call goes only to providers that keep no data and don’t collect it. provider_default: the provider’s own terms. none: no outside model (mock).

string
default: provider_default
Allowed values: zero_retention provider_default none
zdr_available
required
Zdr Available

Under zero_retention, whether the model has a provider that complies; false means the run would be refused. Null when unknown or not needed.

Any of:
boolean
usd_per_mtok_input
required
Usd Per Mtok Input

Model list price per million input tokens, for runs on your own key; null for billed runs.

Any of:
number
usd_per_mtok_output
required
Usd Per Mtok Output

The same for output tokens.

Any of:
number

Example

{
"type": "ranking",
"billed": false,
"data_policy": "zero_retention"
}

Client error. Branch on code; show message and hint.

Media typeapplication/json
Error

The body of every non-2xx response.

object
code
required
Code

Stable machine-readable code, e.g. dataset_not_found.

string
message
required
Message
string
hint
Hint

What to do next.

Any of:
string
details
Details

Per-field problems, for invalid_request.

Any of:
Array<object>
ErrorDetail
object
field
required
Field

Dotted path to the field, e.g. ranking.rubric.

string
message
required
Message
string

Example generated

{
"code": "example",
"message": "example",
"hint": "example",
"details": [
{
"field": "example",
"message": "example"
}
]
}

Server error.

Media typeapplication/json
Error

The body of every non-2xx response.

object
code
required
Code

Stable machine-readable code, e.g. dataset_not_found.

string
message
required
Message
string
hint
Hint

What to do next.

Any of:
string
details
Details

Per-field problems, for invalid_request.

Any of:
Array<object>
ErrorDetail
object
field
required
Field

Dotted path to the field, e.g. ranking.rubric.

string
message
required
Message
string

Example generated

{
"code": "example",
"message": "example",
"hint": "example",
"details": [
{
"field": "example",
"message": "example"
}
]
}