List

List Guardrails

List the guardrails that are available on the proxy server

👉 Guardrail docs

Example Request:

curl -X GET "http://localhost:4000/guardrails/list" -H "Authorization: Bearer <your_api_key>"

Example Response:

{
    "guardrails": [
        {
        "guardrail_name": "bedrock-pre-guard",
        "guardrail_info": {
            "params": [
            {
                "name": "toxicity_score",
                "type": "float",
                "description": "Score between 0-1 indicating content toxicity level"
            },
            {
                "name": "pii_detection",
                "type": "boolean"
            }
            ]
        }
        }
    ]
}
GET/guardrails/list
Authorization
Response

Successful Response

Body
guardrails*Guardrails
Request
const response = await fetch('/guardrails/list', {
    method: 'GET',
    headers: {},
});
const data = await response.json();
Response
{
  "guardrails": [
    {
      "guardrail_name": "text"
    }
  ]
}