# turboshop.ai JSON Repair Guard

> turboshop.ai JSON Repair Guard is a paid API for AI agents from turboshop.ai, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-19).

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

## Facts

- Endpoint: GET https://turboshop.ai/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-19
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/turboshop-ai-json-repair-guard-b339e4fa
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_fNw8C6bruapWyF_qpY23b

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 turboshop-ai-json-repair-guard-b339e4fa
```

Example prompt: The LLM just returned some JSON wrapped in markdown code fences with trailing commas and unquoted keys — can you clean and repair it so it parses correctly, and validate it against this schema: {"type":"object","properties":{"name":{"type":"string"},"score":{"type":"number"}}}?

## When to prefer this

Choose this endpoint when your AI pipeline receives LLM-generated JSON that may contain markdown code fences, trailing commas, or unquoted keys and you need fast, automated repair before further processing. Particularly useful when you also need schema validation in the same step. Prefer over generic JSON linters when dealing specifically with LLM output artifacts.

## Known failure modes

- Input JSON too malformed to repair automatically — returns error with description of unparseable sections
- Target schema itself is invalid — returns schema validation error
- Empty or missing raw_text field — returns 400 bad request
- JSON repair produces output that still fails schema validation — returns repaired JSON alongside validation failure details

## 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 the repaired, valid JSON string with markdown fences removed, trailing commas fixed, and unquoted keys corrected. If a target schema is provided, also returns schema validation results indicating whether the repaired JSON conforms.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "raw_text": {
   "type": "string",
   "description": "LLM output containing malformed JSON, markdown fences, or trailing commas"
  },
  "client_id": {
   "type": "string",
   "description": "Optional calling agent ID"
  },
  "target_schema": {
   "type": "object",
   "description": "Optional JSON Schema to validate and repair against"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/turboshop-ai-json-repair-guard-b339e4fa/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from turboshop.ai](https://www.zero.xyz/host/turboshop.ai/llms.txt)
