Get the current account's runs this billing cycle
GET/v1/users/me/usage
How many runs the account has made this billing cycle, and how many its plan includes. A run is one agent generation or one tool call — the unit every rung is priced in. Every tool call counts, including those an agent makes inside a generation; a client tool counts nothing.
Counted across the projects this account is the billing owner of, over the current UTC calendar month, from the meter itself. Archived projects are included: the runs they already made were made.
On the free plan the allowance is enforced. An account that has used it is refused 403 plan_limit_reached with resource: "runs" on everything that starts a generation and on a direct tool call — on its own provider credential as much as on a managed model, because a run is a run — until the billing month turns or it upgrades. On pro and business nothing is refused: runs past the allowance are billed at the overage rate those plans are sold with. A contract plan is not counted.
The other thing that stops a managed-model generation is a negative credit balance, which is GET /v1/users/me/billing, and it never applies to your own credential.
This route counts live; the refusal reads a figure counted every few minutes. So the two can differ by a burst: this is the more current number, and a refusal quotes the one it actually enforced.
It is also more expensive than the balance read: it asks the meter once per project. Poll it on the order of minutes, not seconds.
Responses
- 200
- 401
The account's runs for the cycle.
Missing or invalid credentials.