THINKHX

Project usage

This resource is a one-call summary of how much of the project exists: the plan it runs on, and how many team members, keys, files and events it holds. It is the counterpart to Quota and token usage, which reports what the project may still spend.

Endpoints

MethodPathScope
GET/v1/usageusage:read

The endpoint takes no parameters.

Read the usage

curl
curl https://api.thinkhx.com/v1/usage \
  -H "Authorization: Bearer sk-project-YOUR_KEY"
json
{
  "code": 200,
  "title": "OK",
  "response": {
    "object": "usage",
    "plan": {
      "id": "plan_0664fc57b92acb9124be",
      "name": "Starter"
    },
    "counts": {
      "team_members": 4,
      "api_keys": 3,
      "files": 11,
      "events": 842
    }
  }
}

The usage object

FieldTypeDescription
objectstringAlways usage.
planobjectThe plan the project runs on, as id and name, or null.
countsobjectThe project's totals. See below.

counts

FieldTypeDescription
team_membersintegerMembers currently attached to the project.
api_keysintegerKeys that still authenticate.
filesintegerFiles the project holds.
eventsintegerEntries in the project's audit trail.

These are live totals of what exists now, not counters that accumulate: revoking a key lowers api_keys, and deleting a file lowers files. events is the exception and only ever rises, because an event is never removed.

Noteplan is null when the project is not on a plan. The counts are still returned, so treat the two parts of the response independently.

The counts here overlap with what the individual resources report: events counts the whole trail even though Events lists only the 100 most recent, and api_keys counts the same keys API keys enumerates.

Need help? Contact Support.