Usage

Get Usage Stats

get

Get daily usage statistics for the API key's organization.

Returns paginated daily usage statistics with optional filtering by date range, model, provider, and source. Each record represents aggregated usage for a specific user/model/provider/source combination on a given date.

Query parameters
start_datestring · date-timeOptional

Start date for filtering (ISO format)

end_datestring · date-timeOptional

End date for filtering (ISO format)

modelstringOptional

Filter by specific model

model_providerstringOptional

Filter by model provider

sourcestringOptional

Filter by source (api or app)

limitinteger · min: 1 · max: 1000Optional

Number of records to return

Default: 100
offsetintegerOptional

Number of records to skip

Default: 0
Responses
200

Successful Response

application/json
get
GET /api/v1/usage/stats HTTP/1.1
Host: 
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "user_id": "123e4567-e89b-12d3-a456-426614174000",
    "org_id": "123e4567-e89b-12d3-a456-426614174000",
    "email": "text",
    "model": "text",
    "model_provider": "text",
    "source": "text",
    "input_tokens": 1,
    "output_tokens": 1,
    "total_tokens": 1,
    "total_requests": 1,
    "date": "2025-10-03T13:17:45.331Z",
    "created_at": "2025-10-03T13:17:45.331Z"
  }
]

Get Usage Summary

get

Get aggregated usage summary statistics for the API key's organization.

Returns high-level metrics including total tokens, requests, unique users, models, providers, and breakdown by API vs app usage.

Query parameters
start_datestring · date-timeOptional

Start date for summary (ISO format)

end_datestring · date-timeOptional

End date for summary (ISO format)

Responses
200

Successful Response

application/json
get
GET /api/v1/usage/summary HTTP/1.1
Host: 
Accept: */*
{
  "total_input_tokens": 1,
  "total_output_tokens": 1,
  "total_tokens": 1,
  "total_requests": 1,
  "unique_users": 1,
  "unique_models": 1,
  "unique_providers": 1,
  "api_usage": 1,
  "app_usage": 1,
  "date_range_days": 1
}

Export Usage Stats

get

Export daily usage statistics as CSV for the API key's organization.

Returns a CSV file containing all usage statistics within the specified date range. Suitable for analysis in spreadsheet applications or data processing tools.

Query parameters
start_datestring · date-timeOptional

Start date for export (ISO format)

end_datestring · date-timeOptional

End date for export (ISO format)

Responses
200

Successful Response

application/json
Responseany
get
GET /api/v1/usage/export HTTP/1.1
Host: 
Accept: */*

No content

Last updated