Quickstart

Get up and running with Guards in minutes.

1

Sign up and create a policy

Create an account and set up your first policy with detection rules.

  1. Sign up or log in to your account
  2. Go to Policies and click Create Policy
  3. Give it a name and handle (e.g., my-policy)
  4. Add a rule with the PII Detection detector and set action to Block
  5. Save your policy
2

Create an API key

Generate an API key to authenticate your requests.

  1. Go to API Keys
  2. Click Create API Key
  3. Copy the key and store it securely — it won't be shown again
3

Screen your first message

Send a request to the Guards API. This example sends a message containing an email address — the PII detector will catch it.

curl -X POST https://api.guards.giskard.cloud/guards/v1/chat \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "messages": [
      {"role": "user", "content": "My email is [email protected]"}
    ],
    "policy_handle": "my-policy"
  }'

Since the message contains an email address, Guards will return a block action:

{
  "blocked": true,
  "action": "block",
  "policy_handle": "my-policy",
  "event_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}

The blocked field tells you whether to proceed. Check Logs to see detection details.

Next steps