Admin API
Platform super-admin reads across every company. Every other caller gets a 403.
List every company with its usage this month (super admin)
Super admins only. Every company on the platform with its plan and this calendar month (UTC) of usage: messages, tokens and budget used. The figures are cached for up to 12 hours. Use it to find a `companyId`, then call `getAdminCompanyUsage` for the per-agent and per-surface breakdown.
Get company's token usage and cost for window (super admin)
Super admins only. Token usage and estimated model cost (USD) for any company over a window of UTC days (default: this month to date, at most 366 days). `agents` comes from agent execution node usage: totals, per agent, per day, and the latest executions (call `getAdminExecutionUsage` for one execution per node). `surfaces` is the spend outside agent executions (assistant chat, agent builder, document generation, evaluators, background work), from usage events. Costs are estimates from model list prices, not the invoice.
Get per-node token usage of one execution (super admin)
Super admins only. Every token-consuming node of one agent execution, in any company: the model it ran on, input/output/reasoning/cached tokens, estimated cost (USD) and retry waste. Take the execution id from `getAdminCompanyUsage`.