beacons.fyi API Docs
Verifiable reputation scores for every paid endpoint in the agentic economy.
Introduction
beacons.fyi is a reputation and quality oracle for AI services. Given any paid API or MCP endpoint, beacons.fyi returns a verifiable trust score backed by synthetic accuracy probing, opt-in transaction telemetry, and a staked verifier network. Your agent gets a ground-truth answer to is this service any good, and will it rip me off? — before it commits funds.
Scores are identity-anchored (bound to a non-spoofable AP2 DID so reputation cannot be reset), verifiable (every snapshot is attested on-chain by an EigenLayer AVS), and cross-marketplace (neutral infrastructure, not owned by any single platform).
Identity
AP2 / FIDO
Who is the agent?
Payments
x402 / Stripe
How does money move?
Reputation
beacons.fyi
Is the service any good?
The core mental model: a GET /v1/score before the x402 POST. Pair it with conditional escrow and payment only releases if the result passes your declared criteria — no trusted intermediary required.
Quickstart
Get your API key from the dashboard and make your first score query in under a minute. Free-tier keys are issued immediately — no credit card required.
1 — Obtain an API key
Sign up at beacon.hq/dashboard. Live keys start with bsn_live_; sandbox keys with bsn_test_. Pass the key in every request as a Bearer token.
2 — Query a score
# URL-encode the endpoint path component curl https://api.beacon.hq/v1/score/api.weather-ai.com%2Fv1%2Fforecast \ -H 'Authorization: Bearer bsn_live_…'
// Works in Node 18+, Deno, Bun, and modern browsers const endpoint = encodeURIComponent('api.weather-ai.com/v1/forecast') const res = await fetch(`https://api.beacon.hq/v1/score/${endpoint}`, { headers: { 'Authorization': `Bearer ${process.env.BEACON_API_KEY}`, }, }) const score = await res.json() // Route only if the score clears your gate if (score.trust_score < 70 || score.scam_flag) throw new Error('Endpoint does not meet trust threshold')
3 — Inspect the response
{"endpoint":"api.weather-ai.com/v1/forecast","trust_score":87,"grade":"A","accuracy":0.94,"uptime_pct":99.72,"latency_p95_ms":143,"dispute_rate":0.002,"scam_flag":false,"sample_size":142830,"confidence":0.98,"identity":"did:ap2:0x4f3b…","last_updated":"2025-06-28T14:22:01Z","attestation_ref":"0xabc123…"}
Authentication
All beacons.fyi API requests must be authenticated using an API key passed as a Bearer token in the Authorization header.
Authorization: Bearer bsn_live_••••••••••••••••
| Prefix | Environment | Notes |
|---|---|---|
bsn_live_ | Production | Counts against your plan quota. Use in server-side code only. |
bsn_test_ | Sandbox | Returns synthetic fixture data. Free, unlimited, no quota. |
Never expose a live key in client-side JavaScript. Use environment variables (BEACON_API_KEY) and proxy requests through your backend.
Error codes
| Status | Code | Meaning |
|---|---|---|
| 401 | unauthorized | Missing or invalid API key. |
| 403 | forbidden | Key is valid but lacks permission for this resource. |
| 404 | endpoint_not_found | No score data exists for this endpoint ID. |
| 422 | validation_error | Request body failed schema validation. |
| 429 | rate_limited | Too many requests. Check Retry-After header. |
| 500 | internal_error | Beacon-side fault. Check status.beacon.hq. |
The Score Object
Every endpoint that returns score data uses the same canonical object. Fields are always present unless noted as optional.
| Field | Type | Range / format | Description |
|---|---|---|---|
trust_score | integer | 0 – 100 | Composite reputation score. ≥ 80 = grade A; < 40 triggers automatic scam-flag review. |
accuracy | float | 0.0 – 1.0 | Fraction of synthetic probe challenges the endpoint answered correctly in the rolling window. |
uptime_pct | float | 0.0 – 100 | 30-day rolling uptime percentage derived from continuous availability probes. |
latency_p95_ms | integer | ≥ 0 | p95 response latency in milliseconds, measured at the Beacon probe edge. |
dispute_rate | float | 0.0 – 1.0 | Fraction of transactions for this endpoint that resulted in a filed dispute in the last 90 days. |
scam_flag | boolean | true | false | Set true when heuristics or staked verifiers flag the endpoint as likely fraudulent. |
sample_size | integer | ≥ 0 | Total number of telemetry data points (probes + receipts) contributing to the current score. |
confidence | float | 0.0 – 1.0 | Statistical confidence in the score. Low values indicate sparse data; treat with caution. |
identity | string | AP2 DID | The non-spoofable AP2 decentralised identity the score is anchored to. Prevents reputation reset. |
last_updated | string | ISO 8601 | UTC timestamp of the most recent score computation. |
attestation_ref | string | hex string | Reference to the EigenLayer / EAS on-chain attestation that backs this score snapshot. |
Full example object
{"endpoint":"api.weather-ai.com/v1/forecast","trust_score":87,"grade":"A","accuracy":0.94,"uptime_pct":99.72,"latency_p95_ms":143,"dispute_rate":0.002,"scam_flag":false,"sample_size":142830,"confidence":0.98,"identity":"did:ap2:0x4f3b8a…","last_updated":"2025-06-28T14:22:01Z","attestation_ref":"0xabc123def456…"}
All requests go to https://api.beacon.hq. Every request requires an Authorization: Bearer <key> header. Responses are application/json.
GET/v1/score/{endpoint_id}
Returns the current trust score for a single endpoint. The endpoint_id must be the URL-encoded hostname + path of the target service.
Path parameters
endpoint_idreq | string | URL-encoded endpoint identifier, e.g. api.weather-ai.com%2Fv1%2Fforecast. |
Query parameters
fresh | boolean | Bypass the 60-second cache and trigger an on-demand probe. Counts against quota. |
fields | string | Comma-separated list of score object fields to include. Reduces payload size for high-frequency routing. |
curl 'https://api.beacon.hq/v1/score/api.llm-router.com%2Fv1%2Fchat?fresh=true&fields=trust_score,scam_flag' \ -H 'Authorization: Bearer bsn_live_…'
POST/v1/score/batch
Score multiple endpoints in a single round-trip. POST a list of endpoint IDs and receive results ranked by trust_score descending — designed for agent routing loops that need to select the best available service from a candidate set. Maximum 50 IDs per request. Requires Pro or Enterprise.
Request body
idsreq | string[] | Array of URL-encoded endpoint IDs. Max 50. |
min_score | number | Filter: only return endpoints with trust_score ≥ this value. |
exclude_scam | boolean | Exclude endpoints where scam_flag is true. Defaults to true. |
curl https://api.beacon.hq/v1/score/batch \ -X POST \ -H 'Authorization: Bearer bsn_live_…' \ -H 'Content-Type: application/json' \ -d '{ "ids": ["svc-a.com", "svc-b.com", "svc-c.com"], "min_score": 70 }'
{"best":"svc-b.com","count":3,"ranked":[…array of Score Objects, sorted by trust_score desc…]}
POST/v1/receipt
Submit a signed transaction receipt to contribute telemetry to beacons.fyi's scoring pipeline. Receipts feed directly into accuracy and dispute-rate calculations. The signature must be produced by the payer's AP2 identity key so Beacon can bind the data point to a non-spoofable identity.
Request body
endpoint_idreq | string | The endpoint that served this transaction. |
outcomereq | "success"|"failure"|"disputed" | Result of the transaction as reported by the payer agent. |
latency_msreq | number | Observed end-to-end latency in milliseconds. |
amount | number | Amount paid in USD. Weights the receipt by economic stake. |
disputed | boolean | True if the payer has opened a formal dispute on this transaction. |
signaturereq | string | Base64-encoded Ed25519 signature of the canonical receipt payload, produced by the payer AP2 key. |
curl https://api.beacon.hq/v1/receipt \ -X POST \ -H 'Authorization: Bearer bsn_live_…' \ -H 'Content-Type: application/json' \ -d '{ "endpoint_id": "api.weather-ai.com/v1/forecast", "outcome": "success", "latency_ms": 182, "amount": 0.002, "disputed": false, "signature": "base64EncodedSig…" }'
{"receipt_id":"rcpt_01j9zb…","status":"accepted","queued_at":"2025-06-28T14:25:11Z"}
GET/v1/attestation/{id}
Retrieve the full on-chain attestation backing a score. Each score snapshot is attested by beacons.fyi's EigenLayer AVS and posted to the Ethereum Attestation Service (EAS). Use attestation_ref from any Score Object as the id path parameter. Any party can independently verify the score without trusting beacons.fyi's API.
{"id":"0xabc123def456…","endpoint_id":"api.weather-ai.com/v1/forecast","trust_score":87,"attested_at":"2025-06-28T14:22:01Z","attester":"beacon-avs-v2","chain":"ethereum","eas_uid":"0xdef456…","avs_operator":"0x7f3a…","explorer_url":"https://easscan.org/attestation/view/0xdef456…"}
Conditional Escrow
beacons.fyi's optional escrow module lets a payer agent lock funds before calling an endpoint, then release or refund them atomically once beacons.fyi's verifiers attest the result against declared criteria — without a trusted intermediary. Available on Enterprise plans.
Deposit
Payer locks funds in a beacons.fyi escrow smart contract referencing a criteria hash (e.g. trust_score ≥ 80, scam_flag: false).
Call endpoint
Agent proceeds with the x402 call. beacons.fyi records the attempt and monitors outcome and latency.
AVS attestation
Beacon's staked verifier network attests pass or fail against declared criteria within the SLA window. Slashing punishes false reports.
Atomic settlement
Pass → funds release to endpoint. Fail → funds refund to payer. No intermediary holds the keys at any point.
// 1 — Check score before opening escrow const score = await beacon.score('api.weather-ai.com/v1/forecast') // 2 — Open escrow with structured criteria const escrow = await beacon.escrow.open({ endpoint: 'api.weather-ai.com/v1/forecast', amount: 0.05, criteria: { trust_score: { gte: 80 }, scam_flag: false, }, }) // 3 — Settlement is automatic; poll or use webhook console.log(escrow.id, escrow.status) // "pending_attestation"
Rate Limits & Pricing
Rate limits
| Tier | Requests / min | Daily cap | Burst ceiling |
|---|---|---|---|
| Free | 10 | 1,000 | 20 |
| Pro | 200 | 100,000 | 500 |
| Enterprise | Custom | Unlimited | Custom |
Rate-limit headers on every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (Unix timestamp). A 429 includes Retry-After.
Plans
| Tier | Price | Reads / mo | Overage | Support |
|---|---|---|---|---|
| Free | $0 | 1,000 / mo | ||
| ProPopular | $99 / mo | 100,000 / mo | ||
| Enterprise | Custom | Unlimited |
Reads are free to start so your agents can query beacons.fyi everywhere. You pay as volume and verification needs grow. Pro includes 100k reads/mo; additional queries at $0.001 / query.
SDKs
First-party SDKs handle authentication, retries, pagination, and response typing. All are open-source, MIT-licensed, and published to their respective package registries.
npm install @beacon/sdkpip install beacon-sdkgo get beacon.hq/sdkThe TypeScript SDK ships full type definitions for all request and response objects. The Python SDK supports both sync and async/await usage. The Go SDK is idiomatic Go with context support and automatic retries.
Ready to integrate?
Get your API key and start routing with confidence in minutes.