Skip to navigation

Retrieve weekly AI allowance usage

View as Markdown

How much of the plan’s weekly AI allowance the two in-product AI assistants have used: the dashboard copilot (ask_ai) and the prompt generator (prompt_gen). The allowance is measured in what the AI model calls cost, so a model that reasons more uses more of it; it is reported as a PERCENTAGE of the allowance (limit is 100). Weeks run Monday 00:00 UTC to the next Monday. weekStart and resetsAt give the boundaries.

Growth’s weekly allowance is five times Starter’s and Business’s twenty-five times. Enterprise is unlimited (limit and remaining are -1, percent is null). With no subscription limit and remaining are 0. When an allowance runs out, the assistant itself answers 429 AI_WEEKLY_CAP_REACHED until resetsAt. This allowance is separate from the AI replies your agents send to customers (see GET /api/billing/usage).

Consistency. Never cached (Cache-Control: no-store); used is percent rounded up to a whole point and can pass 100 by the last request of the week.

Access

  • Required scope: read. Available to every workspace role.
  • Rate limit: Billing — 15 requests/min per workspace, shared by every /api/billing route. See Rate limits.
  • Plan: Available on every plan.

Authentication

AuthorizationBearer

Workspace API key: jl_ followed by 64 lowercase hex characters, created by the workspace owner in the dashboard (Settings → API Keys) and sent as Authorization: Bearer jl_.... The plaintext is shown once, at creation; Jelliu stores only a SHA-256 hash. A workspace can hold up to 25 active keys.

ScopeGET / HEADPOST / PUT / PATCH / DELETEAdmin-only routes
readYesNoNo
writeYesYesNo
fullYesYesYes

Operations restricted to admins or owners reject keys without the full scope with 403, and say so in their description. No key, whatever its scope, can mint or revoke API keys or rotate a webhook secret — that requires a signed-in owner session. A revoked key stops authenticating within about 10 seconds. See Authentication.

Response headers

Cache-ControlstringOptional

Always no-store.

Response

Weekly AI usage.
dataobject

Errors

401
Unauthorized Error
403
Forbidden Error
429
Too Many Requests Error