Skip to content
Token Controller Docs
Docs / Reference / Bill schema

Bill schema

The fields of a bill, as the bills endpoint and CSV upload take them. Amounts are decimal strings in currency.

Fields

Field Meaning
provider Who charged, such as anthropic, openai or cursor: any name in small letters, digits and _, spelled as messages spell it. Required. It is the contract's provider.
contract The key of the contract the bill is for, such as anthropic-api or claude-team. Optional. A new key creates the contract. Left out, the bill goes to the provider's only contract of the bill's kind (metered unless contract_kind says flat); when the provider has none of that kind, a contract named after the provider is created. With two contracts of one kind at one provider, name it.
contract_kind metered or flat, for a contract this bill creates. Optional; metered when left out.
from, to The first and last day the bill covers, in UTC. Required. Reconciliation runs on this range.
amount What the provider charged under the contract in the range. Required. For a flat contract, the fee plus extra usage.
fee, extra_usage For a flat contract, the two parts of amount. Optional; with them the check shows what the plan covered.
currency Such as USD. Required.
exchange_rate To the organization's reporting currency, at the bill's last day. Optional; Token Controller fills it in when left out.
lines The provider's own detail, such as cost per workspace and day. Optional.
typed_in true when typed in by hand in the web app rather than sent by a program. Optional.
final Set by Token Controller: whether the provider will no longer change the figures. A bill sent, uploaded or typed in is final. A pulled bill can come in before it is, such as Anthropic Enterprise.

A bill is an event. A restated bill is a new bill for the same contract and range; the earlier one is reversed and stays visible. Sending the same figures again adds nothing.

Last updated 27 November 2026 · Edit this page© 2026 Jan Beck · Privacy · Imprint