Overview
The Usage API aggregatesusage_events into an on-demand invoice draft for an organization. It is scoped to organization owners and admins and covers a caller-specified billing period.
Base URL
Authorization header. See Authentication for details.
Endpoints
Get usage summary
Dimensions:
With
group_by, the response also carries:
bot/day reject those two with invalid_group_by; the web dashboard then retries with the first four.
Response:
Your usage windows
GET /api/v1/me/usage (see Me API) also reports the caller’s Allternit Cloud inference spend in three windows, and how fast it is being used. The window fields use snake_case keys. The older weekly fields on the same reply keep their names.
used_usdis Cloud inference spend at the price charged to the user (cost_usdininference_usage). Hosted computer time is not counted; it keeps its own hour allowance.limit_usdandused_ratioarenullwhen the plan has no limit for that window (for example a no-plan account).enforcedistruefor the5hand7dwindows on paid plans. The month window shows the plan’s credit grant and is not a stop.pace.statusisok,warn(at the current burn the window runs out before it resets) orout(already used up).runs_out_atisnullunless the window will run out.burn_per_houris the spend per hour over the window so far.
Limits per plan
The limits are USD of Cloud inference spend. The month limit equals the plan’s monthly credit grant.
A Free account has no plan and no limits. Admin accounts are exempt: no window is enforced for them. Only an
active or trialing Plus, Max or Ultra plan is limited.
When a window is used up
A Cloud request made while an enforced window is used up is refused with HTTP429:
window is 5h or 7d. resets_at is when that window frees up. Clients show a notice with the reset time and never print the raw error. The same check applies to model-router calls billed to the viewer.
The refusal is skipped when the account has turned on carry_past_windows and its credit balance is above 0. The request then runs and is billed from the balance. Credits themselves still answer 402 credits_exhausted at 0.
Credits carry-over setting
carry_past_windows is stored on user_credits (migration 168) and is false until the person turns it on. Off: the 5-hour and 7-day windows are hard stops until they reset. On: work continues past a window and is billed from the credit balance. The Usage page switch saves this value. GET reads false for an account with no credits row. PUT answers 409 (“Add usage credits first.”) for an account with no credits row.