Authentication and limits
| Tier | Requests/day | Freshness tolerance |
|---|---|---|
| Free / no key | 50 | 60 minutes |
| Pro / X-InfraBench-Key | 5,000 | 15 minutes |
| Enterprise / X-InfraBench-Key | Unlimited | 5 minutes |
API v1
InfraBench executes a live probe from the nearest regional runtime, applies latency and slot-freshness gates, and returns either READY with an endpoint handoff or ABSTAIN with machine-readable rationale. Review the evidence methodology.
Open API playgroundCompare API tiersWhy this API exists
Most RPC routing is based on marketing claims or one-time benchmarks. InfraBench returns either READY with a verified endpoint and evidence chain, or ABSTAIN with the specific failed gate, so callers can fail safely instead of routing on stale data.
The decision is deterministic. The same evidence produces the same outcome; operators can read the rationale, reproduce the score, and attach the decision to an audit trail.
If InfraBench abstains, the caller must use its configured fallback. Routing on a null endpoint is a logic error, not a handled edge case.
| Tier | Requests/day | Freshness tolerance |
|---|---|---|
| Free / no key | 50 | 60 minutes |
| Pro / X-InfraBench-Key | 5,000 | 15 minutes |
| Enterprise / X-InfraBench-Key | Unlimited | 5 minutes |
GET /api/v1/routeLive regional route decision with READY or ABSTAIN rationale.
GET /api/v1/agent/routeMinimal snapshot-backed decision for transaction agents.
GET /api/v1/providersCurrent provider, region, confidence, and availability evidence.
GET /api/v1/leaderboardWorkload-specific composite comparison.
GET /api/v1/historyProvider history for charting and audit.
GET /api/v1/thresholdsVersioned routing and ledger threshold history.
const res = await fetch(
"https://infrabench-ruddy.vercel.app/api/v1/route?region=Frankfurt,Germany&workload=trading&rttBudgetMs=45"
);
const data = await res.json();
if (data.decision === "READY") {
const rpcEndpoint = data.winner.endpoint;
} else {
console.error("InfraBench abstained:", data.rationale[0].message);
}import httpx
response = httpx.get(
"https://infrabench-ruddy.vercel.app/api/v1/route",
params={"region": "Frankfurt,Germany", "workload": "reads"},
)
decision = response.json()
print(decision["decision"], decision["rationale"])| Parameter | Type | Requirement | Meaning |
|---|---|---|---|
| region | string | required | City, country, or supported geographic label. |
| workload | string | required | reads, trading, indexing, or mev. |
| rttBudgetMs | number | optional | Maximum acceptable p95 RTT. Defaults to the selected workload budget and overrides it when supplied. |
| slotDriftMax | number | optional | Maximum accepted slot drift, 1-20. Default 3 slots. |
| providers | string | optional | Comma-separated provider IDs. |
GET /api/v1/history accepts providerId (or legacy provider), optional region, days from 1-30, and metric equal to p95rtt, slotdrift, or score. It returns both the full evidence points and a chart-ready timestamp/value series.
Threshold registry
Routing and ledger gates no longer live only as inline constants. The current live policy is thresholds-2026-06-16, effective 2026-06-16T00:00:00.000Z, authored by InfraBench maintainers.
| Workload | Max p95 RTT | Max slot drift | Min success | WebSocket evidence | WebSocket success floor |
|---|---|---|---|---|---|
| reads | 150 ms | 3 | 95% | Not required | N/A |
| trading | 45 ms | 3 | 95% | Not required | N/A |
| indexing | 150 ms | 3 | 95% | Not required | N/A |
| mev | 100 ms | 3 | 95% | Required | 95% |
Initial audited extraction of live routing and ledger thresholds from inline constants into a versioned policy registry. Values are unchanged from the previously deployed governance contract.
Building on InfraBench
The agent route uses the latest governed snapshot and returns only decision, endpoint, score, and timestamp. Set X-Agent-Id for caller correlation and read X-InfraBench-Score without parsing the body.
async function endpointForBatch(agentId: string) {
const response = await fetch(
"https://infrabench-ruddy.vercel.app/api/v1/agent/route?region=fra1&workload=trading&rttBudgetMs=80&slotDriftMax=3",
{ headers: { "X-Agent-Id": agentId } }
);
const route = await response.json();
if (route.decision !== "READY" || !route.endpoint) {
throw new Error("InfraBench abstained; halt or use the configured fallback.");
}
return route.endpoint;
}HTTP 400 indicates invalid parameters, 429 indicates rate limiting, and 500/503 indicates unavailable infrastructure. READY and ABSTAIN both return HTTP 200. Treat rationale codes ending in _FAILED or _MISSING as explicit governance blocks; do not infer an endpoint when winner is null.
| HTTP | Code | Suggested handling |
|---|---|---|
| 400 | INVALID_ROUTE_PARAMETERS | Correct missing or malformed query parameters. |
| 200 | NO_ELIGIBLE_PATH | Honor ABSTAIN and use the caller's configured fallback. |
| 429 | RATE_LIMITED | Wait for retryAfterSeconds or use an API tier. |
| 500 | ROUTE_DECISION_FAILED | Do not infer a winner; retry or use a static fallback. |
| 503 | HISTORY_UNAVAILABLE | Historical storage is temporarily unavailable. |