# AgentDiet JSON Validator

> AgentDiet JSON Validator is a paid API for AI agents from status.agentdiet.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-10-22).

Validates raw JSON input and returns a structured validation result with compression ratio proof

## Facts

- Endpoint: GET https://status.agentdiet.dev/v1/json-validator?utm_source=zero.xyz
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdiet-json-validator-f722ff89
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_v-_DmWCSwaIA8sqC52KG3

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-json-validator-f722ff89
```

Example prompt: Can you validate this JSON string for me and tell me if it's well-formed: '{"name":"Alice","age":30,"active":true}'?

## When to prefer this

Choose this endpoint when you need a fast, deterministic JSON validation with a measurable compression/distillation proof — especially useful in A2A or MCP pipelines where you want to confirm payload integrity before passing data between agents. Prefer it over generic validators when you need the compression ratio metric alongside validation status.

## Known failure modes

- Invalid or missing 'raw_json' query parameter returns an error status
- Malformed JSON input that cannot be parsed returns a validation failure response
- Missing required 'type' or 'method' fields in input object causes a schema validation error
- Payment not settled in USDC on Base may result in 402 Payment Required response

## How this service works

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

## Output

Returns a JSON object with a 'status' field ('ok' or error), a 'data' object containing the parsed JSON if valid, and a 'roi_proof' object showing a compression_ratio_pct value (e.g. 91.4%) indicating how much the input was distilled.

## 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": {
      "raw_json": {
       "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-json-validator-f722ff89/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from status.agentdiet.dev](https://www.zero.xyz/host/status.agentdiet.dev/llms.txt)
