CLI AI

What counts as a request: quotas, caching, and the meter you can trust

2026-04-03

Every CliAI account has three independent meters. Together they answer the question am I about to hit a limit? without ever surprising you. Here's exactly how they work.

Three windows

Total balance. A counter that decrements with each billable request. Refilled when you top up your account.

Daily window. A rolling 24-hour budget. Resets continuously β€” there's no "midnight reset" cliff.

Per-minute rate. A short-term rate limit. Prevents accidental spikes (a runaway loop in a script, for example) from draining your balance.

clai
$ clai statsAccount: u_8a7c…─ Total balance ──────── 2,847 / 5,000─ Daily window ────────  37 / 200 (resets in 14h)─ Per-minute rate ──────  1 / 5─ Top tools today ─────  find (12), git (8), kubectl (6)

If any of the three is exhausted, the next request returns a clear error and the panel shows which window blocked it β€” there's no mystery 429.

When caching saves you a request

CliAI caches generated commands by the hash of the prompt + shell + locale. Submit the exact same task in the exact same shell and the second time, you get the cached command β€” no LLM call, no balance drain.

clai
$ clai find files larger than 100MB→ find . -type f -size +100M[cache: hit · balance unchanged]$ clai find files larger than 100MB→ find . -type f -size +100M[cache: hit · balance unchanged]

The cache is per-account and lives on the server. It's invalidated when you change locale, switch shell, or refine the prompt β€” refinement is by definition a new request.

Whether cache hits count

By default, cache hits do not decrement your total balance β€” the daily and per-minute meters tick anyway, because they're rate-protective regardless of whether the work was real. If you have a strong opinion the other way (audit trails, fairness across accounts), there's a server-side flag your administrator can flip; check the docs.

Inspecting your usage

clai stats is the source of truth. The same numbers appear in the cabinet UI, but if you're doing anything programmatic β€” wrapping clai in a CI step, embedding it in a tool β€” clai stats --json is what you want.

See also

  • Pricing β€” how the total balance is sized.
  • From one-liner to script β€” when a request becomes a recurring CI step, the per-minute rate is the meter to watch.