Quickstart
Get up and running with Guards in minutes.
1
Sign up and create a policy
2
Create an API key
Generate an API key to authenticate your requests.
- Go to API Keys
- Click Create API Key
- 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"
}'import requests
response = requests.post(
"https://api.guards.giskard.cloud/guards/v1/chat",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"messages": [
{"role": "user", "content": "My email is [email protected]"}
],
"policy_handle": "my-policy"
}
)
result = response.json()
if result["blocked"]:
print("Message was blocked:", result["action"])
else:
# Proceed with your LLM call
print("Message allowed")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
- Try the Playground to test policies interactively
- Explore detectors to learn about available detection capabilities
- Read the API reference for complete endpoint documentation