---
title: "Read individual users' AI credit usage"
method: POST
path: "/api/v1/ai/credit-usage/users"
tags: ["AI"]
---

# Read individual users' AI credit usage

`POST /api/v1/ai/credit-usage/users`

Read individual users' AI credit usage for the current billing period. Names the users by userId (the user's membership id in this organization); each id must be a member of the organization. Returns each user's credits used, in request order, plus the billing-period bounds. A user with no usage yet reports 0. At most 1000 ids per request; each userId may appear at most once. An unknown userId fails the whole request with a 404 naming it. This is a read, so it works even when credit-controls editing is disabled; it requires the same manage-user-attributes permission and per-user credit-limit feature flag as the per-user limit endpoints.

## Request body

- AiCreditUsageUsersBody
  - `userIds` string[], required — Users to read usage for, at most 1000 per request. Each entry is a user's id within this organization.

## Response `200`

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

- AiCreditUsageUsersResponse
  - `periodEnd` integer, required — End of the current billing period as a Unix ms timestamp (UTC calendar-month boundary).
  - `periodStart` integer, required — Start of the current billing period as a Unix ms timestamp (UTC calendar-month boundary).
  - `users` object[], required
    - `creditsUsed` number, required — Credits the id consumed in the current billing period. `0` when it has no usage yet.
    - `userId` string, uuid, required — The user's id within this organization.

## Other responses

- `400` — Invalid request. Common causes: an empty userIds array, more than 1000 ids, or a duplicated userId.
- `401` — Missing or invalid API key.
- `403` — Insufficient permissions, or per-user AI credit limits are not enabled for the organization.
- `404` — A userId is not a member of the organization; the response names the first invalid id.

---

[API](https://skmtc.net/omniapp/apis/omni-api.md) · [All operations](https://skmtc.net/omniapp/apis/omni-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/omniapp/omni-api/revisions/de7cac8b5983/schema)
