# UOS Genesis repair_json

> UOS Genesis repair_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-09-14).

Attempts to repair and return a valid JSON string from malformed or broken JSON input

## Facts

- Endpoint: POST https://genesis.palsus2023.workers.dev/v1/repair_json
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/uos-genesis-repair-json-f4bf148a
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_2D7YNblOFVKa0T0uDJaMd

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-repair-json-f4bf148a -d '<json body>'
```

Example prompt: This API response I got back has broken JSON — missing a closing bracket and some unquoted keys — can you send it to the JSON repair service and give me back something I can actually parse?

## When to prefer this

Choose this endpoint when you have a JSON string that fails to parse due to syntax errors, missing brackets, unquoted keys, trailing commas, or similar structural issues, and you need a quick programmatic repair without writing custom parsing logic. It is part of a suite of utility functions available on the same host, making it convenient when you are already using other UOS Genesis utilities.

## Known failure modes

- Input is so corrupted that no valid JSON can be inferred — may return an error or best-effort partial result
- Ambiguous repair cases where multiple valid corrections exist may produce unexpected output
- Non-JSON input (e.g. plain text or binary) may fail or return an empty result
- Payment failure (402) if the x402 payment header is missing or insufficient

## How this service works

Repair malformed, invalid, or broken JSON-like text and return valid parseable JSON when recoverable. Useful for fixing machine-generated JSON, API responses, missing quotes, formatting errors, trailing commas, and structured-data ingestion pipelines. Price: $0.003 USDC via x402 on Base.

## Output

A repaired, syntactically valid JSON string recovered from the malformed input, ready to be parsed by standard JSON parsers.

## 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
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/uos-genesis-repair-json-f4bf148a/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)
