mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-05 18:24:49 +00:00
docs(users.md): update user docs to show reset budget
This commit is contained in:
@@ -413,6 +413,52 @@ curl 'http://0.0.0.0:4000/key/generate' \
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
### Reset Budgets
|
||||
|
||||
Reset budgets across keys/internal users/teams/customers
|
||||
|
||||
`budget_duration`: Budget is reset at the end of specified duration. If not set, budget is never reset. You can set duration as seconds ("30s"), minutes ("30m"), hours ("30h"), days ("30d").
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="users" label="Internal Users">
|
||||
|
||||
```bash
|
||||
curl 'http://0.0.0.0:4000/user/new' \
|
||||
--header 'Authorization: Bearer <your-master-key>' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"max_budget": 10,
|
||||
"budget_duration": 10s, # 👈 KEY CHANGE
|
||||
}'
|
||||
```
|
||||
</TabItem>
|
||||
<TabItem value="keys" label="Keys">
|
||||
|
||||
```bash
|
||||
curl 'http://0.0.0.0:4000/key/generate' \
|
||||
--header 'Authorization: Bearer <your-master-key>' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"max_budget": 10,
|
||||
"budget_duration": 10s, # 👈 KEY CHANGE
|
||||
}'
|
||||
```
|
||||
|
||||
</TabItem>
|
||||
<TabItem value="teams" label="Teams">
|
||||
|
||||
```bash
|
||||
curl 'http://0.0.0.0:4000/team/new' \
|
||||
--header 'Authorization: Bearer <your-master-key>' \
|
||||
--header 'Content-Type: application/json' \
|
||||
--data-raw '{
|
||||
"max_budget": 10,
|
||||
"budget_duration": 10s, # 👈 KEY CHANGE
|
||||
}'
|
||||
```
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Set Rate Limits
|
||||
|
||||
You can set:
|
||||
|
||||
Reference in New Issue
Block a user