Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. By signing up you are subscribing to the APIs.io and API Evangelist
newsletters — you can unsubscribe from any issue. See our
Privacy Policy and Terms.
openapi: 3.2.0
info:
title: Anteproof Stats API
description: 'Read-only access to the Anteproof forecast archive: live forecasts, question detail, and the full calibration/launch-gate audit trail. Anteproof is a product of Recoilix LLC.'
version: 0.1.0
tags:
- name: Stats
paths:
/v1/stats:
get:
summary: Stats
description: 'Headline archive numbers for the public landing surface.
``data_as_of`` is the newest LIVE forecast''s own ``issued_at`` --
distinct from ``generated_at``, which is only when THIS RESPONSE was
built. A stalled forecaster and a healthy one answer identically on
``generated_at``; ``data_as_of`` is what lets the ops watcher tell
them apart. ``null`` on an empty archive, never today''s date.
``is_backtest = false`` is not optional here, the same way it is not
optional for ``live_forecasts`` two lines up: a pastcast sweep writes
backtest rows whose own ``issued_at`` can be newer than the live
forecaster''s last real run. Without the filter this field reports
fresh from a sweep while the live forecaster is stalled -- the exact
failure it exists to catch (caught in review by e0dad417 before
deploy, not by this file''s own test, which never seeded a backtest
row; see test_stats_data_as_of_ignores_backtest_rows).
This is "newest live forecast issued", NOT the import-freshness
stamp from #141 3c (imported_at/data_through). A monitor on this
field detects a stalled forecaster, not a stalled push.'
operationId: stats_v1_stats_get
responses:
'200':
description: Successful Response
content:
application/json:
schema:
additionalProperties: true
type: object
title: Response Stats V1 Stats Get
tags:
- Stats
components:
securitySchemes:
clerkSessionBearer:
type: http
scheme: bearer
bearerFormat: JWT
description: 'A Clerk session token, sent as `Authorization: Bearer <jwt>`. The signature (RS256, against the configured Clerk JWKS) and the expiry are verified; the issuer and the authorized party are also checked where they are configured. An operation marked with this scheme refuses a request that does not carry a valid session token. An Anteproof API key is not accepted in its place.'
anteproofApiKey:
type: apiKey
in: header
name: X-API-Key
description: 'An Anteproof API key (`ap_…`), created at https://anteproof.com/account. On the public operations in this document — the ones that list no security requirement — it may be sent either as `X-API-Key: ap_…` or as `Authorization: Bearer ap_…`. It is OPTIONAL on those: a request without it is served just the same, and a request with a live key is counted against the account''s monthly allowance (the reply then carries X-Api-Calls-Used, X-Api-Calls-Limit and X-Api-Calls-Reset). It is not a session credential: an operation marked `clerkSessionBearer` refuses it with 401, live key or not. An `ap_…` key that is invalid or revoked is refused with 401 on any operation in this document; otherwise the key is optional. Because no operation requires one, no operation in this document lists this scheme. The MCP endpoint at /mcp, which this document does not describe, requires a credential — an API key or an OAuth sign-in — for every call except discovery: a POST whose JSON-RPC messages are all `initialize`, `notifications/initialized`, `ping` or `tools/list` is served without one.'
stripeWebhookSignature:
type: apiKey
in: header
name: Stripe-Signature
description: 'Stripe''s webhook signature: `t=<unix>,v1=<hex hmac-sha256 of "<t>.<body>">`, checked against this endpoint''s signing secret with a five-minute tolerance on `t`. A request whose signature does not verify is refused with 401. This operation receives Stripe''s callbacks.'