# Machine Shop – Repair JSON

> Machine Shop – Repair JSON is a paid API for AI agents from api.pay-forge.online, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-20).

Parses and repairs malformed JSON text, returning the corrected JSON value along with a list of changes made.

## Facts

- Endpoint: POST https://api.pay-forge.online/v1/repair-json?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-20
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/machine-shop-repair-json-7ab07a42
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_a7RY8gAXe87PoTjfxCtLo

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 machine-shop-repair-json-7ab07a42 -d '<json body>'
```

Example prompt: This JSON string I got back from the LLM has single quotes and trailing commas — can you repair it and give me back valid JSON? Here it is: {'ok': true, 'items': [1, 2, 3,]}

## When to prefer this

Choose this endpoint when you have a JSON string that fails to parse due to common issues like single quotes, trailing commas, Python dict literals, or minor syntax errors and you need a quick, cheap automated repair. It is not a web search or monitoring tool — it operates only on text you supply directly.

## Known failure modes

- Input text is so malformed it cannot be interpreted as any JSON-like structure — returns an error or empty result
- Input exceeds 50,000 character limit — request rejected
- Text is valid JSON already — still returns successfully with empty changes list

## How this service works

Turn Apify product scrape results into safe catalog updates with Catalog Update Gate. Find evidence in supplied documents, compare snapshots, extract typed JSON fields, inspect x402 quotes and assess API migrations. Preview inputs, evidence and cost for free. No live web search, scheduled monitoring or third-party purchasing.

## Output

Returns an object containing the repaired JSON as a string, the parsed JavaScript value, and an array of human-readable change descriptions explaining what was fixed (e.g. 'parsed_python_literal_subset', 'removed trailing commas').

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "title": "Text",
   "maxLength": 50000
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "json": "{\"ok\": true}",
  "value": {
   "ok": true
  },
  "changes": [
   "parsed_python_literal_subset"
  ]
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/machine-shop-repair-json-7ab07a42/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.pay-forge.online](https://www.zero.xyz/host/api.pay-forge.online/llms.txt)
