https://www.brainiac.software/api/v1/compute-tools/jq-output$0.01 USDCRun a jq filter
Run a caller-supplied jq filter against JSON input with real jq 1.8.2 compiled to WebAssembly.
Body
| Field | Required | Notes |
|---|---|---|
filter | Yes | string |
input | Yes | string | object | array | number | boolean | null; Array |
options | No | object |
Request exampleJSON
{
"filter": ".items[] | select(.qty > 1) | .sku",
"input": {
"items": [
{
"sku": "A-1",
"qty": 2
},
{
"sku": "B-2",
"qty": 1
}
]
},
"options": {
"compact": true
}
}Response exampleJSON
{
"status": "complete",
"stdout": "\"A-1\"",
"outputs": [
"A-1"
],
"exitCode": 0,
"error": null,
"elapsedMs": 7,
"truncated": false,
"overdue": false,
"jqVersion": "1.8.2",
"sources": [
{
"source": "jq 1.8.2 via jq-wasm 3.0.0-jq-1.8.2",
"url": "https://github.com/jqlang/jq",
"licence": "MIT",
"retrievedAt": "2026-07-05",
"status": "ok"
}
],
"limitations": [
"No $ENV, input_filename, module loading, or filesystem access.",
"The 2 s wall budget is measured, not pre-emptive; a pathological filter can run longer.",
"…"
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/compute-tools/jq-output" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"filter": ".items[] | select(.qty > 1) | .sku",
"input": {
"items": [
{
"sku": "A-1",
"qty": 2
},
{
"sku": "B-2",
"qty": 1
}
]
},
"options": {
"compact": true
}
}
JSONhttps://www.brainiac.software/api/v1/compute-tools/jq-outputs$0.03 USDCBatch-grade jq filters
Run up to 100 jq filter cases against real jq 1.8.2, compare each result with an expected value, and return an RFC 6902 patch for every mismatch.
Body
| Field | Required | Notes |
|---|---|---|
cases | Yes | array; Array |
Request exampleJSON
{
"cases": [
{
"id": "sku",
"filter": ".items[] | select(.qty > 1) | .sku",
"input": {
"items": [
{
"sku": "A-1",
"qty": 2
},
{
"sku": "B-2",
"qty": 1
}
]
},
"expected": "A-1"
}
]
}Response exampleJSON
{
"status": "complete",
"jqVersion": "1.8.2",
"cases": [
{
"id": "sku",
"status": "complete",
"stdout": "\"A-1\"",
"outputs": [
"A-1"
],
"exitCode": 0,
"error": null,
"elapsedMs": 4,
"truncated": false,
"overdue": false,
"matches": true
}
],
"summary": {
"total": 1,
"passed": 1,
"failed": 0,
"errored": 0
},
"sources": [
{
"source": "jq 1.8.2 via jq-wasm 3.0.0-jq-1.8.2",
"url": "https://github.com/jqlang/jq",
"licence": "MIT",
"retrievedAt": "2026-07-05",
"status": "ok"
}
],
"limitations": [
"No $ENV, input_filename, module loading, or filesystem access.",
"The 2 s wall budget is measured, not pre-emptive; a pathological filter can run longer.",
"…"
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/compute-tools/jq-outputs" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"cases": [
{
"id": "sku",
"filter": ".items[] | select(.qty > 1) | .sku",
"input": {
"items": [
{
"sku": "A-1",
"qty": 2
},
{
"sku": "B-2",
"qty": 1
}
]
},
"expected": "A-1"
}
]
}
JSONhttps://www.brainiac.software/api/v1/compute-tools/cube-solution$0.03 USDCSolve a Rubik's Cube
Solve a Rubik's Cube from 54 facelets or a WCA face-turn scramble with the Kociemba two-phase algorithm.
Body
| Field | Required | Notes |
|---|---|---|
facelets | No | string |
scramble | No | string |
maxLength | No | integer |
Request exampleJSON
{
"scramble": "R U R' U' F2"
}Response exampleJSON
{
"status": "complete",
"solution": "F2 U R U' R U2 D2 R2 L2 U2 D2 L2",
"moves": 12,
"verified": true,
"startFacelets": "UULUUFRDDLRULRRLRRFFFUFFDFFFUUDDDDDDBLULLBLLRBRRBBBBBB",
"metric": "HTM",
"errors": [],
"sources": [
{
"source": "cubejs 1.3.2 (Kociemba two-phase solver)",
"url": "https://github.com/ldez/cubejs",
"licence": "MIT",
"retrievedAt": "2019-04-27",
"status": "ok"
}
],
"limitations": [
"Half-turn metric face-turn solution from the Kociemba two-phase solver.",
"Wide, slice, and rotation moves are not accepted in scrambles."
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/compute-tools/cube-solution" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"scramble": "R U R' U' F2"
}
JSONhttps://www.brainiac.software/api/v1/compute-tools/cube-state$0.005 USDCValidate Rubik's Cube state
Validate a 54-facelet Rubik's Cube state or WCA scramble before solving.
Body
| Field | Required | Notes |
|---|---|---|
facelets | No | string |
scramble | No | string |
Request exampleJSON
{
"facelets": "UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB"
}Response exampleJSON
{
"status": "complete",
"valid": true,
"errors": [],
"facelets": "UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB",
"solved": true,
"sources": [
{
"source": "cubejs 1.3.2 (Kociemba two-phase solver)",
"url": "https://github.com/ldez/cubejs",
"licence": "MIT",
"retrievedAt": "2019-04-27",
"status": "ok"
}
],
"limitations": [
"Checks piece counts, centre count, corner twist, edge flip, and permutation parity.",
"A scramble is applied to a standard solved cube first; wide, slice, and rotation moves are not accepted."
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/compute-tools/cube-state" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"facelets": "UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB"
}
JSONhttps://www.brainiac.software/api/v1/compute-tools/json-diff$0.005 USDCDiff two JSON values
Compare two JSON values and return an RFC 6902 patch, equality, and operation counts.
Body
| Field | Required | Notes |
|---|---|---|
from | Yes | - |
to | Yes | - |
arrayMode | No | string; One of: index, lcs |
Request exampleJSON
{
"from": {
"a": 1,
"b": [
1,
2
]
},
"to": {
"a": 2,
"b": [
1,
2,
3
]
}
}Response exampleJSON
{
"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."
]
}cURL
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
]
}
}
JSONhttps://www.brainiac.software/api/v1/compute-tools/text-diff$0.005 USDCDiff two texts
Produce a unified diff and per-hunk stats for two texts in line, word, or character mode with configurable context lines.
Body
| Field | Required | Notes |
|---|---|---|
from | Yes | string |
to | Yes | string |
mode | No | string; One of: line, word, char |
context | No | integer |
Request exampleJSON
{
"from": "a\nb\nc\n",
"to": "a\nB\nc\n",
"mode": "line"
}Response exampleJSON
{
"status": "complete",
"equal": false,
"unified": "===================================================================\n--- from\n+++ to\n@@ -1,3 +1,3 @@\n a\n-b\n+B\n c",
"hunks": [
{
"removed": true,
"value": "b",
"count": 1
},
{
"added": true,
"value": "B",
"count": 1
}
],
"stats": {
"added": 1,
"removed": 1,
"unchanged": 2
},
"mode": "line",
"sources": [
{
"source": "jsdiff 9.0.0 (Myers diff)",
"url": "https://github.com/kpdecker/jsdiff",
"licence": "BSD-3-Clause",
"retrievedAt": "2026-04-13",
"status": "ok"
}
],
"limitations": [
"Unified output is line-oriented even when mode is word or character.",
"Hunks and stats follow the selected line, word, or character mode."
]
}cURL
curl -i -X POST "https://www.brainiac.software/api/v1/compute-tools/text-diff" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"from": "a\nb\nc\n",
"to": "a\nB\nc\n",
"mode": "line"
}
JSON