Get API key activity
Returns activity statistics for one API key over a selected period. period accepts day, week, month, or year; every boundary is UTC: day at 00:00 UTC, week on Monday at 00:00 UTC, month on the first day at 00:00 UTC, and year on January 1 at 00:00 UTC. With an organization Management Key, the caller may query only keys in that organization. The figures are that key's own spend, request count, token count, model breakdown, and time series, not the organization total; a key outside the caller's scope returns 404. Use format=csv for a CSV export.
/v1/keys/:id/activityAuthorizations
AuthorizationrequiredAPI key as bearer token in the Authorization header.
Path parameters
idrequiredThe ID of the API key whose activity should be returned.
Query parameters
periodStatistics period. day, week, month, and year all use UTC boundaries; defaults to month.
dayweekmonthyearformatOptional. Set to csv for a CSV export; omitted returns JSON.
csv