All endpoints on this page require a management key. Create one from Dashboard → Management Keys.
Check Your Balance
GET /v1/account/balance returns your current credit balance in dollars.
- Python
- Node.js
- cURL
Request Activity
GET /v1/account/activity returns a paginated list of individual request logs, including the model used, cost, and timestamp.
Parameters
- Python
- Node.js
- cURL
Pagination
To fetch all activity, incrementoffset by limit until the returned data array is empty:
Usage Analytics
GET /v1/account/analytics returns aggregated usage metrics over a time window. Results are cached server-side for 5 minutes.
Parameters
- Python
- Node.js
- cURL
The
X-Cache response header tells you whether the result was served from cache (HIT) or freshly computed (MISS). Analytics are cached for 5 minutes, so rapid repeated calls will return the same data without extra processing.Rate Limits
You can find more information about rate limits here.Common Use Cases
Low-balance alerts
Poll
/v1/account/balance every few minutes and send a Slack/email alert when balance drops below a threshold.Cost attribution
Use
/v1/account/activity to break down costs by model and time period for internal billing or chargeback.Usage dashboards
Feed
/v1/account/analytics into Grafana, Datadog, or a custom dashboard to visualize trends.Budget automation
Combine balance checks with key management to auto-disable keys when a budget threshold is reached.