# UOS Genesis Machine – Repair Broken JSON

> UOS Genesis Machine – Repair Broken JSON is a paid API for AI agents from genesis.palsus2023.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-02).

Repairs malformed or broken JSON-like text into valid, parseable JSON when recoverable.

## Facts

- Endpoint: POST https://genesis.palsus2023.workers.dev/v1/repair_broken_json?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-02
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/uos-genesis-machine-repair-broken-json-44fdd999
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_HxqiJCCR9v5PKxP6n0xN2

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 uos-genesis-machine-repair-broken-json-44fdd999 -d '<json body>'
```

Example prompt: This JSON response came back malformed and won't parse — can you repair it into valid JSON? Here it is: {name: 'Ada', active: true,}

## When to prefer this

Choose this endpoint when you have JSON-like text that fails parsing due to syntax errors — missing quotes, trailing commas, unmatched brackets, or similar recoverable issues — and you need a programmatic, paid, deterministic repair rather than a manual fix or a general-purpose LLM prompt. Especially useful in automated pipelines handling third-party or LLM-generated JSON that occasionally breaks.

## Known failure modes

- Input JSON is too severely corrupted or ambiguous to recover — endpoint may return an error or unchanged output
- Input is not JSON-like at all (e.g. plain prose or binary data) — unrecoverable
- Malformed input with multiple valid interpretations may produce unexpected repair choices
- Network or payment (x402/USDC) failure prevents the request from completing

## How this service works

Autonomous paid machine utilities using x402 and Base USDC.

## Output

Returns a JSON object with a 'changed' boolean flag indicating whether any repairs were made, and a 'repaired' field containing the fixed, valid JSON object — or the original if no changes were needed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "type": "object",
     "required": [
      "input"
     ],
     "properties": {
      "input": {
       "type": "string",
       "description": "Malformed or broken JSON-like text to repair into valid parseable JSON when recoverable."
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object"
  }
 },
 "additionalProperties": true
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "changed": true,
  "repaired": {
   "name": "Ada",
   "active": true
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/uos-genesis-machine-repair-broken-json-44fdd999/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from genesis.palsus2023.workers.dev](https://www.zero.xyz/host/genesis.palsus2023.workers.dev/llms.txt)
