diff --git a/docs/my-website/docs/proxy/team_budgets.md b/docs/my-website/docs/proxy/team_budgets.md index 54f5efddff..9bfcb35d4c 100644 --- a/docs/my-website/docs/proxy/team_budgets.md +++ b/docs/my-website/docs/proxy/team_budgets.md @@ -12,6 +12,9 @@ Track spend, set budgets for your Internal Team - Set `max_budget=000000001` ($ value the team is allowed to spend) - Set `budget_duration="1d"` (How frequently the budget should update) + + + Create a new team and set `max_budget` and `budget_duration` ```shell @@ -35,8 +38,15 @@ Response "budget_reset_at": "2024-06-14T22:48:36.594000Z" } ``` + + + + + + + Possible values for `budget_duration` @@ -51,7 +61,11 @@ Possible values for `budget_duration` ### 2. Create a key for the `team` -Create a key for `team_id="de35b29e-6ca8-4f47-b804-2b79d07aa99a"` from Step 1 +Create a key for Team=`QA Prod Bot` and `team_id="de35b29e-6ca8-4f47-b804-2b79d07aa99a"` from Step 1 + + + + 💡 **The Budget for Team="QA Prod Bot" budget will apply to this team** @@ -67,11 +81,21 @@ Response ```shell {"team_id":"de35b29e-6ca8-4f47-b804-2b79d07aa99a", "key":"sk-5qtncoYjzRcxMM4bDRktNQ"} ``` + + + + + + ### 3. Test It Use the key from step 2 and run this Request twice + + + + ```shell curl -X POST 'http://0.0.0.0:4000/chat/completions' \ -H 'Authorization: Bearer sk-mso-JSykEGri86KyOvgxBw' \ @@ -100,6 +124,13 @@ On the 2nd response - expect to see the following exception } ``` + + + + + + + ## Advanced ### Prometheus metrics for `remaining_budget` diff --git a/docs/my-website/docs/proxy/users.md b/docs/my-website/docs/proxy/users.md index 364a3afea0..ba41dadada 100644 --- a/docs/my-website/docs/proxy/users.md +++ b/docs/my-website/docs/proxy/users.md @@ -62,6 +62,14 @@ curl --location 'http://0.0.0.0:4000/chat/completions' \ You can: - Add budgets to Teams +:::info + +**Step-by step tutorial on setting, resetting budgets on Teams here (API or using Admin UI)** + +👉 [https://docs.litellm.ai/docs/proxy/team_budgets](https://docs.litellm.ai/docs/proxy/team_budgets) + +::: + #### **Add budgets to teams** ```shell diff --git a/docs/my-website/img/create_key_in_team.gif b/docs/my-website/img/create_key_in_team.gif new file mode 100644 index 0000000000..80147be87b Binary files /dev/null and b/docs/my-website/img/create_key_in_team.gif differ diff --git a/docs/my-website/img/create_team_gif_good.gif b/docs/my-website/img/create_team_gif_good.gif new file mode 100644 index 0000000000..ede5cf4d7c Binary files /dev/null and b/docs/my-website/img/create_team_gif_good.gif differ diff --git a/docs/my-website/img/test_key_budget.gif b/docs/my-website/img/test_key_budget.gif new file mode 100644 index 0000000000..32a5374452 Binary files /dev/null and b/docs/my-website/img/test_key_budget.gif differ diff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.js index f501adb1a0..118066375c 100644 --- a/docs/my-website/sidebars.js +++ b/docs/my-website/sidebars.js @@ -43,8 +43,8 @@ const sidebars = { "proxy/cost_tracking", "proxy/self_serve", "proxy/users", - "proxy/customers", "proxy/team_budgets", + "proxy/customers", "proxy/billing", "proxy/user_keys", "proxy/virtual_keys",