Skip to content

Network Stats API

Public aggregate network analytics — total tokens processed, top models, and activity trends.

Return aggregate statistics about token consumption across the AnyRouter network: total tokens processed, the top models by consumption, and 24h/7d/30d activity trends. Every value is network-wide, never per-user.

GET/api/v1/analytics/network

This endpoint is public — no authentication is required.

Request

GET /api/v1/analytics/network takes no request parameters and no auth headers.

The snapshot includes:

  • Total tokens processed — input, output, cached, and reasoning tokens over the last 30 days.
  • Token burns — the top 15 models ranked by total token consumption (30-day window).
  • Activity trends — hourly token volumes for the last 24 hours, daily volumes for 7 and 30 days.

All data is purely aggregate. No per-user, per-workspace, or per-key data is ever returned. Model identifiers (model_id) are public catalog ids visible on the models page.

Response

{
  "generated_at": "2026-06-26T12:00:00.000Z",
  "totals": {
    "tokens": 1234567890,
    "requests": 50000,
    "prompt_tokens": 800000000,
    "completion_tokens": 400000000,
    "cached_tokens": 30000000,
    "reasoning_tokens": 4567890
  },
  "top_models": [
    {
      "model_id": "openai/gpt-4o",
      "model_name": "GPT-4o",
      "provider": "OpenAI",
      "rank": 1,
      "tokens": 500000000,
      "requests": 25000,
      "share": 0.4051
    }
  ],
  "trend": {
    "24h": [
      { "bucket": "2026-06-26 11:00", "tokens": 5000000, "requests": 200 }
    ],
    "7d": [
      { "bucket": "2026-06-25", "tokens": 80000000, "requests": 3200 }
    ],
    "30d": [
      { "bucket": "2026-06-01", "tokens": 40000000, "requests": 1600 }
    ]
  }
}
FieldTypeDescription
generated_atstring | nullISO 8601 timestamp of when the snapshot was computed. null before the first run.
totals.tokensnumberTotal tokens processed in the last 30 days.
totals.requestsnumberTotal inference requests in the last 30 days.
totals.prompt_tokensnumberInput tokens.
totals.completion_tokensnumberOutput tokens.
totals.cached_tokensnumberCached (prompt cache hit) tokens.
totals.reasoning_tokensnumberReasoning (chain-of-thought) tokens.
top_models[].model_idstringPublic catalog model identifier.
top_models[].model_namestringHuman-readable model name.
top_models[].sharenumberFraction of total tokens consumed (0–1, 4 dp).
trend["24h"]arrayHourly buckets for the last 24 hours ("YYYY-MM-DD HH:00").
trend["7d"]arrayDaily buckets for the last 7 days ("YYYY-MM-DD").
trend["30d"]arrayDaily buckets for the last 30 days ("YYYY-MM-DD").

Examples

curl https://anyrouter.dev/api/v1/analytics/network
import httpx

stats = httpx.get("https://anyrouter.dev/api/v1/analytics/network").json()
print("Tokens (30d):", stats["totals"]["tokens"])
for m in stats["top_models"][:5]:
    print(m["rank"], m["model_name"], m["tokens"])
const stats = await (
  await fetch("https://anyrouter.dev/api/v1/analytics/network")
).json()
console.log("Tokens (30d):", stats.totals.tokens)

Caching

The snapshot is computed every 10 minutes by a background workflow and served with:

Cache-Control: public, max-age=600, s-maxage=600

The generated_at field shows exactly when the data was last refreshed.

A visual representation of this data is live at anyrouter.dev/network — a dashboard with the total-token counter, token-burn bar chart, and trend sparklines.