From fe1f5369ab446760050ca5072dbaf1f95b27f1b8 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Tue, 14 May 2024 11:47:43 -0700 Subject: [PATCH] docs - global/spend/reset --- docs/my-website/docs/proxy/cost_tracking.md | 25 +++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/docs/my-website/docs/proxy/cost_tracking.md b/docs/my-website/docs/proxy/cost_tracking.md index d4760d83f..8a43d1c9d 100644 --- a/docs/my-website/docs/proxy/cost_tracking.md +++ b/docs/my-website/docs/proxy/cost_tracking.md @@ -126,6 +126,31 @@ Output from script +## Reset Team, API Key Spend - MASTER KEY ONLY + +Use `/global/spend/reset` if you want to: +- Reset the Spend for all API Keys, Teams. The `spend` for ALL Teams and Keys in `LiteLLM_TeamTable` and `LiteLLM_VerificationToken` will be set to `spend=0` + +- LiteLLM will maintain all the logs in `LiteLLMSpendLogs` for Auditing Purposes + +### Request +Only the `LITELLM_MASTER_KEY` you set can access this route +```shell +curl -X POST \ + 'http://localhost:4000/global/spend/reset' \ + -H 'Authorization: Bearer sk-1234' \ + -H 'Content-Type: application/json' +``` + +### Expected Responses + +```shell +{"message":"Spend for all API Keys and Teams reset successfully","status":"success"} +``` + + + + ## Spend Tracking for Azure Set base model for cost tracking azure image-gen call