Get customer usage

Retrieve usage summary for a specific customer within a date range.

This endpoint provides aggregated metrics for a single customer, making it ideal for:

  • Customer billing and invoicing
  • Per-tenant usage dashboards
  • Customer-specific analytics
  • Usage-based pricing calculations
GET
/customers/{customerId}/usage
AuthorizationBearer <token>

Project API key

In: header

Path Parameters

customerId*string

Customer identifier to get usage for

Length1 <= length

Query Parameters

startDate*string

Start of the date range (ISO 8601 format)

Formatdate-time
endDate*string

End of the date range (ISO 8601 format)

Formatdate-time

Response Body

application/json

application/json

application/json

curl -X GET "https://api.limitry.com/v1/customers/string/usage?startDate=2019-08-24T14%3A15%3A22Z&endDate=2019-08-24T14%3A15%3A22Z"
{
  "customerId": "cust_123",
  "totalEvents": 500,
  "totalTokens": 200000,
  "totalInputTokens": 120000,
  "totalOutputTokens": 80000,
  "totalCostCents": 500
}
{
  "error": "Invalid request"
}
{
  "error": "Invalid or missing API key"
}