beacon.shDocs
v1 · Stable

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

curl
# URL-encode the endpoint path component
curl https://api.beacon.hq/v1/score/api.weather-ai.com%2Fv1%2Fforecast \
  -H 'Authorization: Bearer bsn_live_…'
TypeScript / fetch
// 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

200 OK — application/json
{
"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 header
Authorization: Bearer bsn_live_••••••••••••••••
PrefixEnvironmentNotes
bsn_live_ProductionCounts against your plan quota. Use in server-side code only.
bsn_test_SandboxReturns 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

StatusCodeMeaning
401unauthorizedMissing or invalid API key.
403forbiddenKey is valid but lacks permission for this resource.
404endpoint_not_foundNo score data exists for this endpoint ID.
422validation_errorRequest body failed schema validation.
429rate_limitedToo many requests. Check Retry-After header.
500internal_errorBeacon-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.

FieldTypeRange / formatDescription
trust_scoreinteger0 – 100Composite reputation score. ≥ 80 = grade A; < 40 triggers automatic scam-flag review.
accuracyfloat0.0 – 1.0Fraction of synthetic probe challenges the endpoint answered correctly in the rolling window.
uptime_pctfloat0.0 – 10030-day rolling uptime percentage derived from continuous availability probes.
latency_p95_msinteger≥ 0p95 response latency in milliseconds, measured at the Beacon probe edge.
dispute_ratefloat0.0 – 1.0Fraction of transactions for this endpoint that resulted in a filed dispute in the last 90 days.
scam_flagbooleantrue | falseSet true when heuristics or staked verifiers flag the endpoint as likely fraudulent.
sample_sizeinteger≥ 0Total number of telemetry data points (probes + receipts) contributing to the current score.
confidencefloat0.0 – 1.0Statistical confidence in the score. Low values indicate sparse data; treat with caution.
identitystringAP2 DIDThe non-spoofable AP2 decentralised identity the score is anchored to. Prevents reputation reset.
last_updatedstringISO 8601UTC timestamp of the most recent score computation.
attestation_refstringhex stringReference to the EigenLayer / EAS on-chain attestation that backs this score snapshot.

Full example object

Score object — full example
{
"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…"
}
Endpoints

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_idreqstringURL-encoded endpoint identifier, e.g. api.weather-ai.com%2Fv1%2Fforecast.

Query parameters

freshbooleanBypass the 60-second cache and trigger an on-demand probe. Counts against quota.
fieldsstringComma-separated list of score object fields to include. Reduces payload size for high-frequency routing.
Request
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

idsreqstring[]Array of URL-encoded endpoint IDs. Max 50.
min_scorenumberFilter: only return endpoints with trust_score ≥ this value.
exclude_scambooleanExclude endpoints where scam_flag is true. Defaults to true.
Request
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 }'
Response
{
"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_idreqstringThe endpoint that served this transaction.
outcomereq"success"|"failure"|"disputed"Result of the transaction as reported by the payer agent.
latency_msreqnumberObserved end-to-end latency in milliseconds.
amountnumberAmount paid in USD. Weights the receipt by economic stake.
disputedbooleanTrue if the payer has opened a formal dispute on this transaction.
signaturereqstringBase64-encoded Ed25519 signature of the canonical receipt payload, produced by the payer AP2 key.
Request
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…"
  }'
Response — 201 Created
{
"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.

Response — 200 OK
{
"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.

1

Deposit

Payer locks funds in a beacons.fyi escrow smart contract referencing a criteria hash (e.g. trust_score ≥ 80, scam_flag: false).

2

Call endpoint

Agent proceeds with the x402 call. beacons.fyi records the attempt and monitors outcome and latency.

3

AVS attestation

Beacon's staked verifier network attests pass or fail against declared criteria within the SLA window. Slashing punishes false reports.

4

Atomic settlement

Pass → funds release to endpoint. Fail → funds refund to payer. No intermediary holds the keys at any point.

Escrow — TypeScript SDK
// 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

TierRequests / minDaily capBurst ceiling
Free101,00020
Pro200100,000500
EnterpriseCustomUnlimitedCustom

Rate-limit headers on every response: X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset (Unix timestamp). A 429 includes Retry-After.

Plans

TierPriceReads / moOverageSupport
Free$01,000 / mo
ProPopular$99 / mo100,000 / mo
EnterpriseCustomUnlimited

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.

JavaScript / TypeScriptnpm install @beacon/sdk
Pythonpip install beacon-sdk
Gogo get beacon.hq/sdk

The 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.

Get API key