palbaseDocs

Palbase ai · API

GET/ai/users/spend

List per-user direct AI spend

List per-user direct AI spend.

Called by your server, with the project's secret key.

Query

user_idstring · optionalFilter by end-user ID.
template_namestring · optionalFilter by template name.
period_kind"day" | "month" · optionalAggregation window (default day).
period_keystring · optionalUTC date or month key.
curl
curl -X GET "https://<your-ref>.palbase.studio/ai/users/spend" \
  -H "apikey: $PALBASE_SECRET_KEY"

Responses

200User spend summary

400HTTP 400 error

401HTTP 401 error

403HTTP 403 error

defaultAn error: the envelope names it (`error`) and explains it (`error_description`).

Operation ListUserSpend of ai's contract.