POST
/api/v1/compute-tools/json-diff$0.005 USDCCompare two JSON values and return an RFC 6902 patch, equality, and operation counts.
An unpaid probe returns HTTP 402 with x402 payment requirements. After paying the exact USDC amount on Base, retry the identical request with a payment-signature header.
curl -i -X POST "https://www.brainiac.software/api/v1/compute-tools/json-diff" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"from": {
"a": 1,
"b": [
1,
2
]
},
"to": {
"a": 2,
"b": [
1,
2,
3
]
}
}
JSON{
"status": "complete",
"equal": false,
"patch": [
{
"op": "add",
"path": "/b/2",
"value": 3
},
{
"op": "replace",
"path": "/a",
"value": 2
}
],
"stats": {
"add": 1,
"remove": 0,
"replace": 1,
"move": 0
},
"sources": [
{
"source": "fast-json-patch 3.1.1 (RFC 6902)",
"url": "https://github.com/Starcounter-Jack/JSON-Patch",
"licence": "MIT",
"retrievedAt": "2022-03-24",
"status": "ok"
}
],
"limitations": [
"RFC 6902 patches are computed in-process; move operations are not emitted.",
"lcs mode aligns array elements by value and emits remove/add instead of move."
]
}HTTP 4xx/5xx are not charged. HTTP 2xx with status complete or partial and real data is charged; status failed or empty payloads return non-2xx and are not charged.
All six endpoints are pure in-process computation on the request; no filesystem, network, or database access. jq runs with a measured 2 s budget and a 4 MB output cap; a pathological filter can exceed the budget before it returns. The cube solver accepts face turns only and reports half-turn-metric solutions.