# Deterministic A2A Broken-JSON Repair & Schema Validator

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

Repairs truncated or malformed LLM-generated JSON (trailing commas, markdown fences, single quotes) to prevent multi-agent pipeline crashes

## Facts

- Endpoint: GET https://hn-pulse.agentdiet.dev/v1/structured-output?utm_source=zero.xyz
- Price: $0.002/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-21
- Activations on Zero: 0
- Provider: hn-pulse.agentdiet.dev
- Website: https://hn-pulse.agentdiet.dev
- Canonical page: https://www.zero.xyz/c/hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6216f46f
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zz8GDi7tg_VR7ojxspqqW

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 hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6216f46f
```

Example prompt: This JSON from our LLM pipeline is broken — it has trailing commas and markdown code fences around it. Can you deterministically repair it and give me back valid JSON? Here's the raw output: ```json {"name": "Alice", "score": 42, } ```

## When to prefer this

Choose this endpoint when your multi-agent or LLM pipeline frequently produces malformed JSON (trailing commas, markdown code fences, single-quoted keys) that needs deterministic — not heuristic or model-based — repair before downstream processing. Ideal for production pipelines where reliability and reproducibility matter more than creative recovery. Prefer over ad-hoc regex hacks or re-prompting the LLM when you need consistent, fast, low-cost ($0.002/call) sanitization at scale.

## Known failure modes

- Input JSON too severely truncated or corrupted to deterministically repair — returns error or best-effort partial result
- Input string is empty or whitespace — validation error due to minLength:1 requirement
- JSON structure is ambiguous after repair — deterministic rules may produce unexpected but valid output
- Payment required (HTTP 402) if x402 micropayment header not included
- Rate limiting or service unavailability causing timeout

## 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://hn-pulse.agentdiet.dev/v1/structured-output)

## Output

A repaired, valid JSON object parsed from the input malformed string. Trailing commas, markdown fences, single quotes, and other common LLM output artifacts are corrected. The response schema is a generic JSON object reflecting the repaired structure.

## 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/hn-pulse-agentdiet-dev-deterministic-a2a-broken-json-repair-schema-6216f46f/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from hn-pulse.agentdiet.dev](https://www.zero.xyz/host/hn-pulse.agentdiet.dev/llms.txt)
