Documentation

Build on the council that keeps score.

Everything the browser does, your code can do: search live Polymarket events, run the 4-model AI council (Grok, Claude, GPT, Gemini), and read fully structured reports. Every verdict is later graded against the real outcome on a public track record — so you can audit the thing you're building on.

Base URL: https://backend-production-092f.up.railway.app. The full surface is also browsable as an interactive OpenAPI reference.

Quickstart

1. Create an account · 2. Mint an API key in your profile · 3. Run a report:

1 · Find an event (free, no auth)
curl "https://backend-production-092f.up.railway.app/api/events?search=fed+decision&per_page=3"
2 · Check the price before spending
curl https://backend-production-092f.up.railway.app/api/reports/check/EVENT_ID \
  -H "X-API-Key: pc_live_..."

{
  "has_cached_report": false,
  "already_purchased": false,
  "cost_credits": 484,          // the current dynamic quote for YOU
  "pricing": {"fresh_credits": 484, "cached_credits": 242, "byok_credits": 50}
}
3 · Run the council, locking the quoted price
curl -X POST https://backend-production-092f.up.railway.app/api/reports \
  -H "X-API-Key: pc_live_..." -H "Content-Type: application/json" \
  -d '{"event_id": "EVENT_ID", "quoted_credits": 484}'

{"report_id": 57, "status": "pending", "credits_spent": 484, ...}
4 · Poll until completed (~30-120s)
curl https://backend-production-092f.up.railway.app/api/reports/57 -H "X-API-Key: pc_live_..."
# status: pending -> processing -> completed | failed (failed = auto-refund)

Python

quickstart.py
import os, time, httpx

BASE = "https://backend-production-092f.up.railway.app"
H = {"X-API-Key": os.environ["POLYINSIGHT_API_KEY"]}

event_id = httpx.get(f"{BASE}/api/events", params={"search": "fed decision"}).json()["events"][0]["event_id"]

check = httpx.get(f"{BASE}/api/reports/check/{event_id}", headers=H).json()
run = httpx.post(f"{BASE}/api/reports", headers=H,
                 json={"event_id": event_id, "quoted_credits": check["cost_credits"]}).json()

while True:
    report = httpx.get(f"{BASE}/api/reports/{run['report_id']}", headers=H).json()
    if report["status"] in ("completed", "failed"):
        break
    time.sleep(5)

runtime = report["council_config"]["runtime"]
print(runtime["most_likely_outcome"], runtime["most_likely_probability"], "%")

Where next