Skip to main content

Badges

Embeddable SVG status badges for a subnet's or provider's README — probe-derived only, never a self-reported number.

Last updated

Drop a live status badge in a README. The value comes from the same probes this site's own pages render — there is no way to supply your own number, so the badge is honest in a way a self-reported one can't be.

GET https://api.metagraph.sh/api/v1/subnets/{netuid}/badge.svg

Targets

PathValue
/api/v1/subnets/{netuid}/badge.svgthat subnet's own score
/api/v1/providers/{slug}/badge.svgthe mean across every subnet that provider builds

An unknown netuid/slug, or a target with no resolvable score yet, renders a neutral "n/a" badge at 200, never a 404 — an <img> embed should never visibly break, and GitHub's camo proxy caches 404s badly.

Metrics

?metric=MessageColor
readiness (default)integration readiness, e.g. 92/100green ≥80, amber 50–79, red <50
uptime (alias reliability)window uptime %, e.g. 99.83%by A–F reliability grade band
gradethe A–F reliability letter alone, e.g. Asame grade band as uptime
completeness (alias coverage)registry-profile completeness, e.g. 78/100green ≥80, amber 50–79, red <50
apiscount of callable API surfaces, e.g. 3 apisblue for >0, gray for 0

A provider badge averages readiness/completeness across its subnets, sums apis, and aggregates uptime/grade from the same underlying reliability data as every subnet it builds.

Styles

?style=Look
flat (default)rounded corners, subtle top-highlight gradient — the shields.io default look
flat-squaresame layout, square corners, no gradient
for-the-badge28px tall, uppercase, bold, letter-spaced, matte

?label= overrides the left "metagraphed" segment (max 40 characters; control characters are stripped).

Embedding

[![SN1 uptime](https://api.metagraph.sh/api/v1/subnets/1/badge.svg?metric=uptime)](https://metagraph.sh/subnets/1)

Every subnet detail page has a live preview + copyable snippet under its Embeddable badge section (metric and format pickers included) — the fastest way to get the exact URL right without hand-assembling query params.

Cache-friendly by design

Responses are cached for 3600s at the edge with stale-while-revalidate=3600 and a weak ETag — a README embed, or GitHub's own camo proxy re-fetching it, costs close to nothing once warm. Conditional requests (If-None-Match) get a bodyless 304 with the same validators.

Not part of the typed SDKs — plain HTTP, cacheable, no auth. Related: Feeds for a subnet's change history; For agents for the machine-readable index.