Get usage stats
Mention and keyword counts for the current billing cycle, plus plan limits. Includes flex (usage-based) state when enabled. On the Agents plan a searches block reports the lifetime search allowance (used/limit/remaining).
Authorizations
Clerk API key. Create one in Settings → API Keys. Pass as Authorization: Bearer <key>. Keys carry a scope — read, write (implies read) or admin (implies write) — chosen when the key is minted. Each operation's security requirement (and its x-required-scope extension) names the minimum scope it needs; request the least-privileged key that covers the operations you call.
Response
200 response
Current-cycle usage counters and plan limits.
Current subscription plan (e.g. Free_trial, Pro_v3, Enterprise). null if no active plan / free trial expired. The *.limit numbers below already reflect this plan.
"Pro_v3"
AI-credit usage for the hosted agents this month. Recorded on every plan; enforcement (an AI_CREDITS_EXHAUSTED refusal at the allowance) is rolled out per workspace behind a flag. Your own MCP/API clients are not metered.
Lifetime on-demand search allowance. Only present on the Agents plan (the only plan with a lifetime search cap). Numbers come from the canonical quota read — identical to the X-Octolens-Searches-Remaining header on /api/v2/search* responses.
Flex (usage-based) pricing state. Only present when flex pricing is enabled for the org.
