Update README.md - key management

This commit is contained in:
Ishaan Jaff 2023-12-27 12:01:05 +05:30 committed by GitHub
parent f8180c351f
commit 6bb314c379
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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.