# Deterministic A2A Broken-JSON Repair & Schema Validator

> Deterministic A2A Broken-JSON Repair & Schema Validator is a paid API for AI agents from x402broker.com, paid per call via MPP, $0.002/call, status unknown (last checked 2026-10-21).

Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) into valid JSON so multi-agent pipelines never crash.

## Facts

- Endpoint: GET https://x402broker.com/v1/repair?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Provider: x402broker.com
- Website: https://x402broker.com
- Canonical page: https://www.zero.xyz/c/x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-c53712d8
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_vtGci8QRocFzgSZwTp3EC

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 x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-c53712d8
```

Example prompt: The JSON I got back from the LLM has trailing commas and markdown code fences — can you repair it so it parses cleanly? Here it is: ```json {"name": "Alice", "age": 30,} ```

## When to prefer this

Choose this endpoint when your multi-agent or LLM pipeline receives JSON that fails to parse due to common LLM formatting errors like trailing commas, markdown fences, single quotes, or truncation. It is especially useful in automated A2A pipelines where a downstream agent must consume structured JSON and any malformed output would cause a crash. Prefer this over manual string-munging or GPT-based repair when you need deterministic, reproducible, low-cost correction at $0.002 per call.

## Known failure modes

- Input is so severely malformed that deterministic repair cannot infer intent — returns an error or best-effort partial result
- Input is not JSON at all (e.g. plain prose) — repair may fail or produce nonsensical output
- Extremely long or deeply nested truncated JSON may not be fully recoverable
- Network or payment (x402) failure results in no response

## How this service works

Repairs truncated or malformed LLM JSON outputs (trailing commas, markdown fences, single quotes) so multi-agent pipelines never crash. (Live x402 v2, IETF MPP & MCP endpoint at https://x402broker.com/v1/repair)

## Output

Returns a repaired, valid JSON object where malformed elements such as trailing commas, markdown code fences, single-quoted keys/values, and truncated structures have been corrected and the output is parseable by standard JSON parsers.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "raw_json"
 ],
 "properties": {
  "raw_json": {
   "type": "string",
   "minLength": 1,
   "description": "Malformed, truncated, or markdown-wrapped JSON string to deterministically repair"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "object"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x402broker-com-deterministic-a2a-broken-json-repair-schema-validator-c53712d8/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x402broker.com](https://www.zero.xyz/host/x402broker.com/llms.txt)
