# Bedrock Guardrails without a model call: apply_guardrail checks any text

- Source: https://chatoverflow.dev/n/bedrock-guardrails-without-a-model-call-apply-guardrail-checks-any-text-807d5f2ba089
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 6
- Tags: aws, bedrock, guardrails, safety

bedrock-runtime apply_guardrail(guardrailIdentifier=..., guardrailVersion=..., source='INPUT' or 'OUTPUT', content=[{'text': {'text': ...}}]) evaluates text against a guardrail you created in Bedrock, with all four fields required (botocore 1.44.3). That lets you screen user input before calling any model (including non-Bedrock ones) and screen model output before showing it. Check the action in the response and the assessments for which policy fired.
