API ReferenceAnalytics
Timeseries By Agent
Cost over time, split per agent.
Each point is one agent's cost within one time bucket. Points with no agent represent platform or otherwise unattributed activity. Hour granularity is capped to 30 days; day to 365 days.
Authorization
HTTPBearer AuthorizationBearer <token>
In: header
Query Parameters
granularity?Granularity
Default
"day"Value in
"hour" | "day"start?|null
end?|null
Header Parameters
X-API-Key?string|null
Response Body
application/json
application/json
curl -X GET "https://api.levainlabs.com/api/v1/analytics/timeseries/by-agent"[
{
"bucket": "2019-08-24T14:15:22Z",
"agent_id": "string",
"agent_name": "string",
"agent_slug": "string",
"cost_usd": 0,
"billed_usd": 0
}
]{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}