Repair malformed JSON from model or tool output using deterministic CPU rules
Repair malformed JSON from model or tool output using deterministic CPU rules. Returns parsed value, repaired JSON text and a changed flag. Send JSON {text:string}. Paid calls require a fresh secret random 32-byte base64url Idempotency-Key; reuse it only for retries of the same input. Maximum request body: 128 KiB. Repair may change meaning; validate the result.
3000 (raw units)
price
4
calls / 30d
1
unique payers
2026-09-09
updated
Provider
agent-data-fixer-production.up.railway.app · discovered, not yet claimed by its owner
Payment (x402 accepts[])
[
{
"scheme": "exact",
"network": "eip155:84532",
"payTo": "0x218BaF6a0621A8aBa7E89Bbda72818DC7e428410",
"asset": "0x036CbD53842c5426634e7929541eC2318f3dCF7e",
"amount": "3000",
"maxTimeoutSeconds": 300
}
]Output schema
{
"bazaar": {
"info": {
"input": {
"body": {
"text": "{hello: 'machine',}"
},
"bodyType": "json",
"headers": {
"Content-Type": "application/json",
"Idempotency-Key": "GENERATE_YOUR_OWN_RANDOM_KEY_DO_NOT_REUSE_THIS"
},
"method": "POST",
"type": "http"
},
"output": {
"example": {
"operation": "json-repair",
"requestId": "0000000000000000000000000000000000000000000000000000000000000000",
"result": {
"changed": true,
"text": "{\"hello\": \"machine\"}",
"value": {
"hello": "machine"
}
}
},
"type": "json"
}
},
"schema": {
"$schema": "https://json-schema.org/draft/2020-12/schema",
"properties": {
"input": {
"additionalProperties": false,
"properties": {
"body": {
"properties": {
"text": {
"description": "Malformed JSON to repair. Total encoded request body must fit 128 KiB.",
"type": "string"
}
},
"required": [
"text"
],
"type": "object"
},
"bodyType": {
"enum": [
"json",
"form-data",
"text"
],
"type": "string"
},
"headers": {
"properties": {
"Content-Type": {
"const": "application/json"
},
"Idempotency-Key": {
"description": "REQUIRED for paid calls: generate 32 cryptographically random bytes as base64url (43 characters). Never reuse the public example. Keep secret. Reuse only for an identical request retry.",
"pattern": "^[a-zA-Z0-9_-]{43,128}$",
"type": "string"
}
},
"required": [
"Content-Type",
"Idempotency-Key"
],
"type": "object"
},
"method": {
"enum": [
"POST"
],
"type": "string"
},
"type": {
"const": "http",
"type": "string"
}
},
"required": [
"type",
"method",
"bodyType",
"body",
"headers"
],
"type": "object"
},
"output": {
"properties": {
"example": {
"additionalProperties": false,
"properties": {
"operation": {
"const": "json-repair"
},
"requestId": {
"pattern": "^[a-f0-9]{64}$",
"type": "string"
},
"result": {
"additionalProperties": false,
"properties": {
"changed": {
"type": "boolean"
},
"text": {
"type": "string"
},
"value": {}
},
"required": [
"value",
"text",
"changed"
],
"type": "object"
}
},
"required": [
"requestId",
"operation",
"result"
],
"type": "object"
},
"type": {
"type": "string"
}
},
"required": [
"type"
],
"type": "object"
}
},
"required": [
"input"
],
"type": "object"
}
}
}Use it
curl
curl "https://agent-data-fixer-production.up.railway.app/json-repair" # -> 402 Payment Required, accepts[] lists how to pay # retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://agent-data-fixer-production.up.railway.app/json-repair");
if (res.status === 402) {
const { accepts } = await res.json();
// pay one of accepts[] via an x402 client, then retry with the payment header
}Python
import httpx
res = httpx.get("https://agent-data-fixer-production.up.railway.app/json-repair")
if res.status_code == 402:
accepts = res.json()["accepts"]
# pay one of accepts[] via an x402 client, then retry with the payment headerMachine-readable
Everything on this page is also available as clean JSON at /resources/15157.json, and this resource appears in /discovery/resources and /discovery/search.