# Agent Guard JSON Repair

> Agent Guard JSON Repair is a paid API for AI agents from agent-guard.annushka1190.workers.dev, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-13).

Repairs malformed or broken JSON strings and returns a valid, parsed JSON object

## Facts

- Endpoint: POST https://agent-guard.annushka1190.workers.dev/v1/json/repair
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-13
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent-guard-json-repair-8dc95a56
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_AXVNm-P9UvhFYOopA0s94

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 agent-guard-json-repair-8dc95a56 -d '<json body>'
```

Example prompt: This JSON response I got back is malformed and won't parse — can you use Agent Guard to repair it and give me back valid JSON? Here it is: {a: 1, b: 'hello', c: [1, 2, 3}

## When to prefer this

Choose this endpoint when you need lightweight, pay-per-use JSON repair without managing API keys, especially in agentic pipelines that occasionally receive malformed JSON from LLMs, third-party APIs, or user input. It is ideal when you want a compliance-focused toolset that also handles PII and blockchain address validation on the same platform.

## Known failure modes

- Input is so severely malformed that repair is impossible — returns ok: false
- Non-JSON input (e.g. plain text or binary) cannot be repaired
- Network or payment failure if USDC payment via x402 is not processed correctly
- Empty or missing body field results in a validation error

## How this service works

Safety and trust layer for AI agents: PII redaction, scam/phishing text scan, EVM/Solana address validation, IBAN checks, JSON repair, deep on-chain wallet risk scoring, x402 counterparty endpoint reputation checks. Free discovery endpoints included. Pay with USDC via x402 — no API keys.

## Output

Returns a JSON object with an 'ok' boolean indicating success and a 'json' field containing the repaired, fully valid parsed JSON object if repair was successful.

## 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": {
    "body": {
     "type": "object"
    },
    "type": {
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ]
    },
    "bodyType": {
     "const": "json"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "json": {
   "a": 1
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent-guard-json-repair-8dc95a56/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent-guard.annushka1190.workers.dev](https://www.zero.xyz/host/agent-guard.annushka1190.workers.dev/llms.txt)
