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.
export SUPPOSING_API_URL=https://api.supposing.appexport SUPPOSING_API_KEY=sp_your_keyAUTH="Authorization: Bearer $SUPPOSING_API_KEY"
# 1. A dataset of two itemsDATASET=$(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 bodyBODY='{"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 verdictuntil curl -sf "$SUPPOSING_API_URL/v1/runs/$RUN" -H "$AUTH" | jq -e '.status | IN("done", "failed", "canceled")'; do sleep 1donecurl -sf "$SUPPOSING_API_URL/v1/runs/$RUN/results" -H "$AUTH" | jq -r .summaryWhat just happened
Section titled “What just happened”POST /v1/runs/estimatereturned the calls and the money (est_cost_usd) without starting anything. Always call it first.POST /v1/runsstarted the run. Its judge calls run in the background.GET /v1/runs/{id}/resultsreturnedsummary, one sentence, thenranking.leaderboardwith 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.