Skip to content

Start a run and pay for it in one step: it starts when the payment goes through

POST
/v1/runs/checkout
curl --request POST \
--url https://api.supposing.app/v1/runs/checkout \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "type": "ranking", "dataset_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "ranking": { "rubric": "example", "rounds": 8, "both_orders": false, "pairing": "swiss", "goal": "full", "top_n": 10, "max_chars": 60000, "seed": 0, "context": "example", "examples": [ { "a": "example", "b": "example", "winner": "A", "why": "example" } ], "system": "example", "keep_rules": true }, "name": "example", "rubric_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "ephemeral": false, "judge": "quick", "max_cost_usd": 1, "amount_usd": 1, "ui_mode": "embedded" }'

Use it when the estimate is above the balance (balance_after_usd below zero). The run is created awaiting_payment with no hold; the Stripe webhook credits the workspace, then holds and queues the run, so it starts even if the browser never comes back.

Idempotency-Key
Idempotency-Key

Any unique string, e.g. a UUID. Retrying with the same key returns the first response instead of creating a second one. Keys last 24 hours.

Any of:
string
<= 255 characters

Any unique string, e.g. a UUID. Retrying with the same key returns the first response instead of creating a second one. Keys last 24 hours.

Supposing-Source
Supposing-Source

Web, api, cli or mcp: recorded as the source of datasets and runs this request creates. Default api.

Any of:
string

Web, api, cli or mcp: recorded as the source of datasets and runs this request creates. Default api.

Media typeapplication/json
RunCheckoutIn

Start a run and pay for it in one step: the run waits for the payment, then starts on its own.

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
rounds
Rounds

Opponents per item. More rounds, tighter intervals.

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

Read each pair both ways: judge every pair twice, swapping which item comes first. More reliable, twice the calls. Off, each pair is judged once with a random item first, so position bias averages out.

boolean
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 <= 20000
max_chars
Max Chars

Each item is read up to this many characters; a longer one is cut. The estimate’s long_items says how many would be cut, the largest this judge model takes, and the cost of reading them in full.

integer
default: 60000 >= 1 <= 1000000
seed
Seed
integer
0 >= -9223372036854776000 <= 9223372036854776000
context
Context

Background the judge reads before every pair, e.g. who the texts are for and what the fund pays for. Shown as its own block after the rubric.

Any of:
string
<= 20000 characters
examples
Examples

Past judgements for calibration: two texts, the winner (A or B) and optionally why. Shown to the judge before every pair.

Array<object>
<= 20 items
JudgeExample

A past judgement shown to the judge (the engine’s supposing.Example).

object
a
required
A

The text shown first.

string
>= 1 characters <= 8000 characters
b
required
B

The text shown second.

string
>= 1 characters <= 8000 characters
winner
required
Winner
string
Allowed values: A B
why
Why

Why it won, in a sentence or two.

Any of:
string
<= 2000 characters
system
System

Your own system prompt, as a template. It must contain {output_format} (the reply the library reads) and {rules} (the built-in rules, including the guard against instructions inside the texts) unless keep_rules is false. Write literal braces as {{ and }}. Null: the built-in prompt (GET /v1/rubrics/system-prompt).

Any of:
string
<= 10000 characters
keep_rules
Keep Rules

False lets system leave out {rules}. The built-in rules stop the judge following instructions written inside the texts; drop them only on purpose. Null or true keeps them.

Any of:
boolean
name
Name

Defaults to the dataset name and judge model.

Any of:
string
<= 200 characters
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

Quick (the default), balanced, thorough, or an OpenRouter model id from GET /v1/models; or the full {provider, model} object.

Any of:
Judge

The model that makes each call in a run.

object
provider
Provider

Openrouter: our key, paid from credit, or your own OpenRouter key (on the Subscription). mock (made-up verdicts) and claude_cli (your Claude subscription) exist only in local development, never on the hosted API: use the open-source CLI for them.

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

An OpenRouter model id (GET /v1/models), vendor/name: no variant suffix such as :online or :free, and no router (openrouter/…, ~…).

string
default: anthropic/claude-haiku-5.5 >= 1 characters <= 200 characters
level
Level

Economy, quick, balanced or thorough when the model is that level’s model; null for any other model. Given alone, it picks the model.

Any of:
string
Allowed values: economy quick balanced thorough
max_cost_usd
Max Cost Usd

Stop the run once its calls have cost this much.

Any of:
number
> 0
amount_usd
required
Amount Usd

Credit to buy, whole US dollars from min_topup_usd (GET /v1/billing); at least what the run needs beyond the balance.

integer
ui_mode
Ui Mode

Embedded: a client_secret for Stripe’s embedded checkout; hosted: a url to Stripe’s page.

string
default: embedded
Allowed values: embedded hosted

Successful Response

Media typeapplication/json
RunCheckout
object
run
required
Run

Status awaiting_payment until the payment goes through, then queued. Unpaid runs are deleted after a day.

object
id
required
Id
string format: uuid
type
required
Type
string
Allowed value: ranking
name
required
Name
string
dataset_id
required
Dataset Id
string format: uuid
dataset_name
required
Dataset Name
string
rubric_id
required
Rubric Id
Any of:
string format: uuid
source
required
Source
string
Allowed values: web api cli mcp
ephemeral
required
Ephemeral
boolean
judge
required
Judge

The model that makes each call in a run.

object
provider
required
Provider

Openrouter: our key, paid from credit, or your own OpenRouter key (on the Subscription). mock (made-up verdicts) and claude_cli (your Claude subscription) exist only in local development, never on the hosted API: use the open-source CLI for them.

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

An OpenRouter model id (GET /v1/models), vendor/name: no variant suffix such as :online or :free, and no router (openrouter/…, ~…).

string
default: anthropic/claude-haiku-5.5 >= 1 characters <= 200 characters
level
required
Level

Economy, quick, balanced or thorough when the model is that level’s model; null for any other model. Given alone, it picks the model.

Any of:
string
Allowed values: economy quick balanced thorough
max_cost_usd
required
Max Cost Usd
Any of:
number
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
rounds
required
Rounds

Opponents per item. More rounds, tighter intervals.

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

Read each pair both ways: judge every pair twice, swapping which item comes first. More reliable, twice the calls. Off, each pair is judged once with a random item first, so position bias averages out.

boolean
pairing
required
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
required
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
required
Top N
integer
default: 10 >= 1 <= 20000
max_chars
required
Max Chars

Each item is read up to this many characters; a longer one is cut. The estimate’s long_items says how many would be cut, the largest this judge model takes, and the cost of reading them in full.

integer
default: 60000 >= 1 <= 1000000
seed
required
Seed
integer
0 >= -9223372036854776000 <= 9223372036854776000
context
required
Context

Background the judge reads before every pair, e.g. who the texts are for and what the fund pays for. Shown as its own block after the rubric.

Any of:
string
<= 20000 characters
examples
required
Examples

Past judgements for calibration: two texts, the winner (A or B) and optionally why. Shown to the judge before every pair.

Array<object>
<= 20 items
JudgeExample

A past judgement shown to the judge (the engine’s supposing.Example).

object
a
required
A

The text shown first.

string
>= 1 characters <= 8000 characters
b
required
B

The text shown second.

string
>= 1 characters <= 8000 characters
winner
required
Winner
string
Allowed values: A B
why
required
Why

Why it won, in a sentence or two.

Any of:
string
<= 2000 characters
system
required
System

Your own system prompt, as a template. It must contain {output_format} (the reply the library reads) and {rules} (the built-in rules, including the guard against instructions inside the texts) unless keep_rules is false. Write literal braces as {{ and }}. Null: the built-in prompt (GET /v1/rubrics/system-prompt).

Any of:
string
<= 10000 characters
keep_rules
required
Keep Rules

False lets system leave out {rules}. The built-in rules stop the judge following instructions written inside the texts; drop them only on purpose. Null or true keeps them.

Any of:
boolean
billed
required
Billed

Paid from the workspace’s credit (our OpenRouter key).

boolean
prices
required

Catalogue pricing: the prices this run is charged at, fixed when it was created. Null otherwise.

Any of:
RunPrices
object
usd_per_mtok_input
required
Usd Per Mtok Input

Per million tokens the judge reads.

number
usd_per_mtok_output
required
Usd Per Mtok Output

Per million tokens it writes.

number
priced_at
required
Priced At
string format: date-time
latest_verdict
required

GET /v1/runs/{id} and the events stream only (null in lists): the newest decided comparison.

Any of:
LatestVerdict

The most recent decided comparison of a run, for ‘Latest · A beat B: “…”’ on the live page.

object
comparison_id
required
Comparison Id
string format: uuid
winner_item
required
Winner Item
string format: uuid
winner_title
required
Winner Title
Any of:
string
loser_item
required
Loser Item
string format: uuid
loser_title
required
Loser Title
Any of:
string
reason
required
Reason

The first clause of the judge’s reasoning, at most 160 characters.

string
decided_at
required
Decided At
Any of:
string format: date-time
prompt_fingerprint
required
Prompt Fingerprint

A short hash of everything that gives a verdict its meaning: rubric, system prompt, context, examples, judge, both_orders and max_chars (supposing.run_fingerprint). Runs with the same one are comparable.

string
""
judge_name
required
Judge Name

The judge in words, e.g. ‘Claude Haiku 5.5’, or ‘Claude Haiku’ for a Claude subscription. Show this rather than the model id.

string
""
sample_id
required
Sample Id

Set when this run is a sample’s stored ranking: real verdicts made once by Supposing, copied free. Label it as a sample.

Any of:
string
data_policy
required
Data Policy

How the judge’s calls were routed: zero_retention means only to providers that keep no data and don’t collect it.

string
default: provider_default
Allowed values: zero_retention provider_default none
status
required
Status
string
Allowed values: awaiting_payment queued running done failed canceled
note
required
Note
Any of:
string
stopped_by
required
Stopped By

Why a done run stopped before its plan, as a field: cost_cap (max_cost_usd was reached), hold (the credit held for it ran out), price_unknown (the model’s price changed or went missing). Null when it ran its plan, and for failed and canceled runs (see error_code). note says the same in words.

Any of:
string
Allowed values: cost_cap hold price_unknown
error
required
Error
Any of:
string
error_code
required
Error Code

Why the run failed, as a stable code: no_verdicts (no comparison gave a readable verdict, so there is no ranking; it does not count toward the month’s rankings), own_key_removed (the workspace’s OpenRouter key was removed; add it back, then retry), judge_unreadable (the judge’s answers were too often not in the required format), judge_unavailable (catalogue pricing: the model could not judge the run; pick another), provider_error or http_.

Any of:
string
planned_calls
required
Planned Calls
integer
created_at
required
Created At
string format: date-time
started_at
required
Started At
Any of:
string format: date-time
finished_at
required
Finished At
Any of:
string format: date-time
judging_seconds
required
Judging Seconds

Time spent judging, summed over passes (a live pass counts to now). Not finished_at - started_at, which includes idle time between an end and an extend.

number
0
passes
required
Passes

1, plus one per extend or retry.

integer
default: 1
progress
required
Progress
object
total
required
Total
integer
done
required
Done
integer
failed
required
Failed
integer
in_flight
required
In Flight
integer
pending
required
Pending
integer
round
required
Round
integer
cost_usd
required
Cost Usd

What the run has cost so far: for a billed run, the credit charged for its calls; otherwise the model cost reported by the provider (on your own key).

number
retried
required
Retried

Calls that needed a second paid reply: the first was unreadable, or the judge declined to choose and was asked once more.

integer
0
unreadable
required
Unreadable

Calls whose replies were all unreadable (no verdict in them). On a billed run they are charged like any call.

integer
0
retry_cost_usd
required
Retry Cost Usd

What the second replies cost, included in cost_usd: on your own key, or on a billed run under token pricing, where they are charged at cost. 0 under tier pricing, where a call’s price is fixed.

number
0
avg_latency_ms
required
Avg Latency Ms

Mean of the last 20 decided calls; null before any.

Any of:
number
concurrency
required
Concurrency

Calls the workers run at once for one run. For time left: remaining calls x avg_latency_ms / concurrency, roughly.

integer
0
leader
required

Top item from the final results; null until the run is done.

Any of:
Leader

The top item of a finished run, for lists.

object
item_id
required
Item Id
string format: uuid
title
required
Title
Any of:
string
source_id
required
Source Id
Any of:
string
rating
required
Rating
number
rating_lo
required
Rating Lo
number
rating_hi
required
Rating Hi
number
rank_lo
required
Rank Lo
integer
rank_hi
required
Rank Hi
integer
shape
required
Shape

Best first, every item’s rank and interval from the final results (at most 40, evenly sampled, always including first and last); null until the run is done.

Any of:
Array<object>
ShapePoint

One item’s place in a finished ranking, for drawing a run’s shape in a list.

object
rank
required
Rank
integer
rank_lo
required
Rank Lo
integer
rank_hi
required
Rank Hi
integer
p_top_n
required
P Top N
Any of:
number
checkout
required
RunCheckoutSession
object
id
required
Id
string
url
required
Url

Hosted checkout: send the payer here. Null for embedded checkout.

Any of:
string
client_secret
required
Client Secret

Embedded checkout: pass to Stripe.js initEmbeddedCheckout. Null for hosted checkout.

Any of:
string

Example

{
"run": {
"type": "ranking",
"source": "web",
"judge": {
"provider": "openrouter",
"model": "anthropic/claude-haiku-5.5",
"level": "economy"
},
"ranking": {
"rounds": 8,
"both_orders": false,
"pairing": "swiss",
"goal": "full",
"top_n": 10,
"max_chars": 60000,
"seed": 0,
"examples": [
{
"winner": "A"
}
]
},
"billed": false,
"prompt_fingerprint": "",
"judge_name": "",
"data_policy": "zero_retention",
"status": "awaiting_payment",
"stopped_by": "cost_cap",
"judging_seconds": 0,
"passes": 1,
"progress": {
"retried": 0,
"unreadable": 0,
"retry_cost_usd": 0,
"concurrency": 0
}
}
}

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
limit

For plan_limit_* codes: the limit, usage and upgrade.

Any of:
LimitInfo

Which plan limit a plan_limit_* error hit, and the way up.

object
name
required
Name

Datasets, items_per_dataset, chars_per_dataset or runs_per_month.

string
plan
required
Plan

The workspace’s plan: free (Pay as you go) or subscription.

string
limit
required
Limit
integer
used
required
Used

Current usage; for items_per_dataset and chars_per_dataset, the size the dataset would have.

integer
upgrade_url
required
Upgrade Url

The web page that starts the Subscription; null while it can’t be bought here (then the hint says whom to write to).

Any of:
string

Example generated

{
"code": "example",
"message": "example",
"hint": "example",
"details": [
{
"field": "example",
"message": "example"
}
],
"limit": {
"name": "example",
"plan": "example",
"limit": 1,
"used": 1,
"upgrade_url": "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
limit

For plan_limit_* codes: the limit, usage and upgrade.

Any of:
LimitInfo

Which plan limit a plan_limit_* error hit, and the way up.

object
name
required
Name

Datasets, items_per_dataset, chars_per_dataset or runs_per_month.

string
plan
required
Plan

The workspace’s plan: free (Pay as you go) or subscription.

string
limit
required
Limit
integer
used
required
Used

Current usage; for items_per_dataset and chars_per_dataset, the size the dataset would have.

integer
upgrade_url
required
Upgrade Url

The web page that starts the Subscription; null while it can’t be bought here (then the hint says whom to write to).

Any of:
string

Example generated

{
"code": "example",
"message": "example",
"hint": "example",
"details": [
{
"field": "example",
"message": "example"
}
],
"limit": {
"name": "example",
"plan": "example",
"limit": 1,
"used": 1,
"upgrade_url": "example"
}
}