All guides

Add a Provider Safety Scan to Your Guardrails

Connect Azure AI Content Safety, AWS Bedrock Guardrails, Google Model Armor, or your own webhook to the same request path.

12 min read Updated October 2026LLM FinOps
On this page
  1. 01What you'll set up
  2. 02Why add a provider scan
  3. 03Choose a provider
  4. 04Turn on the provider scan
  5. 05Azure AI Content Safety
  6. 06AWS Bedrock Guardrails
  7. 07Google Model Armor
  8. 08Your own webhook
  9. 09Let Cloptima run the scan
  10. 10Choose where it scans and what it does
  11. 11Test it
  12. 12If something goes wrong

01

What you'll set up

You will connect one safety service to a guardrail profile, choose what it scans, and test that it catches what you expect. Local rules keep running first, so the provider only sees what they let through.

  • A provider integration on a guardrail profile
  • A credential for the provider, or Cloptima-run scanning
  • A scan direction and an action for provider findings
  • A test request that proves it works

You need an existing guardrail profile and an owner or admin role. Your organization uses one provider integration at a time, shared across the baseline and the policy's profile.

02

Why add a provider scan

Local rules find credentials and patterns you define. A provider scan adds meaning-aware checks that rules cannot do.

Local rules

  • Fast, with no extra network call
  • Credentials and patterns you define
  • No per-scan cost

Provider scan

  • Understands meaning, not just format
  • Prompt injection, jailbreaks, harmful content, sensitive information
  • Adds a call, and the provider bills for it
Local rules go first
  1. 1Local rules

    A block here skips the scan

  2. 2Cost and latency gate

  3. 3Provider scan

  4. 4The model

03

Choose a provider

Pick the service you already trust. You can use your own cloud account, or let Cloptima run the scan and draw from your AI credits.

ProviderChecksYou bringDefault timeout
Azure AI Content SafetyPrompt Shields, plus harm categories: Hate, SelfHarm, Sexual, ViolenceA Content Safety resource and key2 seconds
AWS Bedrock GuardrailsYour guardrail's filters, topics, words, sensitive information, groundingA guardrail id, version, and region3 seconds
Google Model ArmorPrompt injection, responsible-AI filters, malicious URLs, sensitive dataA template and a service account2 seconds
WebhookWhatever your service checksAn HTTPS endpoint2 seconds

Timeouts can be set from 1 millisecond to 10 seconds.

04

Turn on the provider scan

Open the guardrail profile, switch on Provider scan, and choose the Provider. The rest of the form changes to match.

AI → Policies → Guardrail profiles → Create guardrail profile
Provider scan
Send content to a third-party guardrail. One provider integration per organization across the baseline and policy profiles.On
Provider
Webhook
Webhook auth credential
No authentication
Webhook URL
https://guardrail.example.com/scan
Choose the provider, then its credential and settings.

05

Azure AI Content Safety

Create a Content Safety resource in Azure and copy its endpoint and a key.

  1. 1

    Add an Azure credential

    In the profile, add an Azure credential with the endpoint and key.

  2. 2

    Enter the Content Safety endpoint

    It must match the credential's endpoint, use HTTPS, and end in .cognitiveservices.azure.com, .azure.us, or .azure.cn.

  3. 3

    Choose the checks

    Turn on Prompt Shields, which scans prompts for jailbreak and prompt-injection attacks. Select harm categories for prompts and responses. At least one is required.

06

AWS Bedrock Guardrails

In AWS, create a guardrail and a version. You can use DRAFT or a numbered version.

  1. 1

    Add a Bedrock credential

    Use AWS access credentials that are allowed to apply the guardrail.

  2. 2

    Enter the details

    Provide the AWS region, the Guardrail ID, and the Guardrail version.

07

Google Model Armor

In Google Cloud, enable the Model Armor API and create a template with the filters you want.

  1. 1

    Create a service account

    Give it Model Armor User access on the template's project.

  2. 2

    Add the service account key

    Add it as a Google service account credential in the profile.

  3. 3

    Paste the template name

    Use the form projects/PROJECT/locations/REGION/templates/NAME.

08

Your own webhook

A webhook is the most flexible option. Host an HTTPS endpoint on a public address. The gateway sends the text and which direction it came from, and expects a yes or no.

The request and reply
POST https://guardrails.example.com/check
{ "text": "...", "direction": "input", "request_id": "..." }

200 OK
{ "allowed": false, "category": "confidential", "confidence": 0.92 }
python
from fastapi import FastAPI

app = FastAPI()

@app.post("/check")
def check(body: dict):
    flagged = "confidential" in body["text"].lower()
    return {"allowed": not flagged, "category": "confidential" if flagged else None}
  • The address must use HTTPS and be reachable on the public internet
  • A reply without a true or false allowed field counts as a failure
  • To authenticate calls, add a webhook auth credential and name the header. The default header is Authorization.
  • Webhook scans have no list price, so a cost cap never applies to them

09

Let Cloptima run the scan

For Azure, Bedrock, or Google you can choose the Cloptima-managed option instead of your own credential. The scan is billed to your AI credits.

  • You need AI credits available
  • You do not need a cloud account with the provider
  • Scans use Cloptima's resource, so you cannot choose a custom guardrail id or template

10

Choose where it scans and what it does

Provider scans follow the same Action on detection as the side they belong to.

SettingOptionsNotes
Provider scansPrompts only, Responses only, Prompts and responsesEach scan is billed by the provider
Action on detectionObserve, Redact, BlockA provider finding on a prompt blocks the request when the action is Redact, because provider text is not rewritten in place
Streamed responsesScan in short batches before sending, or scan once after the stream endsBatches can block before content reaches the user. One scan after the stream only flags.

To mask text in place, use a Redact rule in the profile. Use provider findings to block or to observe.

11

Test it

Send a request the provider should flag, then confirm the result.

  1. 1

    Send a test prompt

    Use content your provider is configured to flag. For a webhook, use text your handler rejects.

  2. 2

    Check the response

    With Block, you should see HTTP 403 and the reason gateway_guardrail_blocked. The violation name starts with guardrail_provider_.

  3. 3

    Check the audit log

    Provider findings that pass in Observe appear there.

12

If something goes wrong

Most problems are credentials or endpoints.

What you seeLikely causeFix
guardrail_provider_unavailable and a 403The provider timed out, rejected the call, or the credential is unusable, and your policy fails closedCheck the credential and endpoint, or set the policy's fail mode to fail open
The profile will not saveThe credential type does not match the provider, or an Azure endpoint does not match the credentialUse the credential type for that provider and the same endpoint
The profile will not save with a providerAnother profile already has a provider integrationYour organization uses one at a time, so remove the other first
Nothing is ever flaggedProvider scans is set to a direction that does not apply, or local rules block firstCheck the scan direction, and test with content only the provider flags

Put This Guide Into Practice

Cloptima automates the strategies described in this guide.

No credit card required
5-minute setup
Free trial