SENTINEL Docs

Analytics API

Aggregated analytics endpoints.

Aggregated spend and analytics endpoints for dashboards and reporting.

Summary

GET /api/v1/analytics/summary

Query params: from, to (time range)

Returns total spend, count, and aggregated stats for the team.

Timeseries

GET /api/v1/analytics/timeseries

Spend over time (bucketed by hour/day). Params: from, to, granularity.

By Agent

GET /api/v1/analytics/by-agent

Spend breakdown by agent. Params: from, to, limit.

By Category

GET /api/v1/analytics/by-category

Spend breakdown by category (e.g., llm, api, data).

By Endpoint

GET /api/v1/analytics/by-endpoint

Spend breakdown by endpoint/domain.

By Network

GET /api/v1/analytics/by-network

Spend breakdown by blockchain network (e.g., eip155:8453).

Example Response (Summary)

{
  "totalSpend": "123.45",
  "count": 42,
  "byAgent": {
    "agent-1": { "spend": "80.00", "count": 25 }
  },
  "byEndpoint": {
    "api.example.com": { "spend": "50.00", "count": 10 }
  }
}

curl Example

curl -H "Authorization: Bearer val_xxx" \
  "https://api.valeo.money/v1/analytics/summary?from=1700000000000&to=1700086400000"

Analytics is also provided by the SDK's SentinelDashboard and standalone query functions (spendByAgent, topSpenders, etc.) running against local storage.