# Usage breakdown

> What spend went on, by member, team, specialist, resource, category, activity, AI model or run, with the top groups over time.

Source: https://docs.generalinput.com/api/usage/breakdown



<Endpoint method="GET" path="/v1/usage/breakdown" />

<Access scope="usage:read" />

## Query parameters [#query-parameters]

| Name           | Notes                                                                                                                                                                                                                                                                                                                                        |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `groupBy`      | Required. `member`, `team` (spend its members own; one on two teams counts in both), `specialist`, `resource`, `category` (what it bought: AI tokens, machine time, hosted services), `activity` (runs, chats, builds), `model` (the AI model) or `run` (each workflow run, conversation, or app's sessions by member: the costliest first). |
| `metric`       | `credits` (default) or `usage`: runs, operations or AI runtime, whichever fits the group.                                                                                                                                                                                                                                                    |
| `window`       | `1d`, `2d`, `3d`, `7d`, `14d`, `30d` or `90d`, ending now. Default `7d`.                                                                                                                                                                                                                                                                     |
| `from`, `to`   | A calendar range instead, both days included, in `tz`. At most 93 days.                                                                                                                                                                                                                                                                      |
| `specialistId` | Only this specialist's spend: what one specialist cost, by member or by run.                                                                                                                                                                                                                                                                 |
| `resourceId`   | Only this workflow's, app's or skill's spend. AI runtime keeps to the same workflows.                                                                                                                                                                                                                                                        |
| `tz`           | IANA zone the window's days are cut in. Default `UTC`.                                                                                                                                                                                                                                                                                       |
| `membershipId` | One member's spend, split the same way. Another member's needs usage access.                                                                                                                                                                                                                                                                 |

## Response [#response]

```json
{
  "window": "7d",
  "timeZone": "UTC",
  "windowStart": "2026-11-20 00:00:00+00",
  "windowEnd": "2026-11-27 00:00:00+00",
  "scope": { "kind": "workspace" },
  "groupBy": "category",
  "isCreditMetered": true,
  "metric": "credits",
  "unit": "credits",
  "total": 1240.5,
  "rows": [
    {
      "key": "AI token usage",
      "id": null,
      "name": "AI token usage",
      "kind": null,
      "value": 980.2
    },
    {
      "key": "Machine time",
      "id": null,
      "name": "Machine time",
      "kind": null,
      "value": 260.3
    }
  ],
  "omittedCount": 0,
  "timeline": {
    "granularity": "day",
    "series": [
      { "key": "AI token usage", "name": "AI token usage" },
      { "key": "Machine time", "name": "Machine time" }
    ],
    "buckets": [{ "at": "2026-11-20 00:00:00+00", "values": [4.2, 0.6] }]
  }
}
```

* `metric` is the metric used and `unit` its measure (`credits`, `operations` or `runtime_ms`). On a plan that doesn't meter credits, `credits` is answered in `usage`.
* A workflow's runs are billed to its owner, as the Usage tab bills them, so `groupBy=member` with `resourceId` names the owner. Who ran a workflow by hand or through a chat is in [the report](/api/usage/report)'s one-member detail.
* By `team`, `isRowSumAboveTotal` is `true` when someone on several teams makes the rows add up past `total`, which counts each charge once; a member on no team, or who left, is under `No team`.
* By `run`, each row's `source` is what it was (shaped as [a receipt's](/api/usage/receipts) source) and `member` whom it is billed to; on every other grouping both are `null`.
* By `model`, a charge naming no model (machine time, hosted services) is under one row keyed `__no_model__`.
* Usage by integration isn't recorded: calls to a connected service aren't billed charges.
* `rows` lists every group, largest first, at most 100; `omittedCount` says how many more there were. `id` names the member, specialist, workflow, app or skill; it is `null` for categories, activities and spend no specialist owns.
* `timeline` is hourly for 1d and 2d windows, else daily. Each bucket's `values` follow `timeline.series`: the top groups, then one keyed `__other__` (named Other) for the rest.

## Errors [#errors]

| Status | When                                                                                                                 |
| ------ | -------------------------------------------------------------------------------------------------------------------- |
| `400`  | Missing or unknown `groupBy`, an unknown metric, window or zone, a bad range, or a `membershipId` that isn't a uuid. |
| `403`  | `membershipId` names another member and the key's member has no usage access, or names no member of this workspace.  |
| `429`  | Over the usage read budget: 30 reads a minute per member, 120 per workspace. `Retry-After` says when to try again.   |
