Usage

A project’s AI units, requests, and tokens over time, by model and by caller.

Read usage

GET/v1/projects/{project}/usage

Needs View usage and limits.

QueryTakes
range24h (the default), by hour; or 7d or 30d, by day
{
  "range": "7d",
  "step": "day",
  "current": {
    "since": "2026-09-23T00:00:00Z",
    "until": "2026-09-30T00:00:00Z",
    "totals": {
      "units": 4200,
      "requests": 70,
      "inputTokens": 91000,
      "outputTokens": 30000
    },
    "points": [
      {
        "start": "2026-09-23T00:00:00Z",
        "units": 600,
        "requests": 10,
        "inputTokens": 13000,
        "outputTokens": 4300
      }
    ]
  },
  "previous": {
    "since": "2026-09-16T00:00:00Z",
    "until": "2026-09-23T00:00:00Z",
    "totals": {
      "units": 3100,
      "requests": 52,
      "inputTokens": 70000,
      "outputTokens": 21000
    },
    "points": []
  },
  "models": [{ "name": "openai/gpt-oss-120b", "units": 4200, "requests": 70 }],
  "callers": [
    {
      "name": "apiKey:01m3c081d2wj4g63qcr53pa1yh",
      "units": 4200,
      "requests": 70
    }
  ],
  "tasks": [{ "name": "support-reply", "units": 900, "requests": 30 }]
}
stepstring

hour or day: how long each point is. Hours and days are in UTC.

currentobject

The time asked for, up to the end of this hour or today. points has one entry for each step, in order, with zeros where nothing ran.

previousobject

The same length of time just before, to compare with.

current.totals.unitsinteger

The AI units calls used.

current.totals.requestsinteger

Calls that used AI units.

current.totals.inputTokensinteger

Tokens sent to models.

current.totals.outputTokensinteger

Tokens models wrote.

modelsarray

The current time’s units and requests by model, most first, up to 20.

callersarray

The same by who called: apiKey: and the key’s ID, web: and the web key’s ID for runs from web pages, or user: and the person’s ID for calls from the console. Up to 20.

tasksarray

The same by task, for runs of tasks only. Up to 20.

A call counts in the hour it started.

Last updated