# JSON Schema Repair Guard

> JSON Schema Repair Guard is a paid API for AI agents from robotshop.up.railway.app, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-12).

Strips markdown code fences, fixes trailing commas, repairs unquoted JSON keys, and validates repaired JSON against a strict schema for AI pipelines.

## Facts

- Endpoint: GET https://robotshop.up.railway.app/api/v1/products/prod-json-schema-repair-guard/buy?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/json-schema-repair-guard-d36046c3
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_BQ9I_U_mXaBIp5VV6--_-

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 json-schema-repair-guard-d36046c3
```

Example prompt: The LLM just returned a JSON blob wrapped in markdown code fences with a trailing comma and an unquoted key — can you run it through the JSON repair guard to strip the fences, fix the syntax errors, and validate it against the schema?

## When to prefer this

Choose this endpoint when your AI pipeline receives LLM-generated JSON that may contain markdown formatting artifacts (code fences), trailing commas, or unquoted keys, and you need both syntax repair and strict schema validation in a single fast call. Ideal for agentic workflows where raw model output must be sanitized before downstream processing.

## Known failure modes

- JSON too malformed to repair — returns error with details on unparseable content
- Schema validation failure after repair — returns repaired JSON alongside schema violation details
- Empty or null input — returns validation error
- Malformed input that is not JSON at all — returns parse error

## How this service works

Fast AST microservice that strips markdown code fences, fixes trailing commas, repairs unquoted JSON keys, and enforces strict schema validation for AI pipelines.

## Output

Returns a schema-validated, syntax-corrected JSON object with markdown code fences removed, trailing commas eliminated, and unquoted keys quoted. May include a validation status or error details if the repaired JSON still fails schema constraints.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "client_id": {
   "type": "string",
   "description": "Optional calling agent or client ID"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/json-schema-repair-guard-d36046c3/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from robotshop.up.railway.app](https://www.zero.xyz/host/robotshop.up.railway.app/llms.txt)
