Token bill on your trace
unavailable until meteredwe will not quote a partner that does not exist
The gateway records model calls and can replay a completed stored response on a supported retry instead of buying it again.
The gateway records model calls and can replay a completed stored response on a supported retry. A replay is different from sending a new provider request. A missing or ambiguous result is not silently treated as a free replay or a settled charge.
at most once on the KeepState ledger, enforced at the gateway
1 · agent calls
The VM sends a request using a virtual key scoped to this session.
2 · gateway meters
Tokens counted in, tokens counted out, before the provider is touched.
3 · provider answers
The response is written to the store as it streams back.
4 · call interrupted
A crash, a rate limit, a resume. The stored response survives it.
5 · retry served
The store answers, not the provider. Zero new tokens, billed once.
An interrupted call has already been paid for. On retry the gateway serves the stored response instead of buying it again, and the ledger row says so: retry served from store, 0 new tokens. Proven for Claude Code. For aider the gateway held the response 4 of 4 times and the client returned 3 of 4. Reported, not promised.
Bring your own key for any provider and the token meter disappears; keys never enter a guest, an image, or a snapshot. We meter durability only. Routing across providers is roadmap; today there is one provider path through the gateway.
ledger, the gate-3 retry
A supported replay uses a completed response the gateway already stored. Nothing is sent upstream, so the KeepState ledger records the call once and no second provider request exists to be charged for.
What the gateway settles is the KeepState ledger, and only that. Your provider keeps its own accounting: if a request reached it and it billed you, that charge sits between you and your provider, and a replay on our side cannot reverse it. Anything a call already did outside the session, a write, a message, a deployment, is outside this boundary too. We make no promise about a provider's own billing and we offer no universal provider refund.
Sometimes the gateway cannot tell whether a call completed upstream, or what it cost: a connection dies mid-stream, a provider answers late, a usage figure never arrives. A missing or ambiguous result is not silently treated as a free replay, and it is not silently treated as a settled charge.
the ruled rule · price book v1.3
Ambiguous gateway results are never billed until reconciled. Unreconciled after 24 hours resolves in the customer's favor and is flagged on the statement.
Until it is reconciled, an ambiguous call carries no charge on your statement. If reconciliation has not resolved it inside that window, the customer keeps the benefit of the doubt and the statement shows that it happened, so the outcome is visible rather than absorbed.
the supported path through the gateway, from the capability manifest
Every row above is read from the derived capability source, not written here. A row that is proven but not enabled in production is exactly that, and a mode that is not available is not for sale. The availability matrix, dated per row.
Token bill on your trace
unavailable until meteredwe will not quote a partner that does not exist
Double-billed interrupted calls
no request hash appears twice in billed spend, gateway-enforced. One provider path today.
Cache hit rate, your workload
unavailable (not yet measured)we will not quote yours before we meter it
On the KeepState ledger a request is billed at most once: a supported retry of a completed call is served from the store and issues no new provider request. Gated on the one provider path we run. record
We will show you which calls the ledger would record as run, replayed, or awaiting reconciliation. No savings figure, no quote, no promise about what a different setup would have cost you.
keepstate.ai · the durable agent session cloud