(docs)virtual keys

This commit is contained in:
ishaan-jaff 2024-01-18 15:16:40 -08:00
parent 0e3e8050d7
commit cdede8836f

View file

@ -200,6 +200,7 @@ Request Params:
### Response ### Response
`token` is the hashed key (The DB stores the hashed key for security)
```json ```json
{ {
"key": "sk-02Wr4IAlN3NvPXvL5JVvDA", "key": "sk-02Wr4IAlN3NvPXvL5JVvDA",
@ -257,6 +258,30 @@ Request Params:
``` ```
## /key/delete
### Request
```shell
curl 'http://0.0.0.0:8000/key/delete' \
--header 'Authorization: Bearer <your-master-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
"keys": ["sk-kdEXbIqZRwEeEiHwdg7sFA"]
}'
```
Request Params:
- keys: List[str] - List of keys to delete
### Response
```json
{
"deleted_keys": ["sk-kdEXbIqZRwEeEiHwdg7sFA"]
}
```
## Tracking Spend ## Tracking Spend
You can get spend for a key by using the `/key/info` endpoint. You can get spend for a key by using the `/key/info` endpoint.