# guard402 > Reliability layer for AI agents. Content Firewall, Output Validator, and Loop Detector. Pay-per-call with USDC via x402. ## Overview guard402 provides three API endpoints that catch the problems agents can't catch themselves: - Agents trust malicious input → **Content Firewall** scans for prompt injection - Agents hallucinate facts → **Output Validator** cross-checks against context - Agents get stuck in loops → **Loop Detector** identifies stuck patterns No API keys. No accounts. Pay per call with USDC on Base or Solana via the x402 protocol. ## API Base URL https://api.guard402.com ## Endpoints ### POST /scan — Content Firewall ($0.001) Scans content for prompt injection attacks. Regex fast path + LLM fallback. Input: { "content": "...", "content_type": "text|html|markdown" } Output: { "safe": bool, "score": 0-1, "threats": [...], "sanitized": "..." } ### POST /validate — Output Validator ($0.005) Validates agent output against task and context for hallucinations. Input: { "task": "...", "output": "...", "context": "..." } Output: { "valid": bool, "confidence": 0-1, "issues": [...] } ### POST /check — Loop Detector ($0.001) Detects stuck agent patterns: repeater, looper, wanderer. Pure algorithmic, sub-ms. Input: { "session_id": "...", "step": N, "action": "...", "params": {}, "result": "...", "goal": "..." } Output: { "stuck": bool, "pattern": "repeater|looper|wanderer", "suggestion": "..." } ### GET /health — Free Returns service status, uptime, version. ### GET /.well-known/agent-card.json — Free A2A agent card for discovery. ## Payment (x402 Protocol) 1. Call any paid endpoint → receive HTTP 402 with payment details 2. Send USDC to the `payTo` address on Base or Solana 3. Retry with `X-PAYMENT` proof header → receive 200 with result Client libraries: x402-js, x402-python, x402-rs ## Links - Website: https://guard402.com - Blog: https://guard402.com/blog - Blog RSS: https://guard402.com/blog/feed.xml - API Docs: https://guard402.com/docs - OpenAPI Spec: https://guard402.com/openapi.yaml - Agent Card: https://api.guard402.com/.well-known/agent-card.json - Health: https://api.guard402.com/health