BRAINIAC.software stands with Ukraine.Solidarity with the Ukrainian people against the invasion. Find out how you can help.
BRAINIAC.software
API CatalogPagesAgent instructionsAgentsMCP connectAgentsRecommend fitAgentsCatalog exploreAgentsMCP serversPagesConnectPagesPricingPages

© 2026 BRAINIAC .software

FAQHow it worksContact UsTerms and AgreementsPrivacy StatementCookie Statement
  1. APIs
  2. jq JSON Diff Rubik's Cube
  3. Documentations

jq JSON Diff Rubik's Cube API

jqRubik's CubeJSON diffText diffx402MCPOpenAPI

Run real jq 1.8.2 filters, batch-grade jq conformance cases, solve or validate Rubik's Cube states, and produce RFC 6902 JSON or text diffs from caller input. No account or API key needed for pay-as-you-go calls; sign in for a monthly free quota. Payment is the exact USDC price on Base with x402.

POSThttps://www.brainiac.software/api/v1/compute-tools/jq-output$0.01 USDC

Run a jq filter

Run a caller-supplied jq filter against JSON input with real jq 1.8.2 compiled to WebAssembly.

Body

FieldRequiredNotes
filterYesstring
inputYesstring | object | array | number | boolean | null; Array
optionsNoobject

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
  }
}
JSON
POSThttps://www.brainiac.software/api/v1/compute-tools/jq-outputs$0.03 USDC

Batch-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

FieldRequiredNotes
casesYesarray; 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"
    }
  ]
}
JSON
POSThttps://www.brainiac.software/api/v1/compute-tools/cube-solution$0.03 USDC

Solve 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

FieldRequiredNotes
faceletsNostring
scrambleNostring
maxLengthNointeger

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"
}
JSON
POSThttps://www.brainiac.software/api/v1/compute-tools/cube-state$0.005 USDC

Validate Rubik's Cube state

Validate a 54-facelet Rubik's Cube state or WCA scramble before solving.

Body

FieldRequiredNotes
faceletsNostring
scrambleNostring

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"
}
JSON
POSThttps://www.brainiac.software/api/v1/compute-tools/json-diff$0.005 USDC

Diff two JSON values

Compare two JSON values and return an RFC 6902 patch, equality, and operation counts.

Body

FieldRequiredNotes
fromYes-
toYes-
arrayModeNostring; 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
    ]
  }
}
JSON
POSThttps://www.brainiac.software/api/v1/compute-tools/text-diff$0.005 USDC

Diff two texts

Produce a unified diff and per-hunk stats for two texts in line, word, or character mode with configurable context lines.

Body

FieldRequiredNotes
fromYesstring
toYesstring
modeNostring; One of: line, word, char
contextNointeger

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