AI Credit Usage

Read individual users' AI credit usage

Changed on
<Note> **Organization Admin** permissions are required to use this endpoint. </Note>

List individual users' (up to 1,000 unique users per request) AI credit usage for the current billing period. Each user ID must be a member of the organization. Unknown, invalid, and duplicate IDs will fail the request.

Returns each user's credits used, in request order, plus the billing-period bounds. Users with no current usage will report 0.

post/v1/ai/credit-usage/users

Request

  • Base URL
    https://blobsrus.omniapp.co/api
  • URL
    https://blobsrus.omniapp.co/api/v1/ai/credit-usage/users
  • Auth
    • HTTP bearer
    • or HTTP bearer

Request body

userIdsstring[] required

Users to read usage for, at most 1000 per request. Each entry is a user's ID within this organization; each ID must be included only once. Duplicated IDs will result in an error.

Example request

{
  "userIds": [
    "f4a2b3c8-0d1e-4f5a-9b6c-7d8e9f0a1b2c"
  ]
}

Response

Each requested user's credit usage for the current billing period, in request order.

periodEndinteger required

End of the current billing period as a Unix ms timestamp (UTC calendar-month boundary).

periodStartinteger required

Start of the current billing period as a Unix ms timestamp (UTC calendar-month boundary).

Example response

{
  "users": [
    {
      "creditsUsed": 42,
      "userId": "f4a2b3c8-0d1e-4f5a-9b6c-7d8e9f0a1b2c"
    }
  ]
}

Changes