putty
API ReferenceInference

Read the caller's usage summary

Returns the per-day quota state, the per-category breakdown, the hourly buckets the chart renders, and the most recent events the events table shows. One round trip; the dashboard calls it once on page load.

GET
/usage

Returns the per-day quota state, the per-category breakdown, the hourly buckets the chart renders, and the most recent events the events table shows. One round trip; the dashboard calls it once on page load.

Authorization

bearerAuth
AuthorizationBearer <token>

A bearer token. The Account routes accept a Privy access token; the MCP transport accepts an sk- API key issued by POST /account/api-keys.

In: header

Query Parameters

from?string

Inclusive lower bound of the window. Defaults to the start of the current UTC day when omitted.

Formatdate-time
to?string

Exclusive upper bound of the window. Defaults to the current time when omitted.

Formatdate-time
groupBy?string

Bucket granularity. Defaults to hour.

Default"hour"

Value in

  • "hour"
  • "day"

Response Body

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/usage"
{  "window": {    "from": "2019-08-24T14:15:22Z",    "to": "2019-08-24T14:15:22Z",    "groupBy": "hour"  },  "quota": {    "dailyLimit": 0,    "dailyUsed": 0,    "perMinuteLimit": 0,    "perMinuteUsed": 0,    "resetsAt": "2019-08-24T14:15:22Z"  },  "breakdown": {    "inference": {      "requests": 0,      "promptTokens": 0,      "completionTokens": 0,      "reasoningTokens": 0,      "errors": 0,      "byModel": {        "property1": {          "requests": 0,          "promptTokens": 0,          "completionTokens": 0        },        "property2": {          "requests": 0,          "promptTokens": 0,          "completionTokens": 0        }      }    },    "tools": {      "requests": 0,      "errors": 0,      "byName": {        "property1": {          "requests": 0,          "errors": 0        },        "property2": {          "requests": 0,          "errors": 0        }      }    }  },  "buckets": [    {      "key": "string",      "inference": {        "requests": 0,        "promptTokens": 0,        "completionTokens": 0,        "reasoningTokens": 0,        "errors": 0      },      "tools": {        "requests": 0,        "errors": 0      }    }  ],  "events": [    {      "at": "2019-08-24T14:15:22Z",      "category": "inference",      "model": "string",      "toolName": "string",      "promptTokens": 0,      "completionTokens": 0,      "reasoningTokens": 0,      "status": 0,      "errorCode": "string",      "durationMs": 0,      "threadId": "string",      "apiKeyId": "string"    }  ]}