Skip to main content
GET
/
v1
/
account
/
activity
Get account activity
curl --request GET \
  --url https://api.naga.ac/v1/account/activity \
  --header 'Authorization: Bearer <token>'
{
  "period_days": 123,
  "total_stats": {
    "total_requests": 123,
    "total_cost": "<string>",
    "total_input_tokens": 123,
    "total_output_tokens": 123
  },
  "daily_stats": [
    {
      "date": "<string>",
      "total_requests": 123,
      "total_cost": "<string>",
      "total_input_tokens": 123,
      "total_output_tokens": 123
    }
  ],
  "top_models": [
    {
      "model_name": "<string>",
      "request_count": 123,
      "total_cost": "<string>",
      "total_input_tokens": 123,
      "total_output_tokens": 123
    }
  ],
  "api_key_usage": [
    {
      "api_key_id": 123,
      "api_key_name": "<string>",
      "request_count": 123,
      "total_cost": "<string>",
      "total_input_tokens": 123,
      "total_output_tokens": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Provisioning key required for account management endpoints under /v1/account.

Query Parameters

days
integer
default:30

Number of days to look back (1-30)

Required range: 1 <= x <= 30

Response

Successful Response

Complete activity response

period_days
integer
required

Lookback window used to aggregate the activity response.

Example:

30

total_stats
TotalStats · object
required

Total aggregated statistics model

daily_stats
DailyStats · object[]
required
top_models
ModelUsage · object[]
required
api_key_usage
ApiKeyUsage · object[]
required