Skip to navigation

ast billing

Inspect spend, credit, and spend controls from your terminal
View as Markdown

Read the active account’s plan, spend, remaining credit, spend controls, and invoices. Set the account’s spend warning and limit.

ast billing <subcommand>

billing get

Get the plan, spend, remaining credit, and spend controls.

ast billing get [--json]

billing status

Get the billing gating status for the active account.

ast billing status [--json]

billing invoices

List the account’s invoices, newest first.

ast billing invoices [--limit <n>] [--json]

--limit sets how many invoices to show. The default is 12.

billing agents

Break down the account’s compute spend by agent.

ast billing agents [--json]

billing models

Break down the account’s AI Gateway spend by model, or one model’s spend by agent.

ast billing models [<model>] [--json]
ast billing models --features [<feature>] [--json]

Pass a model name to see which agents spent on it. With --features, the command breaks down the AI Gateway spend that Astropods features make on the account’s behalf, such as the eval judge, the governance agent, and local development. Pass a feature name to see that feature’s spend by model.

billing set

Set the account’s own spend controls. The warning notifies. The limit suspends the account’s agents. Both measure against usage spend for the period, before credit is drawn down.

ast billing set [--warning <amount>] [--limit <amount>] [--clear-warning] [--clear-limit]
ast billing set --metric compute|gateway [--warning <amount>] [--limit <amount>]

A control you do not name keeps its current value. --clear-warning and --clear-limit remove one.

FlagDescription
--warning <amount>Spend amount that notifies
--limit <amount>Spend amount that suspends the account’s agents
--clear-warningRemove the spend warning
--clear-limitRemove the spend limit
--metric compute|gatewayCap a metered quantity instead of spend

With --metric, the numbers cap a metered quantity instead of money. This is the only control that works on a plan billed at zero, where spend never moves. The compute metric counts CU-hours. The gateway metric counts US dollars of model usage.

Next steps

  • Usage limits: warn yourself before an account spends too much, and stop it before it spends more
  • Usage: see what an account has spent and created this period
  • AI Gateway: the model access that billing models reports on