get_user_stats
Retrieve per-user request and cost analytics for a specified time range. Use for individual user usage tracking, not cohort trends.
Instructions
Return per-user request and cost analytics for a required time range. This is usage-by-user, not population metrics; use get_users_analytics for active-user or cohort trends. Enterprise-gated. Returns 403 on non-Enterprise Portkey plans.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| time_of_generation_min | Yes | Start time for the analytics period (ISO8601 format, e.g., '2024-01-01T00:00:00Z') | |
| time_of_generation_max | Yes | End time for the analytics period (ISO8601 format, e.g., '2024-02-01T00:00:00Z') | |
| total_units_min | No | Minimum number of total tokens to filter by | |
| total_units_max | No | Maximum number of total tokens to filter by | |
| cost_min | No | Minimum cost in cents to filter by | |
| cost_max | No | Maximum cost in cents to filter by | |
| status_code | No | Filter by specific HTTP status codes (comma-separated) | |
| virtual_keys | No | Filter by specific virtual key slugs (comma-separated) | |
| page_size | No | Number of results per page (for pagination) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | Whether the tool call succeeded and returned structured data | |
| data | No | Structured success payload when ok is true | |
| error | No | Structured error payload when ok is false |