Tools keeps AI usage accounting per user and per provider. The enforcement unit is prepaid monetary AI credit, not a raw token quota, because the same number of tokens can have very different provider costs depending on model, cache use and output volume.
The accounting layer keeps the provider, user or system actor, feature, request/correlation ID, model, input tokens, cached input tokens, output tokens, provider tool units, provider cost, Tools billed cost, pricing version and funding source where those values are available.
Prompts, provider credentials, bearer tokens and raw provider responses are not part of the billing ledger.
The current pricing catalog is versioned 2026-08-25. Provider prices are configuration/catalog facts with an effective date, not permanent constants. Historical usage keeps the pricing version used when the request was settled.
Selected official OpenAI text prices per one million tokens on 2026-08-25:
| Model | Input | Cached input | Output |
|---|---|---|---|
| GPT-5.6 Sol | $4.00 | $0.40 | $20.00 |
| GPT-5.6 Terra | $2.00 | $0.20 | $12.00 |
| GPT-5.6 Luna | $0.20 | $0.02 | $1.20 |
| GPT-5.4 | $2.50 | $0.25 | $15.00 |
| GPT-4o | $2.50 | $1.25 | $10.00 |
OpenAI Web Search is accounted for separately from text tokens. The current baseline is $10 per 1,000 search calls plus applicable search-content/model token charges. Image, audio and other provider tools use their own pricing rules and must not be treated as ordinary text tokens.
Official sources:
The Microsoft 365 Copilot connector is a separate provider contract. Tools must not apply OpenAI token prices to Copilot requests.
Microsoft currently documents the Microsoft 365 Copilot Chat API as available without an additional API usage charge for users who have the required Microsoft 365 Copilot add-on license. Tools therefore records the user, connector, request and status while the marginal request cost remains zero under that contract. If Microsoft exposes a separately metered Copilot contract later, it needs its own pricing rule/version.
Official sources:
Tools stores money as integer micro-USD. Floating-point values are not used for balance settlement.
The default billing policy passes through the metered provider cost and applies a configurable 10 percent service overhead for payment, exchange-rate and operational overhead. The overhead is configurable in AI billing administration and can be changed without rewriting historical events.
A user-owned OpenAI key is still measured for usage reporting, but it does not consume the shared Tools prepaid balance because Tools does not pay that upstream provider invoice.
When enforcement is enabled, Tools-funded OpenAI requests reserve a bounded amount of prepaid credit before the provider call. The account row is locked while the reservation is created, so concurrent requests cannot reserve or spend the same available balance twice. After the provider call, Tools releases the reservation and settles the actual measured charge. Failed provider requests release their unused reservation; any provider cost that is actually reported remains representable in the usage ledger.
Reservation cleanup is tied to the exact provider/request identity that created the hold. Finishing or cleaning up one request cannot release another overlapping request's reservation. The funding source selected at preflight remains authoritative for the matching usage event even when enforcement is disabled and no reservation row is created; Tools carries that decision in request/job-scoped state keyed by user, provider and request so a forced Tools-funded call cannot later be reclassified from the user's normal personal provider key.
Provider safety/rate limits remain separate from the prepaid balance. Enforcement is disabled by default during rollout so deployment does not lock existing accounts that have not yet received a starting balance.
Every provider-backed endpoint that can create a Tools-funded cost must use the same central preflight/reservation/settlement policy. Endpoints must not perform their own balance subtraction or choose between funding ledgers ad hoc.
The initial funding rules are:
Provider cost and billed charge remain separate exact integer values. A reservation is only a temporary hold; settlement writes the immutable usage debit and releases any unused reservation.
When an authenticated API request is blocked before provider execution because prepaid AI Credits are insufficient, Tools returns HTTP 402 with the semantic error code insufficient_ai_credits.
The response includes safe client fields for the current spendable balance, the required reservation, a top-up URL and the correlation/request ID. It does not expose provider credentials or internal billing secrets. Clients should use the semantic code rather than parsing the human-readable message.
The owner-scoped user view is /me/ai-usage. The former /ai/usage address redirects there for compatibility. The administration view is /admin/ai-usage. Administrators can also reach payment/funding reconciliation, AI billing and the dedicated AI provider/service administration surfaces from the Payments, AI Credits & purchases group at the top of /admin.
Ko-fi membership payments can fund the prepaid wallet automatically through POST /api/support/kofi/webhook.
The webhook verification token is configured in Support administration and stored encrypted. Tools validates it before any payment mutation. Provider retries are idempotent by both Ko-fi message_id and kofi_transaction_id.
Tools links a verified payment to an account through an existing Ko-fi supporter link or an exact normalized payment-email match that resolves to one Tools user. Display names are never used as identity. Unmatched payments remain in Support administration until an administrator assigns them.
A successful membership payment grants a fixed prepaid AI benefit for the Ko-fi tier:
| Ko-fi tier | Membership price | Included AI prepaid credit |
|---|---|---|
| Nano Member | EUR 15 | $2 |
| Member | EUR 35 | $5 |
| Supporter | EUR 75 | $10 |
| Tools Backer | EUR 150 | $25 |
| Super Member | EUR 500 | $100 |
| Infrastructure Sponsor | EUR 2000 | $300 |
The membership price remains denominated in EUR, while the AI benefit is a fixed USD-valued internal Tools credit. Tools does not silently convert the Ko-fi payment amount into AI credit and does not assume EUR and USD are equal.
Unused prepaid AI credit stays in the user's Tools AI wallet until consumed. It is not cash, cannot be withdrawn, is not an OpenAI account balance and does not provide a provider API key.
Ko-fi does not need to send a cancellation event for this accounting model. A new membership credit is created only when Tools receives and validates the next successful membership payment webhook.
Ordinary Ko-fi donations/tips remain project support and do not automatically become AI credit.
One-time AI top-ups use explicitly configured Ko-fi Shop direct_link_code mappings. For example, a Shop item may map to exactly $10 of Tools AI prepaid credit. The fixed credit is granted only when the verified shop payment contains that configured code. Unknown shop items remain ordinary support.
This keeps payment currency and AI provider currency separate and prevents an ordinary donation from accidentally being interpreted as a purchase of AI capacity.
Ko-fi references:
Ko-fi webhook events are stored separately from the AI wallet transaction ledger. This allows payment receipt, user matching and AI credit settlement to be reconciled independently.
Meaningful balance mutations, reservations, settlements and admin changes are written to structured AI billing audit records. Accounting failures and suspicious webhook verification failures also use the always-on operational diagnostic path to #toolsapi without secrets or raw payment payloads.