Zorveus LogoZorveusDOCS
Core Concepts

Caps and credits

View Markdown

Compare base spending allowances with consumable product-user credit grants.

Zorveus provides two distinct controls to govern AI expenditures: spending caps and credit grants.


Caps and credits at a glance

FeatureSpending capCredit grant
PurposeBase virtual allowance for a periodConsumable credits owned by one product user
Reset behaviorResets periodically (daily, monthly, or lifetime)Non-replenishing, expires at set date or consumed to zero
Applied toOrganization, app connection, product userProduct user in one application
EnforcementRejects when base allowance plus credits are exhaustedExtends base allowance before requests are rejected
Funding sourceOrganization wallet or BYOKGranted by your application, extends virtual allowance

Spending caps

A spending cap sets the base virtual allowance over a period:

  • Evaluated during pre-flight token reservation.
  • Configured across daily, monthly, or lifetime periods.
  • Rejection returns 403 Forbidden with error code zorveus_cap_exceeded or zorveus_product_user_allowance_insufficient.
  • Caps apply at three distinct levels:
    1. Organization cap: overall organization spend limit.
    2. Connection or key cap: specific limit for an app connection or API key.
    3. Product-user cap: per-user base allowance on that key.

If an inference key has no cap rule, virtual allowance is unlimited across all credit modes. Requests pass through, virtual spend is recorded, and zero product-user credits are consumed. Credits extend a configured cap, but they do not create a cap where none exists.


Product-user credit grants

A credit grant assigns spendable credit to one product user:

  • Multiple grants stack additively.
  • Eligible grants are consumed by earliest expiry first.
  • Grants are not organization wallet funds. Granting credits does not deposit money into the organization wallet, and consuming credits does not pay an upstream model provider.
  • Read remaining balances through the service-key API by external user ID. Revoke credit grants in the dashboard.

Allowance formula and consumption order

When an inference key has a configured cap, the available allowance is:

remaining allowance = remaining base allowance + available product-user credits

The remaining base allowance is:

remaining base allowance = max(0, cap amount - completed period virtual spend - active reservations)

Consumption order: base cap first

Usage consumes allowance in this order:

  1. Remaining base allowance on the key.
  2. Available product-user credits (oldest expiring first).
  3. Uncovered virtual spend (in non-blocking track-only mode or request overruns).

For example, on a $10 monthly cap with $8 spent so far, the user has $2 base allowance remaining. If the user holds $5 in credits and sends a request estimated at $3, Zorveus reserves the first $2 from the base cap and only $1 from credits.


Allowance overrun policies

App connections configure an overrun_policy that controls what happens when a model response exceeds remaining allowance:

PolicyBehavior on active requestExcess virtual spendFuture allowance
limit_output (default)Reduces provider max tokens to the affordable amountRecords unexpected variance as uncoveredNo planned debt
allow_overrunLets the request run to declared or safe limitRecords excess as uncovered virtual spendForgiven when new allowance becomes available
carry_overrun_forwardLets the request run to declared or safe limitRecords excess as uncovered spend and debtRepaid from later credit grants or next base cap reset
Was this page helpful?
Edit this page on GitHub

On this page