Skip to main content
This endpoint retrieves aggregated usage statistics for specific users. Use this to analyze user behavior, track token consumption, and calculate costs per user.

Use Cases

  • Analyze individual user behavior
  • Track token usage per user
  • Calculate per-user costs
  • Monitor user activity levels
  • Generate user-specific usage reports

Request Body

string[]
Array of user IDs to query. If not provided, returns data for all users.
object
Time range for filtering data
number
required
Start time as Unix timestamp in seconds
number
required
End time as Unix timestamp in seconds

Response

Returns a Result object containing an array of user statistics.
array
Array of user statistics objects
string
The user identifier
number
Total number of requests made by the user
number
Total prompt tokens consumed by the user
number
Total completion tokens generated for the user
number
Total cost in USD for the user’s requests
string | null
Error message if the request failed, null otherwise

Example Request

Example Response

Notes

  • Results are limited to 100 users per request
  • User IDs must match the values passed in the Helicone-User-Id header during request logging
  • Costs are calculated based on the model pricing at the time of the request
  • If no timeFilter is provided, defaults to all time