Docs

One endpoint family. One probability object.

Credence is an HTTPS JSON API (and an MCP server). Reference a market — by id, slug, URL, or token — and get back its captured market price, our calibrated probability, and group-conditional evidence strength. The API field is n_effective; it describes the historical cohort assigned to the forecast, not latent precision identified for this market. Each response is stamped with audit-grade lineage.

Access is gated ahead of public launch.

Authentication

Every request carries your key as a bearer token:

Authorization: Bearer cpk_...

Request an early-access key below. A missing or bad key returns 401 invalid_api_key.

Your first call

Resolve a market and read its probability object — the same call in curl and Python.

curl
curl -s -G "https://api.credence.at/v1/probabilities/0xabc123" \
  --data-urlencode "ref=market_id" \
  -H "Authorization: Bearer cpk_..."
python
import requests

r = requests.get(
    "https://api.credence.at/v1/probabilities/0xabc123",
    params={"ref": "market_id"},
    headers={"Authorization": "Bearer cpk_..."},
)
print(r.json()["probability"])

The response

{
  "request_id": "req_01hxyzs3ngl3prob4b1l1ty0001",
  "snapshot": {
    "snapshot_id": "api-forecast-1",
    "as_of": "2026-03-26T14:05:00Z",
    "freshness_sec": 4,
    "release_id": "rel_2026_03_26_140500",
    "model_version": "parity-v1.0",
    "methodology_version": "0803192fd6195800",
    "market_count": 1243
  },
  "probability": {
    "request": {
      "input": "0xabc123",
      "resolved_market_id": "0xabc123"
    },
    "as_of": "2026-03-26T14:05:00Z",
    "p_market": 0.58,
    "p_calibrated": 0.58,
    "n_effective": 2.0
  }
}

What comes back

  • request_id — unique id for this request.
  • snapshot — the immutable snapshot the answer came from: snapshot_id, as_of, freshness_sec, release_id, model_version, methodology_version, market_count.
  • probabilityrequest (your input + resolved_market_id), as_of, p_market, p_calibrated, and n_effective.

Evidence-strength semantics

n_effective is the API field for evidence strength. Under the parity model it is the floor value 2.0; calibrated models serve values fitted from historical cohort tables. Read it as “markets like this one,” never as an effective observation count or latent-precision estimate for this market.

Invariants you can rely on

  • p_market in [0,1]
  • p_calibrated in (0,1)
  • n_effective > 0

What the numbers mean

Endpoints

  • GET /v1/probabilities/{ref} — single lookup. ref resolves by market_id (default), token_id, slug, or url.
  • POST /v1/probabilities/query — batch lookup, up to 100 references in one call.
  • GET /v1/snapshots/current — current snapshot metadata (freshness, versions).
  • GET /v1/snapshots/{id}/probabilities — the currently served snapshot’s probabilities, paged by cursor; {id} must match the current snapshot.
  • GET /v1/markets — search and resolve markets.

Errors & rate limits

Standard HTTP status codes with a stable machine code in the body:

  • 400 invalid_request
  • 401 invalid_api_key
  • 404 market_not_found
  • 429 rate_limited (back off per the Retry-After header)
  • 503 temporarily_unavailable

Snapshot routes can also return snapshot_not_found / snapshot_expired. Requests are rate-limited per key; limits depend on your plan.

MCP-native

Credence also runs as an MCP server, so an agent calls it as native tools inside its own loop — no glue code:

  • get_probability — one market
  • query_probabilities — up to 100
  • search_markets — find the market

Same probability object as REST. Access is gated ahead of public launch.

Request access

Request API-key and MCP access ahead of public launch.