Gate 1
Scope and rate card
Pin the model, default service tier, official prices, verification date, input and output limits, cache categories, run owner, maximum budget, and excluded charges.
Reserve, settle, reconcile
Describe one Responses API run, its verified rate card, request limits, tools, concurrency, and failure handling. Generate a checklist without mistaking an application estimate for the final provider bill.
Gate 1
Pin the model, default service tier, official prices, verification date, input and output limits, cache categories, run owner, maximum budget, and excluded charges.
Gate 2
Count the complete request, reserve worst-case token cost atomically, use unique holds, prevent double reservation across workers, and reject calls that exceed the balance.
Gate 3
Validate model, tier, status, token details, totals, bounds, and actual cost; release unused funds only after settlement and block permanently on timeout or uncertain charge.
Gate 4
Price or prohibit hosted tools, streaming, background work, non-default tiers, regional and long-context rates, storage, retries, and third parties; reconcile provider usage and invoices.
The state machine, exact arithmetic, holds, failures, and fixtures are implemented with fictional data and no network calls.
The live rate card is verified, unsupported costs are prohibited, retries are controlled, concurrency is atomic, and every uncertainty blocks the run.
The ledger is still an application estimate; project controls, provider usage, late charges, invoice reconciliation, and incident ownership remain required.
Prove an exact-budget success, a blocked over-budget next call, atomic competing reservations, timeout blocking, missing-usage blocking, incomplete-response settlement, disabled or separately reserved retries, prohibited unsupported charges, and reconciliation against provider usage. Run failure fixtures offline before any paid call.
Official pattern checked August 19, 2026 against the OpenAI Cookbook. Recheck SDK, model, tier, prices, token counting, usage fields, tools, retries, limits, and billing before deployment.