forked from phoenix/litellm-mirror
doc controlling guardrail per api key
This commit is contained in:
parent
23f8d23acb
commit
62ebcc0bb5
1 changed files with 24 additions and 1 deletions
|
@ -605,10 +605,13 @@ https://api.groq.com/openai/v1/ \
|
||||||
|
|
||||||
**Step 1** Create Key with `hide_secrets` Off
|
**Step 1** Create Key with `hide_secrets` Off
|
||||||
|
|
||||||
👉 Set `"permissions": {"secret_detection": false}`
|
👉 Set `"permissions": {"secret_detection": false}` with either `/key/generate` or `/key/update`
|
||||||
|
|
||||||
This means the `hide_secrets` guardrail is off for all requests from this API Key
|
This means the `hide_secrets` guardrail is off for all requests from this API Key
|
||||||
|
|
||||||
|
<Tabs>
|
||||||
|
<TabItem value="/key/generate" label="/key/generate">
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
curl --location 'http://0.0.0.0:4000/key/generate' \
|
curl --location 'http://0.0.0.0:4000/key/generate' \
|
||||||
--header 'Authorization: Bearer sk-1234' \
|
--header 'Authorization: Bearer sk-1234' \
|
||||||
|
@ -622,6 +625,26 @@ curl --location 'http://0.0.0.0:4000/key/generate' \
|
||||||
# {"permissions":{"hide_secrets":false},"key":"sk-jNm1Zar7XfNdZXp49Z1kSQ"}
|
# {"permissions":{"hide_secrets":false},"key":"sk-jNm1Zar7XfNdZXp49Z1kSQ"}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
<TabItem value="/key/update" label="/key/update">
|
||||||
|
|
||||||
|
```shell
|
||||||
|
curl --location 'http://0.0.0.0:4000/key/update' \
|
||||||
|
--header 'Authorization: Bearer sk-1234' \
|
||||||
|
--header 'Content-Type: application/json' \
|
||||||
|
--data '{
|
||||||
|
"key": "sk-jNm1Zar7XfNdZXp49Z1kSQ",
|
||||||
|
"permissions": {"hide_secrets": false}
|
||||||
|
}'
|
||||||
|
```
|
||||||
|
|
||||||
|
```shell
|
||||||
|
# {"permissions":{"hide_secrets":false},"key":"sk-jNm1Zar7XfNdZXp49Z1kSQ"}
|
||||||
|
```
|
||||||
|
|
||||||
|
</TabItem>
|
||||||
|
</Tabs>
|
||||||
|
|
||||||
**Step 2** Test it with new key
|
**Step 2** Test it with new key
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue