API Documentation
Guardian
<POST> ConfigureApp API
3 min
the payload below defines the configurable policy that a user can apply to validate the corresponding prompt/ response to apply the policy copy and replace the appropriate policy object in the request json payload as shown below select the correct policy variant based on execution mode ( "block" or "audit" ) and depending on the environment where the container is deployed ( "cpu" or "gpu" ) note this policy is fully customizable and can be modified to reflect the desired behavior of your application or integration audit cpu { "config language" "en", "config llm" "", "image analysis type" "", "input config" { "json" { "enabled" false }, "block competitor" { "comparison" "contains", "value" "" }, "block substring" { "comparison" "contains", "value" "" }, "allowed list" { "comparison" "contains", "value" "" }, "regex" { "value" "" }, "url detection" { "enabled" false }, "code detection" { "enabled" false }, "ban topic" { "value" "", "threshold" "high", "custom threshold" 0 }, "bci detection" { "enabled" false, "custom model name" "", "mode" "default", "threshold" "high", "custom threshold" 0 }, "toxicity" { "enabled" false, "threshold" "high", "custom threshold" 0 80 }, "generic harm" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "pii detection" { "enabled" false, "redaction" false }, "special pii detection" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "prompt injection / jailbreaks" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "secrets" { "enabled" false }, "not safe for work" { "enabled" false, "threshold" "low", "custom threshold" 0 }, "gender sensitive" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "token limit" { "value" "4096" }, "input rate limiter" { "value" "10" }, "invisible text" { "enabled" false }, "medical safety detection" { "enabled" false, "threshold" "low", "custom threshold" 0 85 }, "no llm output" { "enabled" false }, "malicious url detection" { "enabled" false }, "url reachability" { "enabled" false }, "sentiment" { "enabled" false, "threshold" "high", "custom threshold" 0 } }, "output config" {} } audit gpu { "config language" "en", "config llm" "", "image analysis type" "", "input config" { "json" { "enabled" false }, "block competitor" { "comparison" "contains", "value" "" }, "block substring" { "comparison" "contains", "value" "" }, "allowed list" { "comparison" "contains", "value" "" }, "regex" { "value" "" }, "url detection" { "enabled" false }, "code detection" { "enabled" false }, "ban topic" { "value" "", "threshold" "high", "custom threshold" 0 }, "bci detection" { "enabled" false, "custom model name" "", "mode" "default", "threshold" "high", "custom threshold" 0 }, "toxicity" { "enabled" false, "threshold" "high", "custom threshold" 0 80 }, "generic harm" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "pii detection" { "enabled" false, "redaction" false }, "special pii detection" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "prompt injection / jailbreaks" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "secrets" { "enabled" false }, "not safe for work" { "enabled" false, "threshold" "low", "custom threshold" 0 }, "gender sensitive" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "token limit" { "value" "4096" }, "input rate limiter" { "value" "10" }, "invisible text" { "enabled" false }, "medical safety detection" { "enabled" false, "threshold" "low", "custom threshold" 0 85 }, "no llm output" { "enabled" false }, "malicious url detection" { "enabled" false }, "url reachability" { "enabled" false }, "sentiment" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "contextual groundedness" {"enabled" true}, "answer relevance" {"enabled" true} }, "output config" {} } block cpu { "config language" "en", "config llm" "mistral", "image analysis type" "", "input config" { "json" { "enabled" false }, "block competitor" { "comparison" "contains", "value" "" }, "block substring" { "comparison" "contains", "value" "" }, "allowed list" { "comparison" "contains", "value" "" }, "regex" { "value" "" }, "url detection" { "enabled" false }, "code detection" { "enabled" false }, "ban topic" { "value" "", "threshold" "high", "custom threshold" 0 }, "bci detection" { "enabled" false, "custom model name" "", "mode" "default", "threshold" "high", "custom threshold" 0 }, "toxicity" { "enabled" false, "threshold" "high", "custom threshold" 0 80 }, "generic harm" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "pii detection" { "enabled" false, "redaction" false }, "special pii detection" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "prompt injection / jailbreaks" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "secrets" { "enabled" false }, "not safe for work" { "enabled" false, "threshold" "low", "custom threshold" 0 }, "gender sensitive" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "token limit" { "value" "4096" }, "input rate limiter" { "value" "10" }, "invisible text" { "enabled" false }, "medical safety detection" { "enabled" false, "threshold" "low", "custom threshold" 0 85 } }, "output config" { "json" { "enabled" false }, "block competitor" { "comparison" "contains", "value" "" }, "block substring" { "comparison" "contains", "value" "" }, "allowed list" { "comparison" "contains", "value" "" }, "blocked list" { "comparison" "contains", "value" "" }, "regex" { "value" "" }, "url detection" { "enabled" false }, "code detection" { "enabled" false }, "no llm output" { "enabled" false }, "malicious url detection" { "enabled" false }, "url reachability" { "enabled" false }, "ban topic" { "value" "", "threshold" "high", "custom threshold" 0 }, "bci detection" { "enabled" false, "custom model name" "", "mode" "default", "threshold" "high", "custom threshold" 0 }, "toxicity" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "generic harm" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "sentiment" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "pii detection" { "enabled" false, "redaction" false }, "special pii detection" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "secrets" { "enabled" false }, "not safe for work" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "gender sensitive" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "racial sensitive" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "medical safety detection" { "enabled" false, "threshold" "high", "custom threshold" 0 } } } block gpu { "config language" "en", "config llm" "mistral", "image analysis type" "", "input config" { "json" { "enabled" false }, "block competitor" { "comparison" "contains", "value" "" }, "block substring" { "comparison" "contains", "value" "" }, "allowed list" { "comparison" "contains", "value" "" }, "regex" { "value" "" }, "url detection" { "enabled" false }, "code detection" { "enabled" false }, "ban topic" { "value" "", "threshold" "high", "custom threshold" 0 }, "bci detection" { "enabled" false, "custom model name" "", "mode" "default", "threshold" "high", "custom threshold" 0 }, "toxicity" { "enabled" false, "threshold" "high", "custom threshold" 0 80 }, "generic harm" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "pii detection" { "enabled" false, "redaction" false }, "special pii detection" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "prompt injection / jailbreaks" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "secrets" { "enabled" false }, "not safe for work" { "enabled" false, "threshold" "low", "custom threshold" 0 }, "gender sensitive" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "token limit" { "value" "4096" }, "input rate limiter" { "value" "10" }, "invisible text" { "enabled" false }, "medical safety detection" { "enabled" false, "threshold" "low", "custom threshold" 0 85 } }, "output config" { "json" { "enabled" false }, "block competitor" { "comparison" "contains", "value" "" }, "block substring" { "comparison" "contains", "value" "" }, "allowed list" { "comparison" "contains", "value" "" }, "blocked list" { "comparison" "contains", "value" "" }, "regex" { "value" "" }, "url detection" { "enabled" false }, "code detection" { "enabled" false }, "no llm output" { "enabled" false }, "malicious url detection" { "enabled" false }, "url reachability" { "enabled" false }, "ban topic" { "value" "", "threshold" "high", "custom threshold" 0 }, "bci detection" { "enabled" false, "custom model name" "", "mode" "default", "threshold" "high", "custom threshold" 0 }, "toxicity" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "generic harm" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "sentiment" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "pii detection" { "enabled" false, "redaction" false }, "special pii detection" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "secrets" { "enabled" false }, "not safe for work" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "gender sensitive" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "racial sensitive" { "enabled" false, "threshold" "high", "custom threshold" 0 }, "medical safety detection" { "enabled" false, "threshold" "high", "custom threshold" 0 },, "contextual groundedness" {"enabled" true}, "answer relevance" {"enabled" true} } } request body definitions the table below provides a detailed breakdown of all fields included in the api request body it describes each field's purpose, type, and possible values to help you configure the api effectively with examples true false 178,87,461,229false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type true false 136,176false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type false unhandled content type