Skip to content
Andesyte

Measured usage

How Foundation Machines reserves, rates and settles billable AI usage.

Foundation Machines is replacing prepaid credits with dollar-denominated, postpaid measured usage. The legacy /docs/credits URL remains available during the migration so existing links do not break.

What is measured

Only model-backed work is billable:

  • PR and MR audit reasoning;
  • walkthrough generation;
  • pre-merge reasoning; and
  • Q&A or chat replies.

Autofix orchestration, OSV dependency checks, Semgrep and Checkov container scanners, secret detection and other static scanner work are not admitted through the billable reservation path.

Rate cards

The Gateway uses integer USD minor units and an effective-dated model rate card. A reservation pins its customer, subscription, billing period and rate card so later catalogue changes cannot re-rate historical work.

Numeric customer rates are deliberately unpublished while production shadow telemetry is being reconciled. They will be documented before charging is enabled.

Reading the billing ledger

The billing page separates:

  • Settled: completed, rated model usage;
  • Reserved: the maximum exposure for in-flight model calls; and
  • Available: the remaining amount before the customer-set limit.

The admission check uses settled plus reserved usage, preventing concurrent requests from independently spending the same remaining allowance.

Failure handling

Billable AI fails closed if the Gateway cannot verify the contract, rate, period or available amount. A provider failure before invocation releases the reservation. An uncertain completion remains quarantined until an operator can reconcile it.

If actual provider usage is above the reserved maximum, the customer amount is capped at the reservation. Foundation Machines absorbs the difference and the contract is blocked for review.

Stripe reconciliation

Settled usage is delivered to Stripe through a durable outbox with stable transaction identifiers. Webhooks use a leased, resumable inbox and complete only after billing-critical state changes commit. Late usage, expired dead-letter events and finalised invoices require an incident and explicit operator handling rather than blind redelivery.