Skip to content
Skip to Content
Docs
Entitlements

Get Usage Ledger

Read the calling organization's recorded AI usage for the current billing cycle: the credit total and which capabilities spent it, largest first, against the allowance the plan includes. credits_overage is what the cycle is past that allowance; charges_apply says whether an overage is actually charged, and is false while the AI quota is in its preview period or while the organization does not permit usage beyond its allowance.

GET
/entitlements/usage

Response Body

Successful Response

application/json
  1. response

One organization's usage for one billing cycle, and what it comes to.

period_key*Period Key
credits_used*Credits Used
allowance*

What the plan allows this cycle, as a tagged object rather than a nullable number. A null limit had to mean both 'no ceiling' and 'no entitlement', which is exactly how a cancelled organization came to be reported as unlimited. Read the kind, then the fields that kind carries.

credits_overage*Credits Overage

Credits beyond the included allowance: credits_used minus credits_included, floored at zero, and zero when the allowance is unlimited. Named for the rate card's own term, which is also what reaches the meter event and the invoice line, so a disputed bill and this payload use one word for one thing.

charges_apply*Charges Apply

Whether an overage in this cycle is actually charged. False while the AI quota is in its preview period, when usage is recorded and billed to nobody, and for an organization with no paid subscription, whose allowance is a hard stop. Separate from credits_overage because the two are different facts: one is the regime, the other is this cycle.

unattributed_credits*Unattributed Credits

Credits in credits_used that by_capability does not account for, floored at zero. Normally zero. It is positive for a cycle that was already in flight when per-capability counting began: the cycle total covers the whole period while the breakdown covers only the part after it, so the parts do not sum to the whole. Reported rather than hidden, because a breakdown that silently fails to add up is the one thing a screen built to be checkable must not do. Self-clearing: no cycle started after counting began can have it.

resets_at*|

When this period ends and the allowance renews: the 1st of next month (UTC) for an allowance counted per calendar month, otherwise the next billing-cycle boundary. Not derivable from period_key, which is the cycle's clamped start day and says nothing about the next boundary in a month too short to hold the anchor. Null when a billing-cycle allowance has no plan row to take an anchor from. The same instant getEntitlementStatus reports, from one helper.

by_capability*array<>

Largest consumer first. Empty when the cycle recorded none.

Example Request
curl -X GET 'https://api.bettermenu.live/entitlements/usage'
Example Response200
{  "period_key": "string",  "credits_used": 0,  "allowance": {    "kind": "string",    "credits": 0  },  "credits_overage": 0,  "charges_apply": true,  "unattributed_credits": 0,  "resets_at": "2019-08-24T14:15:22Z",  "by_capability": [    {      "capability": "string",      "credits": 0,      "requests": 0    }  ]}

Recipe in, FDA-format Nutrition Facts out, with every version kept.

Start freeNo card needed.