Analytics API
Aggregated analytics endpoints.
Aggregated spend and analytics endpoints for dashboards and reporting.
Summary
GET /api/v1/analytics/summaryQuery params: from, to (time range)
Returns total spend, count, and aggregated stats for the team.
Timeseries
GET /api/v1/analytics/timeseriesSpend over time (bucketed by hour/day). Params: from, to, granularity.
By Agent
GET /api/v1/analytics/by-agentSpend breakdown by agent. Params: from, to, limit.
By Category
GET /api/v1/analytics/by-categorySpend breakdown by category (e.g., llm, api, data).
By Endpoint
GET /api/v1/analytics/by-endpointSpend breakdown by endpoint/domain.
By Network
GET /api/v1/analytics/by-networkSpend 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.