# AgentProof JSON Repair

> AgentProof JSON Repair is a paid API for AI agents from agentproof-murex.vercel.app, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Fixes malformed JSON strings and returns a valid, structured JSON output suitable for AI agent consumption.

## Facts

- Endpoint: POST https://agentproof-murex.vercel.app/json/repair
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentproof-murex-vercel-app-ca28db59
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_4GeSH-IhvCM0vGB5t1H7A

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 agentproof-murex-vercel-app-ca28db59 -d '<json body>'
```

Example prompt: This JSON string is broken and won't parse — can you repair it and give me back valid, structured JSON? Here it is: {"name": "Alice", "age": 30, "city": "New York",.}

## When to prefer this

Choose this endpoint when an AI agent or pipeline receives malformed, truncated, or syntactically invalid JSON that must be recovered without discarding the data. Especially useful when LLMs produce near-valid JSON with minor errors, or when external APIs return subtly broken payloads. Prefer this over manual parsing logic or regex hacks when you need a reliable, automated repair step in an agent workflow.

## Known failure modes

- Input is so severely corrupted that repair is impossible — returns error or best-effort partial output
- Input is not JSON-like at all (e.g., plain text or binary) — may return an error indicating unparseable input
- Ambiguous repairs where multiple valid interpretations exist — repair may silently choose one interpretation
- Service unavailable or timeout — HTTP 5xx response
- Payment not processed correctly — HTTP 402 payment required

## How this service works

JSON repair for AI agents - fix malformed JSON and return structured output.

## Output

Returns a valid, well-formed JSON object reconstructed from the malformed input, with syntax errors corrected, missing delimiters added, and structure normalized for downstream consumption.

## Example request

```json
{
 "schema": {
  "type": "object",
  "required": [
   "name",
   "age",
   "city"
  ],
  "properties": {
   "age": {
    "type": "number"
   },
   "city": {
    "type": "string"
   },
   "name": {
    "type": "string"
   }
  }
 },
 "response": {
  "age": 30,
  "city": "New York",
  "name": "Alice"
 }
}
```

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "oneOf": [
      {
       "type": "object",
       "required": [
        "input"
       ],
       "properties": {
        "input": {
         "description": "Malformed JSON string or JSON-compatible value to repair."
        }
       },
       "additionalProperties": true
      },
      {
       "type": "string",
       "description": "Malformed JSON string to repair."
      }
     ]
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "required": [
      "service",
      "endpoint",
      "valid",
      "changed",
      "repairedText",
      "parsed",
      "warnings"
     ],
     "properties": {
      "valid": {
       "type": "boolean"
      },
      "parsed": {
       "description": "Any JSON value."
      },
      "changed": {
       "type": "boolean"
      },
      "service": {
       "type": "string",
       "const": "AgentProof"
      },
      "endpoint": {
       "type": "string",
       "const": "json.repair"
      },
      "warnings": {
       "type": "array",
       "items": {
        "type": "string"
       }
      },
      "repairedText": {
       "type": "string"
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentproof-murex-vercel-app-ca28db59/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentproof-murex.vercel.app](https://www.zero.xyz/host/agentproof-murex.vercel.app/llms.txt)
