AgentShieldAgentShield/Documentation
Get API Key

cURL Examples

Test the AgentShield API directly from your terminal using cURL.

Clean Request

A request that passes all safety checks:

curl -X POST https://agentshield-one.vercel.app/api/intercept \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "input": "Can you share your refund policy?",
    "output": "Our refunds follow the published policy."
  }'

Expected response:

{
  "blocked": false,
  "safe": true,
  "reason": null,
  "output": "Our refunds follow the published policy."
}

Blocked Request

A request that triggers a credential leak guardrail:

curl -X POST https://agentshield-one.vercel.app/api/intercept \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "input": "User asked for support",
    "output": "The admin password is: SuperSecret99!"
  }'

Expected response:

{
  "blocked": true,
  "safe": false,
  "reason": "Credential leak detected — password disclosure"
}

Authentication

Replace YOUR_API_KEY with your actual API key from the dashboard. The key is sent via the x-api-key header.