Docs

Get Ai Usage

GET /usage/ai

GET/usage/ai

Returns the organization's AI usage for the current period, measured in AI credits: allowance (core seats times quantityPerSeat), used and overage (live, read from the AI service), overageReported (what was last reported to Stripe), call counts, the policy (HardStop when none is set), and usage by feature. The period is the core subscription's billing period when it carries the AI meter, otherwise the calendar month (UTC); carriesMeter false means overage cannot be billed, so usage stops at the allowance whatever the policy says. unpricedCalls counts calls with no model rate in effect, which add no credits. overagePrice is the price per credit, null when none is configured. Requires OrganizationAdmin. Change the policy with Usage_UpdateAiPolicy.

Response

FieldTypeDescription
periodGetAiUsageResponsePeriodInfo
policystring| null
isTrialboolean
carriesMeterboolean
coreSeatsinteger
quantityPerSeatinteger
allowancenumber
usednumber
overagenumber
overageReportednumber| null
lastReportedAtdate-time| null
callsinteger
unpricedCallsinteger
overagePriceGetAiUsageResponseOveragePriceInfo
featuresGetAiUsageResponseFeatureUsage[]| null

GetAiUsageResponsePeriodInfo

FieldTypeDescription
startdate-time
enddate-time

GetAiUsageResponseOveragePriceInfo

FieldTypeDescription
perCreditnumber
currencystring| null

GetAiUsageResponseFeatureUsage

FieldTypeDescription
featureKeystring| null
usednumber
callsinteger
unpricedCallsinteger