# 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-23).

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

## Facts

- Endpoint: POST https://x402broker.com/v1/schema-repair?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-23
- 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-602fa9e1
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_jF9KcIY8wzJQdgTEQQ4xr

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-602fa9e1 -d '<json body>'
```

Example prompt: This JSON came back from the LLM with trailing commas and markdown fences and it's crashing my pipeline — can you repair it so it's valid JSON I can actually parse? Here's the raw output: ```json {"name": "Alice", "score": 42, } ```

## When to prefer this

Choose this endpoint when your multi-agent pipeline or LLM output pipeline frequently receives malformed, truncated, or markdown-wrapped JSON that crashes downstream processing. It is specifically designed for A2A and MCP use cases where deterministic JSON repair is needed at low cost ($0.002/call) with idempotent retry support via Idempotency-Key header.

## Known failure modes

- Input is so severely truncated that reconstruction is ambiguous — returns best-effort or error
- Input is not JSON at all (e.g. plain prose) — may return error or empty object
- Network timeout or upstream service unavailability — returns HTTP 5xx
- Payment authorization failure via x402 — returns HTTP 402
- Input minLength violation (empty string) — returns HTTP 400 validation error

## 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/schema-repair)

## Output

A repaired, valid JSON object that was previously malformed, truncated, or wrapped in markdown, ready to be used in downstream agent pipeline steps without parsing errors.

## 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-602fa9e1/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)
