Set Member Budget
Cap a member’s monthly spend on your organization’s keys at /api/v1/org/members//budget
Overview
Gives an organization member a monthly budget in US dollars, so one person can’t use up the whole team’s balance. Admins can set the same budgets on the Members page.429 with code member_budget_exceeded until the 1st of next month (UTC), or until you raise or remove the budget. Their personal keys are not affected, and organization admins get an email when a member is paused.
The change takes effect immediately: a budget at or below what the member already spent this month pauses them now, and raising it resumes them. Spend updates about every 30 minutes, so a member can go slightly past the budget before the pause lands.
Send {"monthlyLimit": null} or call Remove Member Budget to remove the budget. Requires an organization API key owned by an organization admin.Authorizations
Morph API key, passed as Authorization: Bearer sk-.... Create keys at https://www.morphllm.com/dashboard/api-keys.
Path Parameters
Which member’s budget to set. The member’s user id, from List member budgets.
"user_2xKq8T1fJ3mZ5bR9cW7vN4pL6hD"
Body
The monthly budget in USD, or null to remove it.
The budget to set.
Monthly budget in USD, from 1 to 1000000 with at most two decimals. Null removes the budget.
"50.00"
Response
The member’s budget after the change.
A member’s monthly budget and spend.
The member’s user id.
"user_2xKq8T1fJ3mZ5bR9cW7vN4pL6hD"
Monthly budget in USD, two decimals. Null when the member has no budget.
"50.00"
The member’s spend on the organization’s keys this UTC month, in USD at the organization’s prices. Updated about every 30 minutes.
"12.34"
True once spend reached the budget. The member’s organization keys get 429 member_budget_exceeded until the budget is raised or removed, or the next UTC month starts.
false