model management
Set Access Group Budget
Set or replace the shared budget of an access group. Idempotent.
Every key that can reach a model in the group draws from this one budget.
Example:
curl -X PUT 'http://localhost:4000/access_group/production-models/budget' \
-H "Authorization: Bearer $LITELLM_MASTER_KEY" \
-H 'Content-Type: application/json' \
-d '{
"max_budget": 100.0,
"budget_duration": "30d"
}'
Parameters:
- access_group: str - The access group name (URL path parameter)
- max_budget: Optional[float] - Requests fail once the group's shared spend exceeds this
- soft_budget: Optional[float] - Fires an alert when reached; requests still succeed
- budget_duration: Optional[str] - Frequency of resetting the group's spend (e.g. '30d')
- budget_id: Optional[str] - Link an existing budget instead of creating one
Returns:
- AccessGroupBudgetResponse with the stored budget and current spend
Raises:
- HTTPException 400: If no budget field is given, or budget_duration cannot be parsed
- HTTPException 404: If access group not found
put/access_group/{access_group}/budget
Request
- Base URL: https://docs.litellm.com.cn (the document declares no server; this is the origin it was published from)
- URL: https://docs.litellm.com.cn/access_group/{access_group}/budget
- Auth: API key in header x-litellm-api-key
Path parameters
access_groupstring required
Request body
Response
Successful Response
Changes
No recorded changes to this operation across all 1 revision of this API.