AppAIGatewayDocs
API referenceAdmin operations

Get grouped application usage

GET
/v1/admin/apps/{app}/usage/breakdown

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

Path Parameters

app*string

Query Parameters

from?string

Inclusive YYYY-MM-DD start; defaults to 29 days before to.

Match^\d{4}-\d{2}-\d{2}$
to?string

Inclusive YYYY-MM-DD end; defaults to today.

Match^\d{4}-\d{2}-\d{2}$
by?string

Which dimension to group by. Defaults to model. install groups an App Attest application's traffic by the install — the App Attest key — that made it; server applications have none.

Default"model"

Value in

  • "model"
  • "provider"
  • "provider_slug"
  • "provider_gateway"
  • "credential_source"
  • "model_author"
  • "user"
  • "install"
  • "status"
  • "cost_source"
  • "route"
  • "endpoint"
  • "app_version"
limit?integer
Range1 <= value <= 200
Default50

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/admin/apps/string/usage/breakdown"
{  "app_id": "string",  "by": "model",  "from": "string",  "to": "string",  "rows": [    {      "requests": 0,      "input_tokens": 0,      "cached_input_tokens": 0,      "cache_write_tokens": 0,      "output_tokens": 0,      "cost_usd": 0,      "errors": 0,      "key": "string"    }  ]}