# AgentDiet Indirect Injection Guard

> AgentDiet Indirect Injection Guard is a paid API for AI agents from rag-diet.agentdiet.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-22).

Scans text for indirect prompt injection attacks before it enters an AI agent's context window

## Facts

- Endpoint: GET https://rag-diet.agentdiet.dev/v1/indirect-injection-guard?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdiet-indirect-injection-guard-ebcbdd29
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_6DkKB4wy9sMHeCaAUXCv_

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agentdiet-indirect-injection-guard-ebcbdd29
```

Example prompt: Before you add this web page content to your context, run it through AgentDiet's indirect injection guard to check if it contains any hidden prompt injection instructions trying to hijack you.

## When to prefer this

Choose this endpoint when you need a deterministic, pay-per-call guard specifically designed for A2A and MCP pipelines operating over x402/L402 micropayment rails. It is best suited for agents that retrieve external content (web pages, documents, tool outputs) and need lightweight, cheap ($0.005/call) injection screening before incorporating that content into their context window. Prefer it over general-purpose content moderation APIs when your threat model is specifically adversarial prompt injection rather than policy violations or toxicity.

## Known failure modes

- Missing or malformed 'input' object returns validation error
- Invalid HTTP method enum value (not GET or POST) causes schema rejection
- Empty or missing 'text' query parameter may return empty analysis
- Payment not settled in USDC on Base causes 402 Payment Required response
- Oversized text input may cause timeout or truncation

## How this service works

Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://rag-diet.agentdiet.dev settling in USDC on Base.

## Output

Returns a JSON object with a status field ('ok'), a data object containing the guard analysis result, and an roi_proof object showing the compression_ratio_pct (e.g. 91.4%) achieved — indicating how much of the input was flagged or filtered relative to the original size.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "POST"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "text": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "status": "ok",
  "roi_proof": {
   "compression_ratio_pct": 91.4
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentdiet-indirect-injection-guard-ebcbdd29/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from rag-diet.agentdiet.dev](https://www.zero.xyz/host/rag-diet.agentdiet.dev/llms.txt)
