Levain LabsLevain Labs
API ReferenceAnalytics

Hourly Usage

Hourly usage broken down by agent, model, and provider.

GET
/api/v1/analytics/hourly

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Query Parameters

start?|null
end?|null
agent_id?|null

Header Parameters

X-API-Key?string|null

Response Body

application/json

application/json

curl -X GET "https://api.levainlabs.com/api/v1/analytics/hourly"
[
  {
    "hour": "2019-08-24T14:15:22Z",
    "agent_id": "string",
    "model": "string",
    "provider": "string",
    "cost_usd": 0,
    "tokens_in": 0,
    "tokens_out": 0,
    "request_count": 0,
    "error_count": 0
  }
]
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}