Retrieve weekly AI credit usage
Authentication
Response headers
Always no-store.
Always no-store.
Weekly credits used by the two in-product AI assistants: the dashboard copilot (ask_ai)
and the prompt generator (prompt_gen). One credit is 1,000 tokens (input plus output).
Weeks run Monday 00:00 UTC to the next Monday. weekStart and resetsAt give the
boundaries.
Weekly budgets per plan: ask_ai 132 / 660 / 3,300 credits and prompt_gen 50 / 248 /
1,238 credits (Starter / Growth / Business). Enterprise is unlimited (limit and
remaining are -1). With no subscription both are 0. When a budget runs out, the
assistant itself answers 429 AI_WEEKLY_CAP_REACHED until resetsAt. These credits are
separate from the AI replies your agents send to customers (see GET /api/billing/usage).
Consistency. Never cached (Cache-Control: no-store); used is rounded up to whole
credits.
Access
read. Available to every workspace role./api/billing route. See Rate limits.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.
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.