# Atinamos JSON Validate / Repair

> Atinamos JSON Validate / Repair is a paid API for AI agents from agent.atinamos.co.uk, paid per call via x402, $0.005/call, status unknown (last checked 2026-09-14).

Deterministically validates and conservatively repairs malformed JSON strings, reporting every transformation applied without inventing or hallucinating data.

## Facts

- Endpoint: POST https://agent.atinamos.co.uk/agent/json-repair
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/atinamos-json-validate-repair-7676dd85
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_9Q7QC26Kktom-HEZvW4_-

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 atinamos-json-validate-repair-7676dd85 -d '<json body>'
```

Example prompt: Can you validate and repair this JSON string from our AI pipeline — it has some trailing commas and single-quoted strings — and tell me exactly what was fixed: {name: 'Alice', scores: [1, 2, 3,]}

## When to prefer this

Prefer this endpoint when you need deterministic, auditable JSON repair with a full transformation log and zero risk of hallucinated or invented data. It is ideal for AI agent pipelines where LLM outputs are often nearly-valid JSON with common defects like trailing commas, single quotes, or Markdown wrappers. Choose this over an LLM-based repair approach when you need reproducibility, auditability, and guaranteed no data invention. Best for payloads up to 256KB.

## Known failure modes

- Input exceeds 262144 character limit — request rejected
- JSON is so malformed it cannot be conservatively repaired without inventing data — returns error rather than guessing
- Invalid mode value (not 'validate' or 'repair') — validation error
- Non-JSON-like content (e.g. binary data, HTML) that cannot be interpreted as JSON — returns failure with reason
- Network timeout or service unavailability — HTTP 5xx error
- Payment not received or insufficient — HTTP 402 error

## How this service works

Deterministic JSON validation and conservative repair for AI-agent payloads. Repairs unquoted object keys, single-quoted strings, trailing commas, Markdown code fences, UTF-8 BOMs and JSON-compatible Python literals, including nested or repeated defects. No LLM or invented data; every applied transformation is reported.

## Output

Returns the validated or repaired JSON string along with a structured list of every transformation that was applied (e.g. 'removed trailing comma at line 4', 'converted single-quoted strings to double-quoted'). In validate mode, returns a pass/fail result with any detected defects. No data is invented or hallucinated; only reversible, conservative fixes are applied.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "json": {
   "type": "string",
   "maxLength": 262144,
   "description": "JSON or JSON-like text to validate or conservatively repair. Supported repairs include unquoted object keys, single-quoted strings, trailing commas, Markdown fences, UTF-8 BOMs and JSON-compatible Python literals."
  },
  "mode": {
   "enum": [
    "validate",
    "repair"
   ],
   "type": "string",
   "default": "repair"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/atinamos-json-validate-repair-7676dd85/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent.atinamos.co.uk](https://www.zero.xyz/host/agent.atinamos.co.uk/llms.txt)
