Read the workspace AI usage snapshot
Returns the current AI usage snapshot for the workspace and the calling user, including the balance and whether top-up packs are available. Any workspace member with a Clerk session may call it; API keys are rejected.
apiKeyAuthorizationBearer <snoze_sk_…>Workspace API key created in Workspace settings → API keys. Scopes on the key bound what it can read and write.
workspaceId*stringSuccess
application/json- response
data*curl -X GET 'https://api.snoze.dev/v1/workspaces/string/billing/ai-usage'{ "data": { "plan": "free", "unlimited": true, "monthly": { "capMicrousd": 0, "usedMicrousd": 0, "remaining": 0, "refillsAt": "string" }, "includedMonthlyMicrousd": 0, "burst": { "capMicrousd": 0, "usedMicrousd": 0, "remaining": 0, "refillsAt": "string" }, "auto": { "enabled": true, "window": { "capMicrousd": 0, "usedMicrousd": 0, "remaining": 0, "refillsAt": "string" }, "daily": { "capMicrousd": 0, "usedMicrousd": 0, "remaining": 0, "refillsAt": "string" } }, "onboardingGrantActive": true, "topupBalanceMicrousd": 0, "topupsAvailable": true, "typicalTurnMicrousd": 0, "credits": { "usedCredits": 0, "totalCredits": 0, "remainingCredits": 0, "includedCredits": 0, "topupCredits": 0, "percentUsed": 0, "thresholds": [ 0 ], "thresholdReached": 0, "refillsAt": "string", "editors": 0, "freeMembers": 0, "perEditorCredits": 0, "perFreeMemberCredits": 0, "member": { "usedCredits": 0, "capCredits": 0 }, "grace": { "dailyCredits": 0, "usedTodayCredits": 0, "remainingCredits": 0, "refillsAt": "string" }, "runCapCredits": 0, "fastLaneOnly": true, "fastLaneReason": "plan" } }}Read the plan catalog with the workspace's current plan
Returns the purchasable plan catalog plus the workspace's effective plan and subscription status. Any workspace member with a Clerk session and a synced profile may call it, so members see only the effective plan rather than the full subscription record. If a pricing experiment is running the caller's deterministic variant selects the catalog and the exposure is recorded.
Read the detailed billing record for a workspace
Returns the expanded billing detail behind the subscription summary. Requires a Clerk session and the `billing:read` workspace permission.