All guides

Create Your First Guardrail Profile

Keep credentials and personal data out of every AI request with a guardrail profile, and apply it to every policy as your organization baseline.

10 min read Updated November 2026Guardrails
On this page
  1. 01What you'll set up
  2. 02How a profile protects a request
  3. 03Create the profile
  4. 04Make it your organization baseline
  5. 05Choose what to protect
  6. 06Choose Redact or Block
  7. 07Add your own rules
  8. 08Add content safety
  9. 09Create it
  10. 10Test it with a real request
  11. 11Roll out with confidence
  12. 12What is checked
  13. 13If something goes wrong

01

What you'll set up

You will create a guardrail profile that keeps credentials out of every request your apps send to a model, make it your organization baseline, and test it with a real request.

  • A profile with the Cloptima Secrets template
  • Redact or Block for each template and rule
  • Optional content safety, and what happens if its scan can't run
  • The profile set as your organization baseline
  • A test that shows what the model actually receives

You need an owner or admin role and an AI plan. Nothing is checked until you create a profile, so you decide exactly what is protected.

02

How a profile protects a request

A profile does two jobs. It protects sensitive data in every request before the model sees it, and it can check requests and responses for harmful content.

Where the checks run
  1. 1Your app sends a request

  2. 2Protect sensitive data

    Redact or block, before the model sees it

  3. 3Content safety

    Optional, checks the request

  4. 4The model

  5. 5Content safety

    Optional, checks the response

  6. 6Your app gets the answer

    Redacted values come back

Data rules check the whole request: the system prompt, earlier turns, and the new message. A redacted value never reaches the model provider or a content-safety vendor, and your app still gets it back in the response, so your workflows keep working.

03

Create the profile

Open AI → Guardrails and choose New profile. Give the profile a clear name, such as Company baseline. The description is optional.

AI → Guardrails → New profile
Name
Company baseline
Description
Optional
Name the profile for what it protects.

04

Make it your organization baseline

Switch on Org baseline and the profile applies to every policy. A policy can add one more profile for a team's own data, in the Guardrails field of its Basics section.

AI → Guardrails → Create guardrail profile
Org baseline
Applies to every policy and always enforces, even under a policy that observes. A block in either profile wins.On
One baseline, applied to every policy.
Baseline saysTeam profile saysResult
Secrets: RedactProject codenames: BlockCredentials are redacted everywhere. The codenames are blocked for that team.
US personal data: RedactUS personal data: BlockThat team's personal data is blocked. A block in either profile wins.

A team profile can add protection, and it can never weaken the baseline.

05

Choose what to protect

Under Protect sensitive data, switch on the Cloptima templates that fit your data. Each template is a ready set of rules that Cloptima maintains.

TemplateWhat it finds
SecretsAPI keys and tokens from major cloud, AI, and developer platforms, private keys, bearer tokens, and values assigned to a password or key name
Source code secretsPasswords inside connection URLs, and JSON Web Tokens
US, European, UK, Canadian, Indian, and Australian personal dataEmail addresses, national ID numbers, phone numbers, and card numbers in each region's formats
Financial identifiersSSNs, IBANs, and card numbers, while names, email addresses, and phone numbers keep flowing to your sales and CRM workflows
US financial dataCard numbers, bank routing and account numbers, IBANs, SWIFT codes, and crypto wallet addresses
US healthcare dataMedical record, health plan, and Medicare numbers, and other HIPAA identifiers
Infrastructure identifiersIP and MAC addresses, AWS ARNs and account IDs, and internal host names

Secrets is available on every plan with guardrails. The other templates, custom rules, and content safety come with AI Growth and Enterprise.

A template stays at the version you chose. When Cloptima publishes an improved version, the profile tells you, and you decide when to update.

06

Choose Redact or Block

Each template you switch on has its own action, and so does each custom rule. Redact is the default.

ActionWhat happensUse it for
RedactThe match becomes a placeholder before the model sees it. When the answer repeats the placeholder, your app gets the original value back.Credentials and personal data your work still needs
BlockA match in the new message refuses the request with a clear reasonData that must never reach a model
AI → Guardrails → Create guardrail profile

Protect sensitive data

Secrets
Credentials with a known shape: cloud, AI, and source-control keys and tokens, private keys, bearer tokens, and values assigned to a password or key name.On
Secrets action
Redact
Switch on a template, then choose Redact or Block.

A match in an earlier turn of the conversation is always redacted, so a refused message never locks a conversation.

07

Add your own rules

Choose Add custom rule for data that only your business has, such as project codenames or employee IDs.

MatchFinds
Term listFixed words and names, as whole words in any letter case
Regular expression (RE2)Formats, such as account numbers and host names
Labeled value (RE2)A value next to its label, such as Employee ID: E123456. Only the value is replaced.
AI → Guardrails → Create guardrail profile → Add custom rule
Rule ID
project_codenames
Match
Term list
On match
Block
Terms (one per line)
project falcon internal-only

Each term matches as whole words, in any letter case.

Terms for names, patterns for formats.

The guide on custom guardrail rules covers patterns, labeled values, and tuning in depth.

08

Add content safety

Switch on Content safety to check requests and responses for harmful content and block it. The check sees the text after your data rules redact it, so a vendor never sees a protected value.

ImplementationYou bring
Cloptima-managed (billed to AI credits)Nothing. Cloptima runs the scan, and it draws from your AI credits.
Azure AI Content SafetyAn Azure credential and the Content Safety endpoint
AWS Bedrock GuardrailsA Bedrock credential, the AWS region, and your guardrail ID and version
Google Model ArmorA Google service account and your Model Armor template
WebhookYour HTTPS endpoint, with optional authentication

Then choose If the scan can't run. Continue on local rules keeps traffic flowing on your data rules, and the request is listed as Not checked in Audit. Block the request refuses it until the scan runs again.

AI → Guardrails → Create guardrail profile
Content safety
Checks requests and responses for harmful content and blocks it. The check sees text after your data rules redact it. Content safety goes in the org baseline or in policy profiles, not both, so a request is checked once.On
Implementation
Cloptima-managed (billed to AI credits)
If the scan can't run
Continue on local rules

A request that continues is listed as Not checked in Audit.

Pick who runs the scan, and what happens if it cannot run.

09

Create it

Choose Create profile. The profile is live at once. Every save publishes a new version, and the version history and audit log record each change.

10

Test it with a real request

Send a prompt that contains a fake credential through your virtual key, and see what happens.

bash
curl https://api.cloptima.ai/v1/ai/chat/completions \
  -H "Authorization: Bearer $CLOPTIMA_VIRTUAL_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model": "gpt-5.4-mini", "messages": [{"role": "user", "content": "Debug this config: api_key = abc123def456ghi789"}]}'
Secrets actionWhat you see
RedactA normal response. The model received a placeholder such as [SECRET_K7Q2M4XAB3CD] instead of the key, and any placeholder in the answer comes back to your app as the original value.
BlockHTTP 403 with the reason gateway_guardrail_blocked
HTTP 403
{
  "error": "Your AI request was blocked because it matched a configured safety rule.",
  "reason": "gateway_guardrail_blocked",
  "violations": ["secret_assignment"]
}

11

Roll out with confidence

A guardrail you trust is one you have watched work. Your policies' Monitor only mode lets you see a profile's effect before it changes any traffic.

  1. 1

    Watch first

    Attach the profile to a policy in Monitor only. The profile records what it would redact or block, and changes nothing. Requests it would have blocked appear in Audit, under Policy violations.

  2. 2

    Redact

    Switch the policy to Enforce. Credentials and personal data stop reaching models, and work continues.

  3. 3

    Block what must never leave

    Move the templates and rules that matter most to Block.

  4. 4

    Make it the baseline

    Switch on Org baseline when the profile fits every team.

12

What is checked

Data rules check every part of each request. Content safety checks the new message and the response, including streamed responses as they arrive.

Responses are never rewritten by your data rules. Each placeholder in a response is replaced with your original value before your app sees it.

The number of profiles and custom rules you can create depends on your plan.

13

If something goes wrong

Most surprises come from where a profile is attached, or from the policy's mode.

What you seeLikely causeFix
Nothing is redacted or blockedNo baseline is set and the policy has no profileSwitch on Org baseline, or choose the profile in the policy's Guardrails field
The policy list shows No guardrailsNo baseline exists and the policy has no profileCreate a baseline or attach a profile
Audit shows Would have blocked, and traffic is unchangedThe policy is in Monitor onlySwitch the policy to Enforce, or make the profile the org baseline
Too much is blockedA template or rule is set to BlockSet it to Redact while you tune
Requests show as Not checkedThe content-safety scan could not runFollow the fix Audit shows for the cause

Put This Guide Into Practice

Cloptima automates the strategies described in this guide.

No credit card required
5-minute setup
Free plan