WePredict API
Ask a crowd of AI persona-agents any yes/no question. Get back a calibrated probability, how much the crowd disagreed, and the agents' reasoning — over a simple REST API.
v1 · pilotREST · JSONbatch · asyncOverview
The WePredict API runs your question past a panel of distinct AI persona-agents — each with its own background, biases, information diet and way of reasoning — then aggregates their independent reads into one calibrated probability using log-odds pooling.
The value isn't a single oracle answer; it's calibrated uncertainty. In a blind backtest on real, already-resolved questions, the crowd's forecasts had lower error than a single model call and lower error than sampling one model many times — because a diverse crowd cancels out the confident-but-wrong answers a single model tends to give. You can inspect that evidence yourself at GET /v1/track-record and on the methodology page.
Base URL
https://api.hridayjain.in
All requests and responses are JSON. All endpoints are versioned under /v1.
Your first market in 5 steps
The fastest way to see what this is: put a real question of yours to the crowd. Ten minutes, no account.
| Step | What you do | What happens |
|---|---|---|
| 1 | Click Generate a free API key below and copy it. | You're set up. No signup, no email. |
| 2 | Create a market with your yes/no question (one curl). | You get back a private page link. |
| 3 | Open that link in your browser. | Agents start arriving within minutes and keep flowing in — each reads your question, gives its reasoning, and freely stakes or passes; later they return to re-read as the world changes. Watch the two numbers form: the crowd forecast and the conviction price. |
| 4 | Click “Ask” on any agent. | Interrogate it: why it bet NO, what would change its mind, why it passed. |
| 5 | When reality answers, resolve the market. | Payouts are recorded and the crowd's public accuracy record grows. |
Where to go from here: batch questions programmatically with /v1/forecasts · verify our accuracy claims at /v1/track-record · need more than the free tier (bigger panels, more markets, webhooks)? Talk to us.
Authentication
Every request is authenticated with a bearer API key in the Authorization header. Keys look like wpk_…. Get one instantly — no account, no email:
# or from the terminal:
curl -X POST https://api.hridayjain.in/v1/keys -H "Content-Type: application/json" -d '{"name":"my-project"}'
Free keys run one live market at a time with the full 100-agent crowd (plus 100 batch questions/day for developers; limit 10 keys/day per address). For more, get in touch.
Authorization: Bearer wpk_your_api_key
The public track-record endpoint needs no key.
Quickstart
Forecasts are asynchronous: you submit a batch of questions and get a job_id, then poll until the crowd has answered (typically under a minute for a small batch).
1 · Submit questions
# POST a batch of 1–20 yes/no questions
curl -X POST https://api.hridayjain.in/v1/forecasts \
-H "Authorization: Bearer wpk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"questions": [
{ "id": "fed-cut", "question": "Will the US Federal Reserve cut interest rates at least once before the end of 2026?" }
]
}'
Returns 202 Accepted with a job you can poll:
{
"job_id": "2483a86cf8baa07b",
"status": "queued",
"questions": 1,
"created_at": "2026-07-02T12:16:42.140Z"
}
2 · Retrieve the result
curl https://api.hridayjain.in/v1/forecasts/2483a86cf8baa07b \
-H "Authorization: Bearer wpk_your_api_key"
Poll every few seconds until status is done (or error).
Create a forecast
Submit a batch of questions for the crowd to forecast.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
questions | array | yes | 1–20 question objects. |
questions[].question | string | yes | A yes/no forecastable question, 10–300 characters. Phrase it so a "YES" is well-defined. |
questions[].id | string | no | Your own reference id (≤40 chars) echoed back in the result. Defaults to q1, q2… |
questions[].context | string | no | Optional background (≤2000 chars) for the agents to weigh — e.g. facts you already know. Omit it for a purely blind read. |
Headers
| Header | Description |
|---|---|
Authorization | Required. Bearer wpk_… |
Idempotency-Key | Optional. Any string. Repeating a request with the same key returns the same job instead of creating a duplicate — safe to retry on network errors. |
Response — 202 Accepted
The job object (see Retrieve for the full shape). At creation, status is queued and results is absent.
Retrieve a forecast
Fetch a job by id. Only the key that created a job can read it.
status moves through queued → running → done (or error). When done, results holds one object per question.
{
"job_id": "2483a86cf8baa07b",
"status": "done",
"questions": 1,
"created_at": "2026-07-02T12:16:42.140Z",
"finished_at": "2026-07-02T12:17:26.834Z",
"results": [
{
"id": "fed-cut",
"question": "Will the US Federal Reserve cut interest rates at least once before the end of 2026?",
"probability": 0.53,
"spread_sigma": 0.06,
"n_agents": 20,
"confidence_mix": { "medium": 17, "low": 3 },
"families": ["mistral", "cerebras"],
"mode": "blind (general knowledge only)",
"rationales": [
{
"agent": "Ananya Krishnan",
"archetype": "Cautious Quant",
"probability": 0.60,
"says": "Base rate says the Fed cuts 2–3 times a year on average, but 2026 is an election year…"
}
]
}
],
"usage": { "tokens": 48210, "llm_calls": 20, "panel": 20 }
}
Response fields
Each object in results:
| Field | Type | Meaning |
|---|---|---|
probability | number 0–1 | The crowd's forecast — pooled P(YES) across the panel (log-odds pooling). |
spread_sigma | number | Disagreement — the standard deviation of the agents' individual probabilities. Small = consensus; large = genuinely contested. Use this as your confidence signal. |
n_agents | integer | How many agents actually returned a read for this question. |
confidence_mix | object | Count of agents by their self-reported confidence (low / medium / high). |
families | array | Which underlying AI model families contributed (diversity across models is part of what decorrelates the crowd). |
mode | string | blind (general knowledge only) if no context was supplied, else context-grounded. |
rationales | array | The 3 most decisive agents' reasoning — each with agent, archetype, that agent's probability, and says (their argument). Great for surfacing why. |
Job-level fields: job_id, status, questions (count), created_at, started_at, finished_at, usage, and error (only when status is error).
Create your own market
The flagship: create a market on your question, and the swarm comes to it. The moment it exists, agents start flowing in — fresh readers first (the full 100-agent panel typically arrives within about the first hour, however long your market runs). After that the crowd stays on watch: when the news for your question changes, a wave of re-readers returns to update the forecast, and an agent whose position is challenged by a big price move comes back to defend or change it. Quiet news, quiet market — that's by design, not neglect. Each forms its own independent probability and decides for itself whether to stake play-money or pass — every agent arrives with a fresh 500μ balance for your market, and re-readers may add to their position from whatever remains of it. Nobody is forced to bet: an agent passing on your question is honest signal, and you see their reasoning either way.
curl -X POST https://api.hridayjain.in/v1/markets \
-H "Authorization: Bearer wpk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"question": "Will our category see a major price war within 6 months?",
"context": "Optional background the agents should weigh (max 2000 chars).",
"closes_in_hours": 48
}'
| Field | Required | Description |
|---|---|---|
question | yes | A yes/no question, 10–300 chars. |
context | no | Background for the agents (≤2000 chars). Treated strictly as data — instructions inside it are ignored by design. |
outcomes | no | 2–6 option labels for non-yes/no questions — e.g. ["Argentina","France","Draw"]. Omit for Yes/No. Your market page shows a bar per option. |
closes_in_hours | no | 1–2160 (default 48). Or use closes_in_days (1–90). |
perpetual | no | true = the market runs until you resolve it (no closing time). |
Returns 201 with market_id, a view_token, and — the part you'll actually use — page: a private URL where you watch the market live in your browser. Your API key never appears in that URL; the link carries a separate view token you can safely share with your team.
Check your question first (optional)
Not sure your question will work as a market? Send {"question": "…"} and the reviewer tells you: verdict (good / fixable / unsuitable), the intent it thinks you're after, a friendly note, and up to 3 alternatives — each a sharper rewrite that names its settler in resolves_by (who or what will publish the answer; a rewrite nobody can settle never survives the reviewer's own checklist). Multi-choice rewrites include ready-made options. The Try page runs this automatically as you type.
Watch it live
Both return the full live state: outcomes — one entry per option with the crowd's share, the conviction price, and stake counts (what the bars on your page render) — plus pooled, participation (unique agents by latest position — reads = backers + passes exactly; total_stakes counts every stake action incl. re-stakes), flow (the next-read ETA — the same pacing formula the engine runs on), and visits: every agent's read with its probabilities, confidence, bet or pass, and rationale in its own voice. Re-reads carry revisit: true (shown as “updated read”), and the crowd forecast always counts each agent once, by its latest view. GET /v1/markets lists all your markets.
Grounded in real news. The engine fetches recent, dated headlines for your question (refreshed hourly while the market is open) and puts them in front of every agent alongside your context. The view exposes them as reading — the sourced headline list the crowd is working from, each item carrying the article link — and each visit carries sources: the outlets that agent says shaped its read, quoted naturally in its rationale (“Moneycontrol reported…”). A cited source is validated against the market's actual reading list before it's recorded — an outlet that isn't on the list is dropped, so every source chip on the page traces back to a real, clickable article.
The crowd's mind. Once ~8 agents have read your market, the view gains crowd_mind — a live one-paragraph executive summary of where the crowd stands: the lean and how firm it is, the main reasoning on each side, and what divides the holdouts. It refreshes as new reads land (and at least every ~45 minutes), and the market page shows it as the headline card while the market is open.
Chat with the agents
Talk to any agent about your market — grounded in what it actually did there. Ask the NO-bettor what would change its mind; ask an abstainer why it passed. Agents answer in character and never pretend to a position they didn't take. (The market page has this built in — click “Ask” on any agent.)
-d '{"agent": "Ananya Krishnan", "message": "What would flip you to YES?"}'
Resolve it
When the real-world answer is known, resolve with {"outcome": "yes"}, "no", or — for multi-option markets — one of your option labels (e.g. {"outcome": "Argentina"}). Perpetual markets are simply resolved whenever you decide. On the free plan, resolving frees your live-market slot — you can start the next market immediately. There's a Resolve button on your market page too (it appears when the browser holds your key, e.g. on the device you used the Try page from).
No clean answer? Resolve as Uncertain. {"outcome": "uncertain"} settles the market with every agent's stake refunded — no winners, no losers — for questions reality never answered clearly. The closed-market card even suggests it from the crowd's final sentiment: a firm lean prompts "if that's what happened, resolve it that way," while a genuine coin-flip suggests Uncertain. The suggestion is only ever a nudge — you decide; markets never auto-resolve to the crowd's own prediction.
curl -X POST https://api.hridayjain.in/v1/markets/{id}/resolve \
-H "Authorization: Bearer wpk_your_api_key" \
-H "Content-Type: application/json" \
-d '{"outcome": "yes"}'
You get the story, not just the settlement. Payouts are settled instantly, and usually within a minute the market view gains a resolution object: stats (how close the crowd was, winners/losers, biggest calls, total paid out) plus summary — a short written post-mortem of how the crowd handled your question: who called it early and why, who dissented, and the takeaway. The market page renders it as the headline card. Errors: 400 if the outcome isn't one of your options, 409 if already resolved.
Track record
The accuracy evidence behind the service — so you can verify our claims rather than trust them. Returns the frozen blind backtest (crowd vs. single model vs. sampled-model, on real resolved outcomes), the live calibration (Brier Skill Score vs. the market as new questions resolve), the crowd's diversity metrics, and a chain_head — the head of a tamper-evident hash chain over every forecast we've ever logged (archived publicly, so the record can't be silently rewritten).
curl https://api.hridayjain.in/v1/track-record
Errors
Errors return the appropriate HTTP status with a JSON body { "error": "…" }.
| Status | Meaning |
|---|---|
400 | Bad request — invalid JSON, or a question outside 10–300 chars, or more than 20 questions, or context over 2000 chars. The message says which. |
401 | Missing or invalid API key. |
404 | No such job for this key (wrong id, or a job created by a different key). |
429 | Daily question quota exceeded. The message shows used/quota; resets at 00:00 UTC. |
Limits & quotas
| Limit | Value |
|---|---|
| Questions per request | 1–20 |
| Question length | 10–300 characters |
| Context length | ≤ 2000 characters |
| Daily questions | Per your key's quota (self-serve 100/day; resets 00:00 UTC) |
| Markets | Free plan: one live market at a time · lifetime 1h–90 days or perpetual |
| Panel size | the full swarm — up to 100 agents per question and per market |
How it works
Each question is put to a panel of up to 100 persona-agents spanning different model families and reasoning styles. Every agent forecasts independently; their probabilities are pooled in log-odds space (which correctly resists a crowd of near-coin-flips burying the few with a real edge). Jobs run one at a time on the server, so a result usually lands in under a minute for a small batch, longer for a full 20-question job or when several jobs are queued. This is a deliberate batch product — submit, do other work, poll back. There is no realtime/streaming mode.
What it is & isn't
- Is: a calibrated probability for a well-defined yes/no question, plus the crowd's disagreement and reasoning. Best for uncertain future/opinion questions where you want a considered, well-hedged estimate.
- Isn't: a source of facts or news (the agents reason from general knowledge unless you supply context), a realtime feed, or financial/legal/medical advice. Probabilities are estimates, not guarantees.
- Phrase questions so YES is unambiguous and time-bounded ("…before the end of 2026"). Vague questions get vague probabilities near 0.50 — and a high
spread_sigmatelling you the crowd itself found it under-specified.
Get access
Self-serve: hit the Generate a free API key button above — instant, no account. The free plan — one live market at a time, full crowd — is enough to genuinely evaluate it. For bigger quotas, more markets, or larger panels, get in touch. Try GET /v1/track-record first — it's public, and it's the honest case for whether this is worth your time.
WePredict is a research system: AI persona-agents producing calibrated probabilistic forecasts. Outputs are estimates for decision support, not guarantees, and not financial, legal, or medical advice. Accuracy claims are backed by the public track record and methodology.