---
title: "POST /guardrail-checks/invoke"
method: POST
path: "/guardrail-checks/invoke"
---

# POST /guardrail-checks/invoke

`POST /guardrail-checks/invoke`

Evaluates messages against inline guardrail checks. You specify the check configurations directly in the request, and Amazon Bedrock returns per-check results with severity or confidence scores.

## Request body

- object
  - `messages` GuardrailChecksMessage[], required — A list of messages to evaluate.
    - `role` 'user' | 'assistant' | 'system', required — The role of the message sender.
    - `content` GuardrailChecksContentBlock[], required — The content blocks for the message.
      - `text` string, password — The text content to evaluate.
  - `checks` object, required — The configuration for inline guardrail checks. Specify one or more check types to run against the messages.
    - `contentFilter` object — The content filter check configuration.
      - `categories` GuardrailChecksContentFilterCategoryConfig[], required — The content filter categories to evaluate.
        - `category` 'VIOLENCE' | 'HATE' | 'SEXUAL' | 'MISCONDUCT' | 'INSULTS', required — The content filter category to evaluate.
    - `promptAttack` object — The prompt attack check configuration.
      - `categories` GuardrailChecksPromptAttackCategoryConfig[], required — The prompt attack categories to evaluate.
        - `category` 'JAILBREAK' | 'PROMPT_INJECTION' | 'PROMPT_LEAKAGE', required — The prompt attack category to evaluate.
    - `sensitiveInformation` object — The sensitive information check configuration.
      - `entities` GuardrailChecksSensitiveInformationEntityConfig[], required — The sensitive information entity types to detect.
        - `type` 'ADDRESS' | 'AGE' | 'AWS_ACCESS_KEY' | 'AWS_SECRET_KEY' | 'CA_HEALTH_NUMBER' | 'CA_SOCIAL_INSURANCE_NUMBER' | 'CREDIT_DEBIT_CARD_CVV' | 'CREDIT_DEBIT_CARD_EXPIRY' | 'CREDIT_DEBIT_CARD_NUMBER' | 'DRIVER_ID' | 'EMAIL' | 'INTERNATIONAL_BANK_ACCOUNT_NUMBER' | 'IP_ADDRESS' | 'LICENSE_PLATE' | 'MAC_ADDRESS' | 'NAME' | 'PASSWORD' | 'PHONE' | 'PIN' | 'SWIFT_CODE' | 'UK_NATIONAL_HEALTH_SERVICE_NUMBER' | 'UK_NATIONAL_INSURANCE_NUMBER' | 'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER' | 'URL' | 'USERNAME' | 'US_BANK_ACCOUNT_NUMBER' | 'US_BANK_ROUTING_NUMBER' | 'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER' | 'US_PASSPORT_NUMBER' | 'US_SOCIAL_SECURITY_NUMBER' | 'VEHICLE_IDENTIFICATION_NUMBER', required — The PII entity type to detect.

## Response `200`

Success

- InvokeGuardrailChecksResponse
  - `results` object, required — The per-check results containing findings from the guardrail evaluation.
    - `contentFilter` object — The content filter check results.
      - `results` GuardrailChecksContentFilterResultEntry[], required — The per-category content filter results.
        - `category` 'VIOLENCE' | 'HATE' | 'SEXUAL' | 'MISCONDUCT' | 'INSULTS', required — The content filter category that was evaluated.
        - `severityScore` number, double, required — The severity score for the category, ranging from 0.0 to 1.0. Higher values indicate greater severity.
    - `promptAttack` object — The prompt attack check results.
      - `results` GuardrailChecksPromptAttackResultEntry[], required — The per-category prompt attack results.
        - `category` 'JAILBREAK' | 'PROMPT_INJECTION' | 'PROMPT_LEAKAGE', required — The prompt attack category that was evaluated.
        - `severityScore` number, double, required — The severity score for the category, ranging from 0.0 to 1.0. Higher values indicate greater severity.
    - `sensitiveInformation` object — The sensitive information check results.
      - `results` GuardrailChecksSensitiveInformationResultEntry[], required — The detected sensitive information entities.
        - `type` 'ADDRESS' | 'AGE' | 'AWS_ACCESS_KEY' | 'AWS_SECRET_KEY' | 'CA_HEALTH_NUMBER' | 'CA_SOCIAL_INSURANCE_NUMBER' | 'CREDIT_DEBIT_CARD_CVV' | 'CREDIT_DEBIT_CARD_EXPIRY' | 'CREDIT_DEBIT_CARD_NUMBER' | 'DRIVER_ID' | 'EMAIL' | 'INTERNATIONAL_BANK_ACCOUNT_NUMBER' | 'IP_ADDRESS' | 'LICENSE_PLATE' | 'MAC_ADDRESS' | 'NAME' | 'PASSWORD' | 'PHONE' | 'PIN' | 'SWIFT_CODE' | 'UK_NATIONAL_HEALTH_SERVICE_NUMBER' | 'UK_NATIONAL_INSURANCE_NUMBER' | 'UK_UNIQUE_TAXPAYER_REFERENCE_NUMBER' | 'URL' | 'USERNAME' | 'US_BANK_ACCOUNT_NUMBER' | 'US_BANK_ROUTING_NUMBER' | 'US_INDIVIDUAL_TAX_IDENTIFICATION_NUMBER' | 'US_PASSPORT_NUMBER' | 'US_SOCIAL_SECURITY_NUMBER' | 'VEHICLE_IDENTIFICATION_NUMBER', required — The PII entity type that was detected.
        - `confidenceScore` number, double, required — The confidence score for the detection, ranging from 0.0 to 1.0. Higher values indicate greater confidence.
        - `beginOffset` integer, required — The start character offset of the detected entity within the content block.
        - `endOffset` integer, required — The end character offset of the detected entity within the content block.
        - `messageIndex` integer, required — The zero-based index of the message in the input messages array where the entity was detected.
        - `contentIndex` integer, required — The zero-based index of the content block within the message where the entity was detected.
      - `truncated` boolean — Specifies whether the results were truncated because the number of detected entities exceeded the maximum limit.
  - `usage` object, required — The per-check text unit consumption for the guardrail evaluation.
    - `contentFilter` object — The text unit usage for the content filter check.
      - `textUnits` integer, required — The number of text units consumed by the content filter check.
    - `promptAttack` object — The text unit usage for the prompt attack check.
      - `textUnits` integer, required — The number of text units consumed by the prompt attack check.
    - `sensitiveInformation` object — The text unit usage for the sensitive information check.
      - `textUnits` integer, required — The number of text units consumed by the sensitive information check.

## Other responses

- `480` — AccessDeniedException
- `481` — ThrottlingException
- `482` — InternalServerException
- `483` — ServiceUnavailableException
- `484` — ValidationException

---

[API](https://skmtc.net/aws/apis/bedrock-runtime.md) · [All operations](https://skmtc.net/aws/apis/bedrock-runtime/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/bedrock-runtime/revisions/8a393198b636/schema)
