API reference / Computer
Get the AI plan's usage
How much of its AI plan the organization has used: the account it is signed in as, each usage window with the share used and when it resets, and whether it is out of usage. Read on the workspace's computer, where the plan's credentials stay, and kept for up to 5 minutes. Plans Troopy can't read yet answer with supported false. Needs a connected plan.
/api/v1/computer/connection/usageOther ways to call it
troopy ai usagetroopy_get_ai_usageQuery parameters
planstringWhich of the organization's AI plans, by id. The default plan when left out
Response
200 · application/jsondata*object10 properties
plan*stringAn AI plan's id, from GET /ai-plans
provider*enum<string>The AI plan the organization's teammates run on
claudechatgptgeminigrokcopilotopenrouterzaikimiminimaxqwenanthropicopenaicursor
supported*booleanWhether Troopy can read this plan's usage. When false, only the provider's own site can say
email*string | nullThe account the plan is signed in as
tier*string | nullThe plan's tier at the provider, like pro
signInExpiresAt*string | nullWhen the sign-in lapses unless the provider's CLI renews it first
limits*array<object>Each usage window, shortest first, like a 5-hour and a weekly limit
3 properties
label*stringusedPercent*numberresetsAt*string | nulllimitReached*booleanTrue while the plan is out of usage: teammates can't run on it until a limit resets
bankedResets*integer | nullLimit resets the account has banked and can spend early
checkedAt*stringWhen the computer last read these numbers. They are kept for up to 5 minutes