Billing Tools
Wallet and auth for every paid tool: API keys, balance, buy credits, auto-reload, invoices, seats, usage, and top-ups
The Billing category is the auth and wallet layer behind every paid tool. It gets you an API key, tracks your credit balance, tops up via card, and lists invoice history. Every paid tool consults this layer to authorize requests and meter usage.
All Billing tools are free: the wallet itself never consumes credits. New accounts start with 100 free credits ($1 = 100 credits).
Tools
get_api_key
Get a new API key. A verification email is sent to the address you provide; calling get_api_key again with the code finalizes the key.
After verification, the key (prefixed sk_) is returned. New accounts receive 100 free credits.
get_credit_balance
Returns the current balance and the cost of every tool, grouped by server.
buy_credits
Charge a saved card and credit credits.
set_auto_reload
Configure automatic top-ups when the balance falls below a threshold.
list_invoices
Returns purchase and charge history.
get_billing_portal
Returns a short-lived Stripe billing-portal URL where you can update the saved card, download receipts, and manage payment details in Stripe’s hosted UI.
Managing API keys
list_api_keys shows every key in the workspace with its value obfuscated, so you can audit what exists without exposing secrets. revoke_api_key deletes a specific key by api_key_id, with a belongs-to check so a key can only revoke keys in its own workspace. The CLI wraps these as gtm-tools admin keys list and gtm-tools admin keys revoke <id>.
Usage, and what to do when it runs out
There are no seats here. Every plan is a flat subscription over ONE shared pool of
credits — a workspace’s members and its API keys all draw on the same balance — so there is
no per-member pack to size, no seat to assign, and no per-member top-up to request. The
billing engine reads that from the plan catalogue and simply does not register the tools
that would only ever refuse: list_seats, assign_seat_type, request_seat_change and the
whole *_top_up group are absent from GET /api/v0 on this deployment. If you have seen
them in another product built on the same engine, that product sells seats and this one
does not.
get_usage returns what the workspace has spent this cycle, optionally filtered by caller.
get_usage_limits answers the more useful question — every limit that applies to you right
now, what is left of each, when it resets, and a next_step naming what to do if something
is refusing you. get_org_usage breaks the pool down by member: each row is that person’s
share, limit_shared: true because the ceiling is the workspace’s rather than theirs, and
shared_pool carries the pool once so nothing invites you to add the rows up.
When the pool is spent, the overage draws the prepaid wallet rather than stopping an agent
mid-run — so the answer is credits, and get_usage_limits says so in next_step:
action is the name of the tool to call next. On a plan with nothing above it the rung
becomes plan, and a member without the standing to buy gets request_plan_change instead
— the same answer, addressed to whoever can act on it.
The CLI wraps these as gtm-tools admin usage, admin limits and admin team-usage.
The wallet model
Every paid tool publishes its cost. When a tool is called, the cost is debited up front, before the tool runs.