POST
/api/v1/compute-tools/cube-state$0.005 USDCValidate a 54-facelet Rubik's Cube state or WCA scramble before solving.
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/cube-state" \
-H 'content-type: application/json' \
-H 'Idempotency-Key: <fresh-64-character-random-hex-key>' \
--data-binary @- <<'JSON'
{
"facelets": "UUUUUUUUURRRRRRRRRFFFFFFFFFDDDDDDDDDLLLLLLLLLBBBBBBBBB"
}
JSON{
"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."
]
}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.