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

  • Tenant IDs (UUIDs or HashIDs)

  • the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

  • the date-time notation as defined by RFC 3339, section 5.6, for example, 2017-07-21T17:32:28Z

  • Integer numbers.

  • Integer numbers.

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
}