OpenAPI 3.1.02026-08-226994571.1 MB

1e929292ddd5

Guardrails

Update Guardrail

Update an existing guardrail

👉 Guardrail docs

Example Request:

curl -X PUT "http://localhost:4000/guardrails/123e4567-e89b-12d3-a456-426614174000" \
    -H "Authorization: Bearer <your_api_key>" \
    -H "Content-Type: application/json" \
    -d '{
        "guardrail": {
            "guardrail_name": "updated-bedrock-guard",
            "litellm_params": {
                "guardrail": "bedrock",
                "mode": "pre_call",
                "guardrailIdentifier": "ff6ujrregl1q",
                "guardrailVersion": "1.0",
                "default_on": true
            },
            "guardrail_info": {
                "description": "Updated Bedrock content moderation guardrail"
            }
        }
    }'

Example Response:

{
    "guardrail_id": "123e4567-e89b-12d3-a456-426614174000",
    "guardrail_name": "updated-bedrock-guard",
    "litellm_params": {
        "guardrail": "bedrock",
        "mode": "pre_call",
        "guardrailIdentifier": "ff6ujrregl1q",
        "guardrailVersion": "1.0",
        "default_on": true
    },
    "guardrail_info": {
        "description": "Updated Bedrock content moderation guardrail"
    },
    "created_at": "2023-11-09T12:34:56.789Z",
    "updated_at": "2023-11-09T13:45:12.345Z"
}
put/guardrails/{guardrail_id}

Path parameters

guardrail_idstring required

Request body

Response

Successful Response

{"stackTrail":"paths:/guardrails/{guardrail_id}:put:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}