ReferenceAccount

Usage this period

Consumption by billing unit for the current period, in total and per key. Updated within five minutes of each request.

scopeanybilling unitfree

agent notesFree. Read `period.included` minus `period.used` per unit to size a batch. Per-key rows include revoked keys that spent units this period so the totals reconcile.

Consumption by billing unit for the current period, in total and per key. Updated within five minutes of each request.

AuthorizationBearer <token>

Workspace API key as a bearer token. Create keys in the dashboard under Settings → API keys. Test keys (oai_test_) answer from a fixed test tenant and never queue production scans.

In: header

Response Body

application/json

application/json

GET
/v1/usage
curl -X GET "https://example.com/v1/usage"
{  "by_key": [    {      "key_id": "string",      "label": "string",      "used": {        "history_query": 0,        "lookup_cached": 0,        "lookup_live": 0,        "refresh_requested": 0      }    }  ],  "period": {    "ends_at": "2019-08-24T14:15:22Z",    "included": {      "history_query": 0,      "lookup_cached": 0,      "lookup_live": 0,      "refresh_requested": 0    },    "starts_at": "2019-08-24T14:15:22Z",    "used": {      "history_query": 0,      "lookup_cached": 0,      "lookup_live": 0,      "refresh_requested": 0    }  }}