AppAIGatewayDocs

Read retained account usage for a UTC month

GET
/v1/cli/usage

Includes retained usage for deleted apps, with durable account attribution. Historical rows whose owner was already unknown when attribution was introduced cannot be counted. Coverage describes this limitation without disclosing other accounts' data.

Authorization

agw_identity_auth.session_token<token>

The console's session cookie. Admin requests from the console also send x-console-request: 1.

In: cookie

Query Parameters

month?string

YYYY-MM; defaults to the current UTC month.

Match^\d{4}-(0[1-9]|1[0-2])$

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/cli/usage"
{  "accountId": "string",  "month": "string",  "totals": {    "requests": 0,    "input_tokens": 0,    "cached_input_tokens": 0,    "cache_write_tokens": 0,    "output_tokens": 0,    "cost_usd": 0,    "errors": 0,    "blocked": 0  },  "apps": [    {      "requests": 0,      "input_tokens": 0,      "cached_input_tokens": 0,      "cache_write_tokens": 0,      "output_tokens": 0,      "cost_usd": 0,      "errors": 0,      "blocked": 0,      "appId": "string",      "deleted": true,      "firstRecord": "string"    }  ],  "coverage": {    "scope": "retained_account_usage",    "firstRecord": "string",    "historicalAttribution": "string"  }}