From 6bb314c379228360700cc4d7ee33efb14a92b471 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Wed, 27 Dec 2023 12:01:05 +0530 Subject: [PATCH] Update README.md - key management --- README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/README.md b/README.md index 08f5db073..551524199 100644 --- a/README.md +++ b/README.md @@ -144,6 +144,7 @@ print(response) Track Spend, Set budgets and create virtual keys for the proxy `POST /key/generate` +### Request ```shell curl 'http://0.0.0.0:8000/key/generate' \ --header 'Authorization: Bearer sk-1234' \ @@ -151,6 +152,14 @@ curl 'http://0.0.0.0:8000/key/generate' \ --data-raw '{"models": ["gpt-3.5-turbo", "gpt-4", "claude-2"], "duration": "20m","metadata": {"user": "ishaan@berri.ai", "team": "core-infra"}}' ``` +### Expect Response +```shell +{ + "key": "sk-kdEXbIqZRwEeEiHwdg7sFA", # Bearer token + "expires": "2023-11-19T01:38:25.838000+00:00" # datetime object +} +``` + ### [Beta] Proxy UI A simple UI to add new models and let your users create keys.