Users Usage Summary
Credit totals per user for the selected window, highest first by default.
Requires an API key for a user who can view usage: an MSP user sees the tenants their MSP manages; a tenant admin sees their own company. Other users receive 403.
Query Parameters
- Type: array of stringnullabletenant
_ids Tenant IDs (UUIDs or HashIDs)
- Type: stringnullablepreset
- Type: stringFormat: date-timenullablestart
the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z
- Type: stringFormat: date-timenullableend
the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z
- Type: integernullablelimit
Integer numbers.
- Type: integernullableoffset
Integer numbers.
- Type: stringnullablesort
_dir
Responses
- application/json
- application/json
- application/json
Request Example for get/usage/users/summary
curl 'https://ai.hatz.ai/v1/usage/users/summary?sort_dir=desc' \
--header 'X-API-Key: YOUR_SECRET_TOKEN'
{
"users": [
{
"user_id": "string",
"email": "string",
"first_name": "string",
"last_name": "string",
"input_credits": 0,
"output_credits": 0,
"total_credits": 0,
"run_count": 0
}
],
"count": 1,
"limit": 1,
"offset": 1
}