# Usage report

> Credits, runs, AI runtime and chats for a window or calendar range, per member, with credits left, runway, failing workflows and the top specialists and resources.

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



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

<Access scope="usage:read" />

## Query parameters [#query-parameters]

| Name           | Notes                                                                                                                                      |
| -------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
| `window`       | `1d`, `2d`, `3d`, `7d`, `14d`, `30d` or `90d`, ending now. Default `7d`. Leave it out with `from` and `to`.                                |
| `from`, `to`   | A calendar range instead, both days included, in `tz`: `from=2026-10-01&to=2026-10-31` for October. At most 93 days; pass both or neither. |
| `tz`           | IANA zone the window's days are cut in, such as `America/New_York`. Default `UTC`.                                                         |
| `membershipId` | One member's report, with what they ran and the skills they built. Another member's needs usage access. Default: everyone visible.         |

## 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" },
  "isCreditMetered": true,
  "totals": {
    "credits": { "current": 1240.5, "previous": 980.25 },
    "executions": { "current": 312, "previous": 280 },
    "completedExecutions": 298,
    "failedExecutions": 9,
    "runtimeMs": { "current": 5400000, "previous": 4100000 }
  },
  "members": [
    {
      "membershipId": "0f0c…",
      "name": "Dana Ruiz",
      "email": "dana@example.com",
      "credits": 640.1,
      "runtimeMs": 2900000,
      "executions": 180,
      "completedExecutions": 175,
      "chatMessages": 42,
      "chatThreads": 9,
      "tokens": 1830000,
      "ownedResources": {
        "workflows": 6,
        "apps": 2,
        "designs": 1,
        "factories": 0,
        "skills": 3
      }
    }
  ],
  "omittedMemberCount": 0,
  "topSpecialists": {
    "unit": "credits",
    "rows": [
      { "id": "c2a1…", "name": "Sales Ops", "kind": null, "value": 512.4 }
    ],
    "omittedCount": 0
  },
  "topResources": {
    "unit": "credits",
    "rows": [
      {
        "id": "wf_8d…",
        "name": "Lead router",
        "kind": "workflow",
        "value": 210.9
      }
    ],
    "omittedCount": 3
  },
  "byCategory": {
    "unit": "credits",
    "rows": [
      { "id": null, "name": "AI token usage", "kind": null, "value": 980.2 }
    ],
    "omittedCount": 0
  },
  "trend": {
    "granularity": "day",
    "buckets": ["2026-11-20 00:00:00+00", "2026-11-21 00:00:00+00"],
    "credits": [4.2, 0],
    "executions": [3, 0],
    "completedExecutions": [3, 0],
    "failedExecutions": [0, 0],
    "runtimeMs": [61000, 0]
  },
  "member": null
}
```

* `scope` is `{ "kind": "workspace" }` for a member with usage access who named no one, and `{ "kind": "member", "membershipId" }` otherwise. A member without usage access always gets their own report.
* `previous` is the same length of time just before the window or range, read as its own span.
* `period` echoes what was asked: `{ "kind": "window", "window" }` or `{ "kind": "range", "from", "to" }`; `window` is `null` for a range.
* On a plan that doesn't meter credits, `isCreditMetered` is `false`, every `credits` is `null`, and the rankings are measured in `operations` (specialists) and `runtime_ms` (resources).
* `byCategory` splits credits by what they bought (AI tokens, machine time, hosted services). For any other split, use [the breakdown](/api/usage/breakdown).
* `trend` holds the window's buckets (hourly for 1d and 2d windows, else daily), one array per measure in bucket order.
* `members` is sorted by credits, then runtime, and holds every visible member up to 1,000; `omittedMemberCount` says how many more there were. Rankings hold the top 10.
* `members[]` also carry `isDeparted` (left the workspace, but spent in the period, so the rows add up to the totals) and `lastActiveAt` (their last chat or edit in this workspace; their workflows' scheduled runs don't count).
* `balance`, for every caller: `credits` (`left`, `fromPlan`, `payAsYouGo`; `null` when not metered), `plan` (`tier`, `name`, `monthlyCredits`, `renewal`; `null` when billing isn't set up), `autoTopUp` (`isEnabled`, `thresholdCredits`, `targetCredits`), `seats` (`limit`, `used`, `activeMembers`, `pendingInvites`), and `runwayDays`: the credits left at the period's daily burn, set only on a workspace report that spent something.
* `failingWorkflows`: `{ rows: [{ id, name, kind, runs, failedRuns, failureRate }], omittedCount }`, the 10 with the most failed runs in the period; one member's report lists only workflows they own.
* `invites`: pending invites (`email`, `invitedAt`), up to 1,000 with `omittedInviteCount`; empty on a report about one member.
* `member` is set when the report covers one member: the workflows and apps they ran in the window (`isOwned` is false for one someone else built) and the skills they built, at most 40 of each, with `omitted…Count` for the rest.

## Errors [#errors]

| Status | When                                                                                                                      |
| ------ | ------------------------------------------------------------------------------------------------------------------------- |
| `400`  | Unknown window or zone, a window with a range, half a range, a range past 93 days, 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.        |
