← All product modules

Open product module

Credits and access

A visible, idempotent access unit that keeps expensive work bounded without turning the product into a wallet.

Why it exists

Credits connect a person’s access level to the cost of an AI action. The accounting boundary is separate from identity, billing, and abuse decisions.

Inputs and outputs

Inputs

  1. A resolved anonymous or user subject
  2. The action and integer cost
  3. The active entitlement and ledger state

Outputs

  1. A balance visible before expensive work
  2. An idempotent spend event
  3. A refund or deterministic empty state on failure

Visual flow

  1. Resolve identity after security checks
  2. Show the action cost
  3. Spend once with an idempotency key
  4. Execute the provider action
  5. Refund on a failed execution

Practical example

Situation

A user double-clicks “generate plan” while the provider is slow.

Result

The same request key reuses one spend; if the provider fails, the ledger returns the cost instead of silently losing access.

Limitations

  1. Credits are not money, a token, or a transferable asset.
  2. Paid balances require stronger storage guarantees than a low-stakes demo.
  3. Commercial amounts and plan promises come from owner-approved billing facts.

Open and closed boundary

Open here

The distinction between access, cost visibility, spend, and refund is public.

Kept private

Secrets, payment identifiers, fraud thresholds, and private ledger rows remain operationally private.