Skip to content

HTTP quickstart

At the end of this page you will have created a dataset, run a ranking and read the verdict with curl. It is free with the mock judge.

Sign up at app.supposing.app and create an API key under Developers. Every request sends it as a bearer token.

Terminal window
export SUPPOSING_API_URL=https://api.supposing.app
export SUPPOSING_API_KEY=sp_your_key
AUTH="Authorization: Bearer $SUPPOSING_API_KEY"
# 1. A dataset of two items
DATASET=$(curl -sf "$SUPPOSING_API_URL/v1/datasets" -H "$AUTH" -H "Content-Type: application/json" -d '{
"name": "two pitches",
"items": [{"title": "a.md", "text": "Solar panels for 40 rural schools, 4-year payback."},
{"title": "b.md", "text": "An app for everything. Details to follow."}]}' | jq -r .id)
# 2. The estimate, then the run, with the same body
BODY='{"dataset_id": "'$DATASET'", "judge": {"provider": "mock", "model": "mock"},
"ranking": {"rubric": "Which pitch is more fundable?", "rounds": 2}}'
curl -sf "$SUPPOSING_API_URL/v1/runs/estimate" -H "$AUTH" -H "Content-Type: application/json" -d "$BODY"
RUN=$(curl -sf "$SUPPOSING_API_URL/v1/runs" -H "$AUTH" -H "Content-Type: application/json" -d "$BODY" | jq -r .id)
# 3. Wait, then read the verdict
until curl -sf "$SUPPOSING_API_URL/v1/runs/$RUN" -H "$AUTH" | jq -e '.status | IN("done", "failed", "canceled")'; do
sleep 1
done
curl -sf "$SUPPOSING_API_URL/v1/runs/$RUN/results" -H "$AUTH" | jq -r .summary
  • POST /v1/runs/estimate returned the calls and the money (est_cost_usd) without starting anything. Always call it first.
  • POST /v1/runs started the run. Its judge calls run in the background.
  • GET /v1/runs/{id}/results returned summary, one sentence, then ranking.leaderboard with each item’s 90% range of places.

Instead of polling, you can follow GET /v1/runs/{id}/events, a server-sent event stream. Lists return {"data": [...], "next_cursor": ...}. Errors return {"code", "message", "hint", "details"}: see Errors. Every route is in the API reference.