Endpoints at a glance
| Endpoint | What it returns |
|---|---|
GET /v1/account/balance | Current account balance |
GET /v1/account/activity?days=N | Requests, token usage, costs, top models, and per-key activity |
Why These Endpoints Matter
Use them to:- monitor remaining funds before expensive operations
- analyze usage by model, day, or API key
- build internal dashboards or budget alerts
- attribute spend across projects or environments
Get Balance
Get Activity
- total requests and total cost
- token usage
- daily breakdowns
- top models
- per-key usage
days query parameter to control the lookback window. The supported range is 1-30, with a default of 30.
Results are cached briefly for performance, so clients should avoid assuming fully uncached real-time aggregation.
Practical Uses
- trigger low-balance alerts
- find the most expensive model families in the last week or month
- compare production vs staging usage if each environment has its own API key
- attribute spend back to teams or internal services