Skip to main content

Usage

Usage is not a stored resource: it is a read-only view computed from AgentRuns for the workspace of the token. Only runs with status=success count, bucketed by the UTC day of finished_at. Cost is in USD, as billed by the AI Gateway.

Two endpoints expose it, both under scope inbox/usage:

EndpointReturns
GET /usage/summaryEmails, tokens and cost per day, plus the monthly counters against the workspace limits.
GET /usage/costCost and tokens per LLM model, with a per-day series.

Both accept from and to (YYYY-MM-DD, UTC, inclusive). Without them the range is the last 30 days ending today.

UsageSummary​

FieldTypeDescription
range.from / range.todateEffective range.
totals.emailsintEmails processed (successful runs).
totals.tokensintinput_tokens + output_tokens.
totals.input_tokens / totals.output_tokensintSplit of tokens.
totals.costnumberUSD.
series[]UsageDayOne entry per day in range: date, emails, tokens, cost. Days without runs are present with zeros.
monthly.emails_used / monthly.emails_limitint | nullCurrent calendar month against Workspace.monthly_emails_limit.
monthly.cost_used / monthly.cost_limitnumber | nullCurrent calendar month against Workspace.monthly_cost_limit. Counters reset on the 1st.

UsageCost​

FieldTypeDescription
models[]stringModel ids (provider/model) that ran in the range.
by_model[]object{ model, cost, tokens }, most expensive first.
series[]object{ date, by_model: { "<model id>": cost } }, one per day. Keys of by_model are model ids, not renamed.
totals.cost / totals.tokensnumber / intWhole range.

Example​

{
"data": {
"range": { "from": "2026-08-08", "to": "2026-09-06" },
"totals": { "emails": 412, "tokens": 913204, "input_tokens": 771010, "output_tokens": 142194, "cost": 3.71 },
"series": [
{ "date": "2026-08-08", "emails": 14, "tokens": 30122, "cost": 0.12 }
],
"monthly": { "emails_used": 96, "emails_limit": 1000, "cost_used": 0.88, "cost_limit": 50 }
}
}