AI cost + call-volume dashboard
GET /admin/ai/usage
Per-provider month-to-date rollup of AI provider calls. Each row reports successful call count, total estimated cost in USD micros (integer math; convert to dollars by dividing by 1_000_000), and a per-status breakdown so the operator can spot providers that are mostly rate-limited or permanently failing.
Requires ai.admin capability.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Query Parameters
Section titled “Query Parameters ”YYYY-MM string for the period to summarise. Defaults to the current UTC month if omitted.
Responses
Section titled “ Responses ”Usage rollup
object
YYYY-MM the report covers.
Sum across all providers. Divide by 1_000_000 for USD.
object
Per-status row count (success / rate_limited / transient_error / permanent_error / budget_blocked / privacy_blocked) so the operator can spot providers that are mostly failing.
object
Authentication required, missing, or invalid
object
Human-readable error summary
Example
the request could not be completedExample
{ "error": "authentication required: sign in and retry with a valid session or API token"}Authenticated but missing required capabilities
object
Human-readable error summary
Example
the request could not be completed