/api/orgs/{org_id}/budgets/{budget_id}/membersSee who is spending a budget
Each member's spend this period from one organization, group, key or shared budget, highest first; members with no spend are left out, at most 500 rows. A row with a null user_id is a key no member created, named by api_key_id. For an Individual group budget (per_member: true) remaining_nano_usd and over_limit measure each member against the per-member limit; for every other budget the limit is the whole budget's, so they are null and false. A model budget answers an empty list. Org admin or the provisioning key. Money is integer nano-USD.
Authentication: Bearer API key in the Authorization header
Path parameters
org_idstringrequiredYour organization id (uuid).
GET /api/whoamireturns it.budget_idstringrequiredBudget id.
Responses
200The budget's members, highest spend first.
Response
budget_idstringrequiredscope_kindenumrequiredThe budget's scope; a model budget lists no members.
per_memberbooleanrequiredTrue for an Individual group budget:
limit_nano_usdapplies to each member.counts_byokbooleanrequiredWhether the budget also counts the org's own provider keys and plans at list price.
limit_nano_usdintegerrequiredThe budget's limit, integer nano-USD: per member when
per_memberis true, else the whole budget's.membersarray<object>requiredMembers with spend this period, highest first.
members
user_idstring | nullrequiredThe member who created the keys; null for a key created by no member (through the API), named by
api_key_id.emailstring | nullrequiredThe member's email, when known.
api_key_idstring | nullrequiredSet only when
user_idis null: the memberless key this entry counts.spent_nano_usdintegerrequiredThis member's spend from the budget this period, integer nano-USD.
byok_nano_usdintegerrequiredThe part of
spent_nano_usdon the org's own provider keys and plans at list price; 0 when the budget does not count them.remaining_nano_usdinteger | nullrequiredIndividual group budgets: what this member has left of
limit_nano_usd(never below 0). Null on every other budget.over_limitbooleanrequiredIndividual group budgets: this member reached the per-member limit. Always false on every other budget.
401Missing, unknown or revoked API key.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
403The key is not a provisioning key (inference keys are refused, reads included), or it is a customer-plan key.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
404Unknown organization or budget.
Response
errorstringrequiredHuman-readable message.
codestringStable machine reason, when the route defines one (for example
pro_required).actionstringStable remediation action, when the route defines one.
detailsobjectCustomer-safe string facts the caller needs to act (for example a suggested identifier).
Request
curl 'https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/budgets/c4a2e8f1-7b3d-4e9a-8c15-3f0d6b2a9e71/members' \
-H "Authorization: Bearer <YOUR_API_KEY>"Response
{
"budget_id": "c4a2e8f1-7b3d-4e9a-8c15-3f0d6b2a9e71",
"scope_kind": "identity",
"per_member": true,
"counts_byok": true,
"limit_nano_usd": 20000000000,
"members": [
{
"user_id": "2f6a9c1e-7b4d-4e08-9a35-c1d2e3f4a5b6",
"email": "ana@example.com",
"api_key_id": null,
"spent_nano_usd": 51550000000,
"byok_nano_usd": 1500000000,
"remaining_nano_usd": 0,
"over_limit": true
},
{
"user_id": null,
"email": null,
"api_key_id": "9c8b7a6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d",
"spent_nano_usd": 6000000000,
"byok_nano_usd": 0,
"remaining_nano_usd": 14000000000,
"over_limit": false
}
]
}https://api.experientiallabs.ai/api/orgs/3f6c2a1e-8b7d-4c2a-9e51-6a0d4b2f7c10/budgets/c4a2e8f1-7b3d-4e9a-8c15-3f0d6b2a9e71/members