# NewBotLabor JSON Repair

> NewBotLabor JSON Repair is a paid API for AI agents from newbotlabor--254ecdfcc2de11f19b541607ee4eb77e.web.val.run, paid per call via x402, $0.003/call, status unknown (last checked 2026-10-22).

Repairs malformed JSON text by fixing common syntax errors and optionally validates/coerces the result against a JSON Schema

## Facts

- Endpoint: POST https://newbotlabor--254ecdfcc2de11f19b541607ee4eb77e.web.val.run/api/json/repair?utm_source=zero.xyz
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/newbotlabor-json-repair-183fc8ae
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_b0Za9EaW_1P7o4tL10kKj

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 newbotlabor-json-repair-183fc8ae -d '<json body>'
```

Example prompt: Can you fix this broken JSON for me — it has single quotes and trailing commas and is wrapped in a markdown code block: ```{'name': 'Bob', 'age': '42', 'tags': ['a',]}``` — and validate it against this schema: {"type":"object","properties":{"name":{"type":"string"},"age":{"type":"number"}}}?

## When to prefer this

Choose this endpoint when you need to programmatically fix LLM-generated or user-supplied JSON that has common syntax errors (markdown fences, single quotes, unquoted keys, trailing commas, type mismatches) without setting up an account or API key. It is particularly well-suited for agent workflows that receive JSON from language models and need to normalize it before downstream use. It combines repair + schema validation in one call, which is more efficient than separate parse-and-validate steps. Pay only per call via x402/USDC on Base — ideal for sporadic or bursty agent workloads.

## Known failure modes

- Text is so severely malformed that repair heuristics cannot produce valid JSON — returns ok:false with error details
- Input text exceeds 200k character limit — rejected with size error
- Schema provided is itself invalid — schema validation step may error or be skipped
- Payment via x402 fails or USDC balance insufficient — HTTP 402 returned before processing

## How this service works

Pay-per-call utilities for autonomous agents, paid with x402 (USDC on Base; no account, no API key).

## Output

Returns an object containing: a boolean 'ok' flag, the repaired JSON as a string, the parsed JavaScript value, a list of human-readable fix descriptions (e.g. 'stripped markdown code fence', 'quoted unquoted keys'), a 'repaired' boolean, and if a schema was provided, a schema validation sub-object with validity status, errors, coercions applied, and whether it was valid before coercion.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "text": {
   "type": "string",
   "description": "possibly broken JSON text, max 200k chars"
  },
  "schema": {
   "type": "object",
   "description": "optional JSON Schema to validate/coerce against"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "json": "{\"name\":\"Bob\",\"age\":42,\"tags\":[\"a\"]}",
  "fixes": [
   "stripped markdown code fence",
   "quoted unquoted keys",
   "converted single-quoted strings",
   "removed extra/trailing commas"
  ],
  "value": {
   "age": 42,
   "name": "Bob",
   "tags": [
    "a"
   ]
  },
  "schema": {
   "valid": true,
   "errors": [],
   "coercions": [
    "$.age: string -> number"
   ],
   "validBeforeCoercion": false
  },
  "repaired": true
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/newbotlabor-json-repair-183fc8ae/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from newbotlabor--254ecdfcc2de11f19b541607ee4eb77e.web.val.run](https://www.zero.xyz/host/newbotlabor--254ecdfcc2de11f19b541607ee4eb77e.web.val.run/llms.txt)
